Use LocalTuya with Robot Vacuum

I recently purchased a cheap robot vacuum cleaner from a brand I had never heard of (Hyggie?). I discovered today that it was Tuya compatible and I was able to add it to Smart Life and control through that app. I figured while I was there I could add to Home Assistant but I haven’t had much luck there.

I have used LocalTuya in the past light switches and bulbs and haven’t had any issues but I can’t seem to figure out the vacuum at all. I have confirmed that I can control the vacuum via the Tuya IOT platform but can’t get the format right in Home Assistant. Has anyone had any success with vacuums and LocalTuya?

2 Likes

Hi,

I’ve made it with another unknown brand that works with SmartLife. I had to retrieve the ID, IP, and local key. Add a new integration in Local Tuya, selecting Vacuum then I had to put all the DP manually, that is the most boring thing to do. You need to choose the variable type (sensor, switch, number…) according the right DP number.

Once it was done I use it with https://github.com/denysdovhan/vacuum-card just by selecting the name of the integration I made in Local Tuya.

For more info, you can see this video https://www.youtube.com/watch?v=eOtslB2ilf0.

When I was unsure of the DP, first I checked in Tuya IoT (in device specs section of your device (with dp_id) you have mainly the functions and the status, functions are controlables so I used switch or select variable types in Local Tuya and for status, I used it like a sensor), then I used this https://github.com/rospogrigio/localtuya/wiki/HOWTO-get-a-DPs-dump to be sure that it was OK. I made change one by one with the Smart Life app or the remote control and see which DP changed and its associated value using the Python script.

Now 80% of the vacuum is controlled by Home Assistant. I don’t have the map, some small options but to use my vacuum it’s clearly enough.

Hope it can help you

3 Likes

@scoudibou I’ve been trying to setup my coredy r750 & for the life of me cannot figure it out. It just shows ‘cleaning’ no matter what & I can’t control it. I was able to get the DP values using the tuya debug method but not sure what they mean, & none of them really correspond to any DP values that pop up in LocalTuya. Also tried getting the dp_id from the IOT cloud but it doesn’t show the dp_id values & only shows ‘code’ & ‘type’.

Got any suggestions ? Thanks in advance!

@karma1 As I remember, the DP you affect to the vacuum (the first one in Local Tuya to say that it is a vacuum) is important but I used this DP twice (like a sensor or boolean afterwards but it doesn’t matter, I don’t use it). You also have to know that you won’t have every listed DP available in Local tuya (the reason I said that I got 80% controlled - I still don’t know why). Sometimes when you use a function on the app it appears in Local Tuya but seems hidden firstly. The advice I can give is to play with all function with the app before integrate it in Local Tuya (so the most functions will be available in it - it’s like sleepy function).
For the IOT, you need to go to the API Explorer > Smart Home Device System > Device Control > Get Device Specification Attribute (the last one). Then put you ID and you’ll get a more complete list… like :
{
“result”: {
“category”: “sd”,
“functions”: [
{
“code”: “power_go”,
“dp_id”: 1,
“type”: “Boolean”,
“values”: “{}”
},
{
“code”: “pause”,
“dp_id”: 2,
“type”: “Boolean”,
“values”: “{}”
},

2 Likes

@scoudibou I can not thank you enough for the info on how to determine the DP. I had been struggling to figure out what each one was. I just recently picked up a robot vac that connected to Tuya and was searching to figure out how get it connected and came across this thread.

1 Like