robovac icon indicating copy to clipboard operation
robovac copied to clipboard

L60 Support

Open damianolombardo opened this issue 9 months ago • 10 comments

damianolombardo avatar Feb 23 '25 14:02 damianolombardo

I am getting the following error after entering my eufy username and password.

Unexpected exception: 'device'

Traceback (most recent call last):
  File "/config/custom_components/robovac/config_flow.py", line 141, in get_eufy_vacuums
    device = tuya_client.get_device(item["device"]["id"])
                                    ~~~~^^^^^^^^^^
KeyError: 'device'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/robovac/config_flow.py", line 185, in async_step_user
    valid_data = await validate_input(self.hass, user_input)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/config_flow.py", line 167, in validate_input
    await hass.async_add_executor_job(get_eufy_vacuums, data)
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/robovac/config_flow.py", line 157, in get_eufy_vacuums
    item["device"]["id"]
    ~~~~^^^^^^^^^^
KeyError: 'device'

hsemenenko avatar Mar 09 '25 18:03 hsemenenko

Do you get that on the master branch too? I have tested this and have another person using this branch without this issue coming up?

damianolombardo avatar Mar 10 '25 23:03 damianolombardo

I do not get the same error on the master branch. It has also been reported by someone else here: https://github.com/CodeFoodPixels/robovac/issues/112#issuecomment-2683137921

By removing ["device"] from line 141 of config_flow.py the error goes away and I can connect to the vacuum. However, it shows the status incorrectly i.e. shows cleaning when docked.

hsemenenko avatar Mar 11 '25 21:03 hsemenenko

Works fine here. Installed the branch from the PR, I have 2 L60's running here. Maybe it's got something to do with that? Having a single or multiple Robovac devices?

temp avatar Jul 29 '25 12:07 temp

Although I have seen in another PR here (https://github.com/CodeFoodPixels/robovac/pull/64/files#diff-1a399db0f45c880538b174870af4a32a874c68567066d843c79217af7f4613b3L135) that there are also changes to devices / device inside config_flow.

temp avatar Jul 29 '25 12:07 temp

I'm not a python developer, but want to help - what can I do to output the item array?

temp avatar Jul 29 '25 12:07 temp

Ok, found it. Code is only executed on config. This is the structure from device_response:

{
  "res_code": 1,
  "message": "",
  "devices": [
    {
      "id": "...",
      ...
    },{
      "id": "...",
    }
  ]
}

So yes, the ["device"] should be removed. Also on lines 157 and 160.

temp avatar Jul 29 '25 12:07 temp

Would this also include support for the L60 hybrid? Since this also does mopping i assume some additional changes are required. If not i'd be happy to pick it up as a separate PR

PixNyb avatar Oct 01 '25 18:10 PixNyb

Maybe some base classes for the separate device classes could make sense

Patrick762 avatar Oct 29 '25 19:10 Patrick762

I get the following exception from the tuya part:

{'t': [...], 'success': False, 'errorCode': 'PERMISSION_DENIED', 'status': 'error', 'errorMsg': 'No access'}

Is there something else that changed?

Or does this need time after the initial device setup in the app?

Patrick762 avatar Oct 29 '25 21:10 Patrick762