robovac icon indicating copy to clipboard operation
robovac copied to clipboard

Unexpected error

Open cbasb40 opened this issue 1 year ago • 23 comments
trafficstars

Whatever I do, I keep getting "unexpected error" while adding my Eufy account ; any tips where to start troubleshooting?

cbasb40 avatar Feb 23 '24 16:02 cbasb40

I've just released an update that should provide some better detail in the logs when this happens. If you could update and try again, and check the logs if it still fails

CodeFoodPixels avatar Feb 25 '24 02:02 CodeFoodPixels

Hi, I get this output now ; any idea?

Unexpected exception: 'tuya_home' Traceback (most recent call last): File "/config/custom_components/robovac/config_flow.py", line 151, in async_step_user valid_data = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/robovac/config_flow.py", line 133, in validate_input await hass.async_add_executor_job(get_eufy_vacuums, data) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/robovac/config_flow.py", line 91, in get_eufy_vacuums self[CONF_REGION] = settings_response["setting"]["home_setting"]["tuya_home"][ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'tuya_home'

cbasb40 avatar Feb 27 '24 16:02 cbasb40

Hi, follow up here ; did a new installation in HA OS but get the same error ; could you please advice?

cbasb40 avatar Mar 02 '24 08:03 cbasb40

What vacuum do you have?

It looks like it's failing to get your region from Eufy so that I can log in.

On Sat, 2 Mar 2024, 08:53 cbasb40, @.***> wrote:

Hi, follow up here ; did a new installation in HA OS but get the same error ; could you please advice?

— Reply to this email directly, view it on GitHub https://github.com/CodeFoodPixels/robovac/issues/54#issuecomment-1974734444, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEPFVD5ZYZF4HYWF5KGEITYWGHSFAVCNFSM6AAAAABDXAXX7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUG4ZTINBUGQ . You are receiving this because you commented.Message ID: @.***>

CodeFoodPixels avatar Mar 02 '24 13:03 CodeFoodPixels

Hi,

It's an R550C. I added more details to my account at Eufy, but same result.

cbasb40 avatar Mar 02 '24 15:03 cbasb40

It's not information that you can add, it's information that I had expected Eufy to set but hasn't. I'll have to do some investigation

On Sat, 2 Mar 2024, 15:36 cbasb40, @.***> wrote:

Hi,

It's an R550C. I added more details to my account at Eufy, but same result.

— Reply to this email directly, view it on GitHub https://github.com/CodeFoodPixels/robovac/issues/54#issuecomment-1974831663, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEPFVABCNO4L3MTVTWWE73YWHWZLAVCNFSM6AAAAABDXAXX7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUHAZTCNRWGM . You are receiving this because you commented.Message ID: @.***>

CodeFoodPixels avatar Mar 02 '24 16:03 CodeFoodPixels

If you need some additional logging or anything else, let me know, glad to help :)

cbasb40 avatar Mar 02 '24 16:03 cbasb40

