CodeFoodPixels / robovac

Add a Eufy RoboVac easily to Home Assistant
Other
129 stars 28 forks source link

Unexpected error #54

Open cbasb40 opened 7 months ago

cbasb40 commented 7 months ago

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

CodeFoodPixels commented 7 months ago

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

cbasb40 commented 7 months ago

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 commented 7 months ago

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

CodeFoodPixels commented 7 months ago

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: @.***>

cbasb40 commented 7 months ago

Hi,

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

CodeFoodPixels commented 7 months ago

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: @.***>

cbasb40 commented 7 months ago

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

damfuu commented 7 months ago

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'
CodeFoodPixels commented 6 months ago

Could you both try v1.2.8 please?

cbasb40 commented 6 months ago

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.

CodeFoodPixels commented 6 months ago

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: @.***>

cbasb40 commented 6 months ago

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?

russilker commented 6 months ago

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.

bach37strad commented 6 months ago

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

CodeFoodPixels commented 6 months ago

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: @.***>

bach37strad commented 6 months ago

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 commented 6 months ago

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
CodeFoodPixels commented 6 months ago

Latest version has a fix for this

bach37strad commented 6 months ago

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
CodeFoodPixels commented 6 months ago

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

bach37strad commented 6 months ago

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
CodeFoodPixels commented 6 months ago

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

bach37strad commented 6 months ago

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.