CodeFoodPixels / robovac

Add a Eufy RoboVac easily to Home Assistant
Other
108 stars 26 forks source link

L35 hybrid+ #33

Open phoenixckua opened 9 months ago

phoenixckua commented 9 months ago

Please,.add full support robovac L35 hybrid+

CodeFoodPixels commented 9 months ago

Can you specify what you mean by full support?

On Sun, 8 Oct 2023, 16:25 phoenixckua, @.***> wrote:

Please,.add full support robovac L35 hybrid+

— Reply to this email directly, view it on GitHub https://github.com/CodeFoodPixels/robovac/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEPFVCCQKP6PQS52PZ6X73X6LAWJAVCNFSM6AAAAAA5XYGX32VHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTCOBVGQ2TQOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

phoenixckua commented 9 months ago

Чи можете ви уточнити, що ви маєте на увазі під повною підтримкою? В Нд, 8 жовтня 2023 р., 16:25 phoenixckua, @.> написав: Будь ласка,.додайте повну підтримку robovac L35 hybrid+ — Надішліть відповідь на цей електронний лист напряму, перегляньте його на GitHub < # 33 > або скасувати підписку < https://github.com/notifications/unsubscribe-auth/ABEPFVCCQKP6PQS52PZ6X73X6LAWJAVCNFSM6AAAAAA5XYGX32VHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTCOBVGQ2TQOA > . Ви отримуєте це, тому що підписалися на цю тему. ID повідомлення: @.>

Yes, of course. Robovac status don't change (status : cleaning or on station ). Status stay cleaning after back to charging base. Status changed after restart Home Assistant. I don't see status mop installed or dust container installed. Button start auto-empting dust to station don't exist on UI. And additional, cleaning map not exists. Haw to attach map in UI?

phoenixckua commented 8 months ago