Adding just in case it is valuable. I just got a new X10 Pro Omni and am having the same issue. Log looks to be the same, but in case I missed something: Traceback (most recent call last): File "/config/custom_components/robovac/config_flow.py", line 151, in async_step_user valid_data = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/robovac/config_flow.py", line 133, in validate_input await hass.async_add_executor_job(get_eufy_vacuums, data) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/robovac/config_flow.py", line 91, in get_eufy_vacuums self[CONF_REGION] = settings_response["setting"]["home_setting"]["tuya_home"][ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'tuya_home'

damfuu avatar Mar 05 '24 21:03 damfuu

Could you both try v1.2.8 please?

CodeFoodPixels avatar Mar 08 '24 14:03 CodeFoodPixels

Hi @CodeFoodPixels , I can successfully login now but it doesn't show my registered device (in the app on my phone it does). Do I miss something?

additional logging;

2024-03-08 16:31:40.610 DEBUG (SyncWorker_16) [custom_components.robovac.config_flow] Vacuum 93f2b722-44b0-430d-a449-792ca128b663 found on Eufy, but not on Tuya. Skipping.

cbasb40 avatar Mar 08 '24 15:03 cbasb40

Could you turn on debug logging and try re-configuring please? Then have a look in the logs

On Fri, 8 Mar 2024, 15:26 cbasb40, @.***> wrote:

Hi @CodeFoodPixels https://github.com/CodeFoodPixels , I can successfully login now but it doesn't show my registered device (in the app on my phone it does). Do I miss something?

— Reply to this email directly, view it on GitHub https://github.com/CodeFoodPixels/robovac/issues/54#issuecomment-1985892692, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEPFVABULRQE2YVMUZN2F3YXHKEBAVCNFSM6AAAAABDXAXX7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBVHA4TENRZGI . You are receiving this because you were mentioned.Message ID: @.***>

CodeFoodPixels avatar Mar 08 '24 16:03 CodeFoodPixels

Could you turn on debug logging and try re-configuring please? Then have a look in the logs On Fri, 8 Mar 2024, 15:26 cbasb40, @.> wrote: Hi @CodeFoodPixels https://github.com/CodeFoodPixels , I can successfully login now but it doesn't show my registered device (in the app on my phone it does). Do I miss something? — Reply to this email directly, view it on GitHub <#54 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEPFVABULRQE2YVMUZN2F3YXHKEBAVCNFSM6AAAAABDXAXX7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBVHA4TENRZGI . You are receiving this because you were mentioned.Message ID: @.>

additional logging;

2024-03-08 16:31:40.610 DEBUG (SyncWorker_16) [custom_components.robovac.config_flow] Vacuum 93f2b722-44b0-430d-a449-792ca128b663 found on Eufy, but not on Tuya. Skipping.

that's what I see when I add the account. Is this enough?

cbasb40 avatar Mar 08 '24 17:03 cbasb40

2024-03-08 16:31:40.610 DEBUG (SyncWorker_16) [custom_components.robovac.config_flow] Vacuum 93f2b722-44b0-430d-a449-792ca128b663 found on Eufy, but not on Tuya. Skipping.

that's what I see when I add the account. Is this enough?

Also seeing a similar error after adding the X10 Pro Omni (T2351) to robovac.py. Let me know if I can help get the X10 supported.

russilker avatar Mar 08 '24 20:03 russilker

L35 Hybrid+ not able to add eufy account on version 1.2.8. Returns Unexpected Error

bach37strad avatar Mar 16 '24 07:03 bach37strad

Can you turn on debug logging, try again and then look at the logs please.

On Sat, 16 Mar 2024, 07:03 bach37strad, @.***> wrote:

L35 Hybrid+ not able to add eufy account on version 1.2.8. Returns Unexpected Error

— Reply to this email directly, view it on GitHub https://github.com/CodeFoodPixels/robovac/issues/54#issuecomment-2001882144, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEPFVEXIJSMECPY4RSDK2DYYPVD3AVCNFSM6AAAAABDXAXX7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBRHA4DEMJUGQ . You are receiving this because you were mentioned.Message ID: @.***>

CodeFoodPixels avatar Mar 16 '24 10:03 CodeFoodPixels


2024-03-16 16:37:21.766 ERROR (MainThread) [custom_components.robovac.config_flow] Unexpected exception: 'region'
Traceback (most recent call last):
  File "/config/custom_components/robovac/config_flow.py", line 184, in async_step_user
    valid_data = await validate_input(self.hass, user_input)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/config_flow.py", line 166, in validate_input
    await hass.async_add_executor_job(get_eufy_vacuums, data)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/config_flow.py", line 109, in get_eufy_vacuums
    self[CONF_COUNTRY_CODE] = get_phone_code_by_region(self[CONF_REGION])
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/countries.py", line 212, in get_phone_code_by_region
    country = next((item for item in COUNTRIES if item["region"] == region), None)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/countries.py", line 212, in <genexpr>
    country = next((item for item in COUNTRIES if item["region"] == region), None)
                                                  ~~~~^^^^^^^^^^
KeyError: 'region'

bach37strad avatar Mar 16 '24 20:03 bach37strad

Rolled back to 1.2.4 and was able to login and the l35 was immediately identified. However, the device shows up immediately as unavailable regardless of standard or reserved ip address. Not sure what this debug info means. I'm not great with python.


2024-03-18 22:09:23.579 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Processing queue. Current length: 1
2024-03-18 22:09:23.579 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to ebf2204b4477b5da80ameg (:6668): Message(0x7, {'devId': 'ebf2204b4477b5da80ameg', 'uid': '', 't': 1710814163, 'dps': {'5': 'auto'}}, 324880961, <Device ebf2204b4477b5da80ameg (:6668)>)
2024-03-18 22:09:23.579 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Connecting to ebf2204b4477b5da80ameg (:6668)
2024-03-18 22:09:23.580 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Retrying send due to error. Connection to ebf2204b4477b5da80ameg (:6668) failed: [Errno 111] Connection refused
2024-03-18 22:09:23.830 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to ebf2204b4477b5da80ameg (:6668): Message(0x7, {'devId': 'ebf2204b4477b5da80ameg', 'uid': '', 't': 1710814163, 'dps': {'5': 'auto'}}, 324880961, <Device ebf2204b4477b5da80ameg (:6668)>)
2024-03-18 22:09:23.831 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Connecting to ebf2204b4477b5da80ameg (:6668)
2024-03-18 22:09:23.831 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Retrying send due to error. Connection to ebf2204b4477b5da80ameg (:6668) failed: [Errno 111] Connection refused
2024-03-18 22:09:24.083 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Sending to ebf2204b4477b5da80ameg (:6668): Message(0x7, {'devId': 'ebf2204b4477b5da80ameg', 'uid': '', 't': 1710814163, 'dps': {'5': 'auto'}}, 324880961, <Device ebf2204b4477b5da80ameg (:6668)>)
2024-03-18 22:09:24.083 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] Connecting to ebf2204b4477b5da80ameg (:6668)
2024-03-18 22:09:24.083 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi] 1 failures. Most recent: Connection to ebf2204b4477b5da80ameg (:6668) failed: [Errno 111] Connection refused

