[APP][Pro] Eufy Clean

@Rembo038 looks like a timeout on tuya. not sure how to fix this though :confused:

will have to look into this. because i wan’t to prevent any retry-loops

I just installed the normal version instead of the test version.
Because the vacuum was again not available in the Homey.

Thank you for looking into it, hopefully you can fix it!

1 Like

b0fda786-ad0e-44b5-8e79-2e95e8909a08

Got a device unavailable error again

@Nikito already replied to the report (there was no name in it so didn’t know who it was).
But see above

My report was made seconds before the post, but it is the tuya time-out?

@Nikito i can’t say for sure. I can’t see which device you have neither what is going wrong. That’s why i replied with if you tried a repair

@Nikito Please share which devices you have so i can proper debug this

No problem, but how can i do this?

@Nikito I’m not asking you to share the devices with me. I’m asking which devices you have

Hey Martijn, I have the same issue. I have the Eufy X9 Pro, installed the test version of the app which as you know also breaks. Let me know if you need me to do something specific. I can send a report if you want to but I think you have all you need?

Here’s the report just in case: ab787a6c-9616-41f0-8155-b7e11ade21ee

@Nikito @Rembo038 @melmoes combined the people as you have te same issue :slight_smile:

Ok so all the devices are tuya based. I have to dive into this as this requires some investigation. Will let you know once i found something.

If i need anything i’ll ask you guys.

1 Like

Thanks for your efforts and hopefully you can solve it!

To ā€œfixā€ this issue for the time being, I’m running a script every 15 minutes to check if the work status can be returned, if not - it’ll send an API call to the homey pro to restart the application. This way it still works…

This is basically what you didn’t want to do Martijn, a retry loop as a temporary bug fix is good enough though.

Don’t know if the first bit of code works as I need to wait again until it breaks. Unless you have an idea on how to accurately see if it’s broken @martijnpoppen

// Retrieve all devices
const devices = await Homey.devices.getDevices();

// Initialize variable for RoboVac device
let robovacDevice = null;

// Search for the RoboVac device by name
for (const device of Object.values(devices)) {
    if (device.name.toLowerCase().includes('robovac')) {
        robovacDevice = device;
        break;
    }
}

if (robovacDevice) {
    // Debugging: Log available capabilities to check the structure
    console.log("Device Capabilities:", JSON.stringify(robovacDevice.capabilitiesObj, null, 2));

    // Check if the device has measure_work_status capability
    if (robovacDevice.capabilitiesObj && robovacDevice.capabilitiesObj.measure_work_status) {
        const workStatus = robovacDevice.capabilitiesObj.measure_work_status.value || "Unknown";

        console.log("Detected Work Status:", workStatus); // Log detected status for debugging

        return `Work status of ${robovacDevice.name}: ${workStatus}`;
    } else {
        return `Work status information not available for ${robovacDevice.name}.`;
    }
} else {
    return "No device with 'RoboVac' in its name was found.";
}

const appId = 'com.eufylife.home'; // Eufy Clean App ID
const apiKey =''; // Replace with your API key

try {
    const response = await fetch(`http://localhost/api/manager/apps/app/${appId}/restart`, {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            "Authorization": `Bearer ${apiKey}`
        }
    });

    if (!response.ok) {
        throw new Error(`HTTP error! Status: ${response.status}`);
    }

    return `Successfully restarted the Eufy Clean app (${appId}).`;
} catch (error) {
    return `Failed to restart the Eufy Clean app: ${error.message}`;
}

So far, using the script it hasn’t broken down yet. So that’s positive. :smiley:

1 Like

Hi @martijnpoppen ,

The Eufy L60SES has been online in Homey for almost a whole week, you made a fix in Tuya?

@Rembo038 actually didn’t do anything didn’t have time yet

So probably that seems like the solutioN. Just wait :stuck_out_tongue:

@martijnpoppen haha its magic.

So i don’t have to make a flow with the code from @melmoes ?
I am not a coder, so that looks like aba ca dabra for me haha

@Rembo038 I wouldn’t do that if it works. Best is to monitor a bit more for the next week but if it keeps stable I’m confident that It is fixed on the tuya side. But we will never know because Tuya won’t share that

1 Like

I set up a notification every time it actually needs to do a restart of the app and it hasn’t done so in a while. So yeah looks like it was fixed on the tuya side.

1 Like