Open RickSisco opened 8 months ago
I am still on it. Have to admit that there is quite a lot besides this topic for me currently. However, I still have this topic on my list. Maybe it would be a good idea to sync in some way @sanohin @johnnieblows .
@devPeete that is great news, as they saying goes many hands make light work.
I would just like to say a massive thank you to all the developers who give up their time to make integrations like this for the community. I for one am truly grateful.
@sanohin Instead of adding you to the repo i decided to make the repo public 😊
SDK: https://github.com/martijnpoppen/eufy-clean
Please note that it might not be super clear how it works. PR's are welcome. 🚀
To see how i Integrated it with my Homey app:
APP: https://github.com/martijnpoppen/com.eufylife.home (check main-device.js
in ./drivers/
)
And if you have a Homey: https://homey.app/nl-nl/app/com.eufylife.home/Eufy-Clean/
The repo contains of 3 ways of connecting
I can also make a NPM package for this project, but not sure if that would make sense for the HA community?
@martijnpoppen this is great! I've got it wired up locally and I can at least see my vac. One thing - does your SDK have a way of vacuuming a specific room? I've yet to see the correct params in setCleanParam
and roomClean
doesn't seem to take any params. Maybe this is something accomplished with scene.proto? I do see room_id mentioned in there...
@todanator Just to see, what you are currently doing: Have you moved it to a Python Application yet?
So far I've just been working on getting @martijnpoppen's sdk running locally with some vanilla node js to get familiar with the protobuffs he shared.
I'm working on a POC to fetch the room_id+name and then sending a clean request for that specific room. I haven't moved anything to python.
@martijnpoppen - for your decode util, how do you pick the proto
and type
? From the sdk logs I just see config.dps as a set of key/value pairs with nothing that denotes how they are delimited.
@todanator Yes you can add a room_id. But i haven't found a way to do so yet. next to that it was not really needed for my integration as there's no map to click a room. So didn't include it any further.
What should work is clicking a room in the official app and then start it in the SDK, but that's just a extra step 😅
@martijnpoppen - for your decode util, how do you pick the proto and type? From the sdk logs I just see config.dps as a set of key/value pairs with nothing that denotes how they are delimited.
Like this: https://github.com/martijnpoppen/eufy-clean/blob/main/src/controllers/SharedConnect.ts#L79
Btw there's also somebody else working on a integration: https://github.com/jimbo19922003/eufy-clean-ha-addon
Sorry if I'm missing it, but I'm not sure I get how you take the number plus the base64 encoded value and figure out which .proto file & message to use it with.
Maybe I'm thinking about it backward but I don't see how you figured out these existing mappings like 154 maps to Cleaning Parameters.
My current case is to fetch the map data, but I'm not sure which number to use for the encoded data.
const value = await encode('proto/cloud/multi_maps.proto', 'MultiMapsManageRequest', {
method: 7,
seq: 1 // Sequence number for tracking
});
// Send `value` to the vacuum's API and await the response.
return await this.sendCommand({
/* what number do I use here? */ : value
})
@todanator i did by connecting a mqtt client and test it. But also checked in the decompiled android app.
With that info you can open the proto file and in there you can find the different parameters
In the android app there's a list with dps so you can find which dps belongs to the correct proto file
Edit: I looked up the DPS for you: So in your case you need 171
ACCESSORIES_STATUS = "168";
AUTO_RETURN_CLEAN = "156";
BATTERY_LEVEL = "163";
BOOSTIQ_SWITCH = "159";
CLEANING_PARAMETERS = "154";
CLEANING_STATISTICS = "167";
DEBUG_SETTING = "166";
DEVICE_ANALYSIS = "179";
DEVICE_CHILD_LOCK = "176";
DEVICE_INFO = "169";
DEVICE_MEDIA = "174";
DEVICE_STATION = "173";
DEVICE_TIPS_CODE = "178";
DEVICE_UPDATE_STATE = "180";
DEVICE_WARN_CODE = "177";
DO_NOT_DISTRUB = "157";
ERROR_REPORT = "164";
FIND_ROBOT = "160";
LANGUAGE_SETTING = "162";
LOCAL_TIMER_INFO = "164";
MAP_EDIT = "170";
MODE_CONTROL = "152";
MULTIPLE_MAPS_CTRL = "171";
MULTIPLE_MAPS_MANAGE = "172";
POWER_SWITCH = "151";
REMIND_REPORT = "165";
REMOTE_CONTROL_DIRECTION = "155";
SUCTION_GEAR = "158";
VOLUME_LEVEL = "161";
WORKING_STATUS = "153";
@todanator I also checked the map request, but it seems like we only get mapIds but not really a way to retrieve the mapUrl from Tuya.
Response of the maps request:
[
{
"key": "Result",
"value": 2,
"errCode": 107
},
{
"key": "p2p.MapInfo",
"releases": 2,
"mapId": 107
},
{
"key": "CompleteMaps",
"completeMap": [
{
"mapId": 107
}
]
}
]
Awesome! Thanks @martijnpoppen - this unblocks me for now 💪🏻
I can help test if still needed. I have an x10 Omni pro. Would love to have it working with home assistant.
I to would be happy to help test and give access to a vm of choice on the same network as the robot.
For anyone who wants a quick and dirty way to bring basic functionality into HA, you can use @martijnpoppen's SDK to just quickly start a Eufy Clean scene which and be any custom vacuum scenario.
For my own stop-gap solution, I just stood up nodejs endpoint that calls those scenes by number. HA has the ability to make REST calls.
So my setup is HA Button -> HA REST call -> NodeJS endpoint -> Eufy Scene via SDK
For anyone who wants a quick and dirty way to bring basic functionality into HA, you can use @martijnpoppen's SDK to just quickly start a Eufy Clean scene which and be any custom vacuum scenario.
For my own stop-gap solution, I just stood up nodejs endpoint that calls those scenes by number. HA has the ability to make REST calls.
So my setup is HA Button -> HA REST call -> NodeJS endpoint -> Eufy Scene via SDK
I wish I was smart enough to understand this.
@todanator Do you have a docker compose for your REST solution?
Has there been any additional progress made here?
Has there been any additional progress made here?
Sorry, not from my side currently. Maybe I will have some time in the upcoming weeks
Are there plans to add support for the X10 Pro Omni vac?