bach37strad avatar Mar 19 '24 02:03 bach37strad

Latest version has a fix for this

CodeFoodPixels avatar Mar 20 '24 22:03 CodeFoodPixels

same issue with 1.2.9

2024-03-21 03:06:40.244 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Processing queue. Current length: 1
2024-03-21 03:06:40.244 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Sending to ebf2204b4477b5da80ameg (:6668): Message(0x7, {'devId': 'ebf2204b4477b5da80ameg', 'uid': '', 't': 1711004800, 'dps': {'5': 'auto'}}, 515517594, <Device ebf2204b4477b5da80ameg (:6668)>)
2024-03-21 03:06:40.245 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Connecting to ebf2204b4477b5da80ameg (:6668)
2024-03-21 03:06:40.245 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Retrying send due to error. Connection to ebf2204b4477b5da80ameg (:6668) failed: [Errno 111] Connection refused
2024-03-21 03:06:40.495 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Sending to ebf2204b4477b5da80ameg (:6668): Message(0x7, {'devId': 'ebf2204b4477b5da80ameg', 'uid': '', 't': 1711004800, 'dps': {'5': 'auto'}}, 515517594, <Device ebf2204b4477b5da80ameg (:6668)>)
2024-03-21 03:06:40.495 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Connecting to ebf2204b4477b5da80ameg (:6668)
2024-03-21 03:06:40.495 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Retrying send due to error. Connection to ebf2204b4477b5da80ameg (:6668) failed: [Errno 111] Connection refused
2024-03-21 03:06:40.746 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Sending to ebf2204b4477b5da80ameg (:6668): Message(0x7, {'devId': 'ebf2204b4477b5da80ameg', 'uid': '', 't': 1711004800, 'dps': {'5': 'auto'}}, 515517594, <Device ebf2204b4477b5da80ameg (:6668)>)
2024-03-21 03:06:40.746 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Connecting to ebf2204b4477b5da80ameg (:6668)
2024-03-21 03:06:40.746 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] 1 failures. Most recent: Connection to ebf2204b4477b5da80ameg (:6668) failed: [Errno 111] Connection refused

