DeebotUniverse / client.py

Deebot client library in python
https://deebot.readthedocs.io
GNU General Public License v3.0
28 stars 41 forks source link

Clean / dirty water tanks levels #463

Open kuja87 opened 1 year ago

kuja87 commented 1 year ago

Is there an existing issue for this?

Is your feature request related to a problem?

Can be useful for refill planning

Suggested solution

A sensor for each tank with a percentage or levels (hi / mid / low)

Api example request

No response

Alternatives you've considered

No response

Additional information

No response

edenhaus commented 1 year ago

Have you the technical skills to analyse the traffic of your bot or app? As my bot has no tanks, I cannot find out the correct command

kuja87 commented 1 year ago

Have you the technical skills to analyse the traffic of your bot or app? As my bot has no tanks, I cannot find out the correct command

I don't know where to begin, i have a Deebot X1 Omni with two tanks, can you suggest something?

edenhaus commented 1 year ago

Are you familiar with docker? You could setup a man in the middle proxy and redirect the traffic of your phone through. Afterwards you will able to see all requests of the ecovacs app

RosemaryOrchard commented 1 year ago

I just ran the deebot client on my Mac and found the following in the debug logs:

DEBUG:deebot_client.vacuum_bot:Try to handle message onFwBuryPoint-bd_setting: b'{"header":{"pri":1,"tzm":60,"ts":"1690839128142","ver":"0.0.1","fwVer":"2.3.9","hwVer":"0.1.1","wkVer":"0.1.54"},"body": seeBelow}'
{"gid":"[gid]","index":"0000002627","ts":"1690839128096","id":"1771690839128096","AISL":1,"isPressurized":1,"continue":1,"DND":1,"childLock":0,"autocollect":2,"personalClean":0,"fanspeed":2,"waterAmount":1,"cleanCount":1,"personalCleanSetting":[]}

There is also:

DEBUG:deebot_client.vacuum_bot:Try to handle message onFwBuryPoint-bd_basicinfo: b'{"header":{"pri":1,"tzm":60,"ts":"1690839093028","ver":"0.0.1","fwVer":"2.3.9","hwVer":"0.1.1","wkVer":"0.1.54"},"body": seeBelow}
{"gid":"[gid]","index":"0000002617","ts":"1690839092654","id":"1031690839092654","battery":98,"chargeState":0,"onCharger":0,"robotState":1,"robotPos":"823.12,-1249.48,-1.04","chargerPos":"-264.23,-1788.42,1.34","dirtboxState":1,"mopState":2}

Through some experimentation I believe waterAmount and dirtboxState are both binary elements which are 0 when there is a problem (water top up is needed for waterAmount, and water needs emptying for dirtboxState).

This file from ecovacs.js may be useful for getting the error codes related to these and translating them: https://github.com/mrbungle64/ecovacs-deebot.js/blob/41d0b84c6bad5186147a84f2bd2443029ce889ed/library/errorCodes.json#L45