For example,.I have error in logs : 2023-10-09 17:08:34.054 ERROR (MainThread) [homeassistant.helpers.entity] Update for vacuum.robovac fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 732, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 991, in async_device_update await self.async_update() File "/config/custom_components/robovac/vacuum.py", line 316, in async_update self.update_entity_values() File "/config/custom_components/robovac/vacuum.py", line 362, in update_entity_values self._attr_consumables = ast.literal_eval( ^^^^^^^^^^^^^^^^^ KeyError: 'consumable'

as-kholin commented 7 months ago

The issue is not specific to the L35 - I am having the same issue on the X8 Hybrid(T2261) Digging into it, it looks like at least my variation of the issue is that the two items pulled for consumables (126 and 142) are returning valid Base64, but they do not have a 'consumable' value in the JSON returned in the base64, which is breaking the integration. I don't know if the issue here is a difference in return, or another variation on 'the values returned change based on which model is in use'

On mine, I am getting back:

'126': 'eyJzeXNpbmZvIjp7Ik1lbUZyZWUiOjUyNTc2LCJNZW1BdmFpbGFibGUiOjcwNzIwLCJDYWNoZWQiOjIyNzUyLCJTaG1lbSI6Nzk3NiwiUm9vbUZyZWUiOjExMDAwfSwiSFciOnsiViI6MTU2ODYsIkkiOi0xMjEsIlJCX0kiOjB9fQ==', 
'142': 'eyJzd2l0Y2giOiJPTiIsImV2Ijp7ImhvbWUiOnsiaWQiOjQyMCwicG93ZXIiOjk5LCJzdGFydCI6MTcwMTE5NTIwMSwiZW5kIjoxNzAxMTk1MjIxLCJyZXMiOjF9fX0='

and since it is then indexing to ["consumable"]["duration"], its causing the update to fail, and you get no updates until the integration resets. I confirmed commenting out the T2261 as having consumables in my copy on HA prevents the issue

(Debugging mode in HA will give you those raw values - if you base64 decode them using an online tool, the they do not have a 'consumable' field, our issues are probably the same)

In case it may be the same issue as #28 I am including the raw JSON block of my X8 Hybrid's command results (figuring easier for you to prettyprint than to make this longer).

[{"attr":0,"canTrigger":true,"code":"power","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","iconname":"icon-dp_power2","id":1,"mode":"rw","name":"电源开关","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"power_go","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","iconname":"icon-dp_power","id":2,"mode":"rw","name":"清扫开关","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"direction","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","iconname":"icon-dp_mode","id":3,"mode":"rw","name":"清扫方向","property":{"range":["forward","back","left","right"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"mode","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","iconname":"icon-dp_dust","id":5,"mode":"rw","name":"清扫模式","property":{"range":["auto","room","zone","spot","fast_mapping"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"status","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","iconname":"icon-dp_direction","id":15,"mode":"ro","name":"工作状态","property":{"range":["standby","Running","Sleeping","Recharge","Charging","completed","Goto","Locating"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"auto_recharge","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":101,"mode":"rw","name":"自动回充","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"cleaning_strength","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":102,"mode":"rw","name":"清扫强度","property":{"range":["Max","Turbo","Standard","Quiet","speed5","speed6"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"look_for_sweeper","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":103,"mode":"rw","name":"ue�找扫地机","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"bat_level","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":104,"mode":"ro","name":"剩余电量","property":{"unit":"","min":0,"max":100,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"mop","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":105,"mode":"rw","name":"拖地设置","property":{"range":["MopHigh","MopMiddle","MopLow"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"fault_report","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":106,"mode":"ro","name":"故障提示","property":{"unit":"","min":0,"max":10000,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"ForbidMode","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":107,"mode":"rw","name":"勿扰模式状态","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"robo_pos","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":108,"mode":"ro","name":"机器人位姿","property":{"type":"string","maxlen":255},"type":"obj"},{"attr":0,"canTrigger":true,"code":"ClearTime","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":109,"mode":"ro","name":"当前清扫时长","property":{"unit":"s","min":0,"max":10000000,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"ClearArea","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":110,"mode":"ro","name":"当前清扫面积","property":{"unit":"M²","min":0,"max":200000,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"Loudness","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":111,"mode":"rw","name":"音量调节","property":{"unit":"","min":0,"max":100,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true�"code":"areaClean","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":116,"mode":"rw","name":"耗材管理","type":"raw"},{"attr":0,"canTrigger":true,"code":"mapMultiFloors","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":117,"mode":"rw","name":"地图多楼层","type":"raw"},{"attr":0,"canTrigger":true,"code":"BoostIQ","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":118,"mode":"rw","name":"自动增压","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"ClearTotalTime","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":119,"mode":"ro","name":"清扫总时长","property":{"unit":"s","min":0,"max":10000000,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"ClearTotalArea","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":120,"mode":"ro","name":"清扫总面积","property":{"unit":"m2","min":0,"max":10000000,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"mapData","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":121,"mode":"wr","name":"地图流控制","type":"raw"},{"attr":0,"canTrigger":true,"code":"pause_start","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":122,"mode":"rw","name":"暂停/继续","property":{"range":["Nosweep","Pause","Continue"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"languageSet","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":123,"mode":"rw","name":"语言包设置","type":"raw"},{"attr":0,"canTrigger":true,"code":"mapOperations","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":124,"mode":"rw","name":"地图操作","type":"raw"},{"attr":0,"canTrigger":true,"code":"waitRawDP","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":125,"mode":"rw","name":"语音包状态","type":"raw"},{"attr":0,"canTrigger":true,"code":"cleanSetting","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":126,"mode":"rw","name":"清扫设置","type":"raw"},{"attr":0,"canTrigger":true,"code":"langueChange","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":128,"mode":"rw","name":"语言切换","property":{"range":["default","used"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"mopStatus","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":129,"mode":"ro","name":"有无拖布","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"suctionFlag","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":130,"mode":"rw","name":"预约清扫强度","property":{"range":["Max","Turbo","Standard","Quiet","speed5","speed6"],"type":"enum"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"remoteControl","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":131,"mode":"rw","name":"遥控模式状态","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"onceCleanTimes","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":132,"mode":"ro","name":"单次清扫后时长","property":{"unit":"s","min":0,"max":1000000,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"onceCleanAreas","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":133,"mode":"ro","name":"单次清扫后面积","property":{"unit":"m2","min":0,"max":10000000,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"onceCleanCout","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":134,"mode":"ro","name":"单次清扫次数","property":{"unit":"","min":0,"max":100000,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"waiteBoolDP01","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":135,"mode":"rw","name":"断点续扫开关","property":{"type":"bool"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"remind_code","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":137,"mode":"ro","name":"扫地机提醒","property":{"unit":"","min":0,"max":10000000,"scale":0,"step":1,"type":"value"},"type":"obj"},{"attr":0,"canTrigger":true,"code":"waiteDPRaws","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":139,"mode":"rw","name":"勿扰模式设置","type":"raw"},{"attr":0,"canTrigger":true,"code":"Log","defaultRecommend":false,"editPermission":false,"executable":true,"extContent":"","id":142,"mode":"rw","name":"日志","type":"raw"}]

Log of error (Starting at line 2, goes into repeating loop)

2023-11-28 12:13:24.810 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from <DEVICE> (172.18.0.19:6668): Message(0x8, {'dps': {'15': 'Running'}, 't': 1701195204}, 0, None)
2023-11-28 12:13:24.813 INFO (MainThread) [custom_components.robovac.tuyalocalapi] Received updated state <DEVICE> (172.18.0.19:6668): {'1': True, '2': True, '5': 'auto', '15': 'Running', '101': False, '102': 'Turbo', '103': False, '104': 100, '106': 0, '107': False, '109': 0, '110': 0, '111': 100, '118': True, '122': 'Continue', '128': 'used', '131': False, '135': True, '137': 0, '126': 'eyJzeXNpbmZvIjp7Ik1lbUZyZWUiOjUwMjcyLCJNZW1BdmFpbGFibGUiOjY4NDA4LCJDYWNoZWQiOjI0OTc2LCJTaG1lbSI6MTAyMDgsIlJvb21GcmVlIjoxMTAwMH0sIkhXIjp7IlYiOjE1MzkxLCJJIjotMTc3MiwiUkJfSSI6MjM4fX0='}
2023-11-28 12:13:26.345 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Received message from <DEVICE> (172.18.0.19:6668): Message(0x8, {'dps': {'142': 'eyJzd2l0Y2giOiJPTiIsImV2Ijp7InJlbG9jIjp7ImlkIjo0MjAsIm1hcHMiOjMsInJlcyI6Miwic3RhcnQiOjE3MDExOTUxNTYsImVuZCI6MTcwMTE5NTE5OH19fQ=='}, 't': 1701195206}, 0, None)
2023-11-28 12:13:26.345 INFO (MainThread) [custom_components.robovac.tuyalocalapi] Received updated state <DEVICE> (172.18.0.19:6668): {'1': True, '2': True, '5': 'auto', '15': 'Running', '101': False, '102': 'Turbo', '103': False, '104': 100, '106': 0, '107': False, '109': 0, '110': 0, '111': 100, '118': True, '122': 'Continue', '128': 'used', '131': False, '135': True, '137': 0, '126': 'eyJzeXNpbmZvIjp7Ik1lbUZyZWUiOjUwMjcyLCJNZW1BdmFpbGFibGUiOjY4NDA4LCJDYWNoZWQiOjI0OTc2LCJTaG1lbSI6MTAyMDgsIlJvb21GcmVlIjoxMTAwMH0sIkhXIjp7IlYiOjE1MzkxLCJJIjotMTc3MiwiUkJfSSI6MjM4fX0=', '142': 'eyJzd2l0Y2giOiJPTiIsImV2Ijp7InJlbG9jIjp7ImlkIjo0MjAsIm1hcHMiOjMsInJlcyI6Miwic3RhcnQiOjE3MDExOTUxNTYsImVuZCI6MTcwMTE5NTE5OH19fQ=='}
2023-11-28 12:13:26.347 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/robovac/tuyalocalapi.py", line 736, in async_gratuitous_update_state
    await self.update_entity_state_cb()
  File "/config/custom_components/robovac/vacuum.py", line 330, in pushed_update_handler
    self.update_entity_values()
  File "/config/custom_components/robovac/vacuum.py", line 362, in update_entity_values
    self._attr_consumables = ast.literal_eval(
                             ^^^^^^^^^^^^^^^^^
KeyError: 'consumable'
MelleD commented 6 months ago

Maybe this fix the error: https://github.com/CodeFoodPixels/robovac/pull/45

But not sure why it decode something but there is no consumable key. I have to test it

jb123567 commented 6 months ago

@MelleD how did you get on with testing?

MelleD commented 6 months ago

The error is gone, but the consumable sometimes there and sometimes not. Maybe I should log the array to see what comes from the vacuumer

MelleD commented 5 months ago

@jb123567

This is the debug output.

So not sure why the Consumables are not working

2024-01-10 20:33:35.182 DEBUG (MainThread) [custom_components.robovac.vacuum] Support Consumables
2024-01-10 20:33:35.182 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumable code is: 142
2024-01-10 20:33:35.182 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumables value is: None
2024-01-10 20:33:35.182 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumable code is: 116
2024-01-10 20:33:35.183 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumables value is: None

And sometimes works

2024-01-10 20:41:25.489 DEBUG (MainThread) [custom_components.robovac.vacuum] Support Consumables
2024-01-10 20:41:25.489 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumable code is: 142
2024-01-10 20:41:25.489 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumables value is: eyJkSW5mbyI6eyJpbmZvVHlwZSI6MTQyfSwic3dpdGNoIjoiT0ZGIn0=
2024-01-10 20:41:25.490 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumables decoded value is: {'dInfo': {'infoType': 142}, 'switch': 'OFF'}
2024-01-10 20:41:25.490 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumable code is: 116
2024-01-10 20:41:25.490 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumables value is: eyJjb25zdW1hYmxlIjp7ImR1cmF0aW9uIjp7IkZNIjoyLCJSQiI6MywiU0IiOjMsIlNTIjozfX0sImRJbmZvIjp7ImluZm9UeXBlIjoxMTYsInJlc3VsdCI6Ik8ifX0=
2024-01-10 20:41:25.491 DEBUG (MainThread) [custom_components.robovac.vacuum] Consumables decoded value is: {'consumable': {'duration': {'FM': 2, 'RB': 3, 'SB': 3, 'SS': 3}}, 'dInfo': {'infoType': 116, 'result': 'O'}}

But is working. But the fan_speed is for me 130

fan_speed_list: Quiet, Standard, Turbo, Max
battery_level: 99
battery_icon: mdi:battery-charging-100
fan_speed: Max
supported_features: 16252
auto_return: true
do_not_disturb: true
boost_iq: true
mode: auto
consumables: 
FM: 2
RB: 3
SB: 3
SS: 3
MelleD commented 4 months ago

I have the feeling that at some point the consumables will no longer be transferred and will only be there again when the vacuum cleaner is driven and docked again. The numbers are probably temporary at some point. The information also sometimes changes in the Eufy app and does not always completely match. That's why I think this is more a Eufy problem. Firmware is up to date.