bach37strad avatar Mar 21 '24 07:03 bach37strad

Remove and re-add your vacuum and that should sort it

CodeFoodPixels avatar Mar 22 '24 00:03 CodeFoodPixels

Tried removeing and re-adding, and completely removing both the integration and HACS package and starting from scratch, unfortunately to no avail.

2024-03-22 22:59:52.408 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Processing queue. Current length: 1
2024-03-22 22:59:52.408 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Sending to ebf2204b4477b5da80ameg (:6668): Message(0x7, {'devId': 'ebf2204b4477b5da80ameg', 'uid': '', 't': 1711162792, 'dps': {'5': 'auto'}}, 673509744, <Device ebf2204b4477b5da80ameg (:6668)>)
2024-03-22 22:59:52.408 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Connecting to ebf2204b4477b5da80ameg (:6668)
2024-03-22 22:59:52.408 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Retrying send due to error. Connection to ebf2204b4477b5da80ameg (:6668) failed: [Errno 111] Connection refused
2024-03-22 22:59:52.659 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Sending to ebf2204b4477b5da80ameg (:6668): Message(0x7, {'devId': 'ebf2204b4477b5da80ameg', 'uid': '', 't': 1711162792, 'dps': {'5': 'auto'}}, 673509744, <Device ebf2204b4477b5da80ameg (:6668)>)
2024-03-22 22:59:52.659 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Connecting to ebf2204b4477b5da80ameg (:6668)
2024-03-22 22:59:52.660 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Retrying send due to error. Connection to ebf2204b4477b5da80ameg (:6668) failed: [Errno 111] Connection refused
2024-03-22 22:59:52.910 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Sending to ebf2204b4477b5da80ameg (:6668): Message(0x7, {'devId': 'ebf2204b4477b5da80ameg', 'uid': '', 't': 1711162792, 'dps': {'5': 'auto'}}, 673509744, <Device ebf2204b4477b5da80ameg (:6668)>)
2024-03-22 22:59:52.910 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] Connecting to ebf2204b4477b5da80ameg (:6668)
2024-03-22 22:59:52.910 DEBUG (MainThread) [custom_components.robovac.tuyalocalapi.ebf2204b4477b5da80ameg] 1 failures. Most recent: Connection to ebf2204b4477b5da80ameg (:6668) failed: [Errno 111] Connection refused

bach37strad avatar Mar 23 '24 03:03 bach37strad

The (:6668) should be the IP address and port, like (192.168.0.123:6668). This suggests that you don't have an IP configured for your vacuum

CodeFoodPixels avatar Mar 23 '24 03:03 CodeFoodPixels

I'm at a loss. I've followed the instructions everytime including configuring the ip after installing the integration.

After poking around some more I found many references to a CONF_IP_ADDRESS and took a shot by adding it to the const.py so now it reads:

"""Constants for the Eufy Robovac integration."""

DOMAIN = "robovac"
CONF_VACS = "vacuums"
CONF_AUTODISCOVERY = "autodiscovery"
CONF_IP_ADDRESS = "192.168.68.74"
REFRESH_RATE = 60
PING_RATE = 10
TIMEOUT = 5

and miraculously that seemed to do it for me! I have no idea why it wouldn't configure in the integrations GUI for me.

bach37strad avatar Mar 23 '24 06:03 bach37strad