Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while setting up platform eufy #16834

Closed
Jdwoodson opened this issue Sep 25, 2018 · 18 comments · Fixed by #21133
Closed

Error while setting up platform eufy #16834

Jdwoodson opened this issue Sep 25, 2018 · 18 comments · Fixed by #21133
Assignees

Comments

@Jdwoodson
Copy link

Home Assistant release with the issue:

Home Assistant
0.78.3

Last working Home Assistant release (if known):
0.77.3

Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io on RasPi3

Component/platform:

https://www.home-assistant.io/components/eufy/

Description of problem:
Have one registered light with Eufy. Prior to 0.78, light worked. After upgrading, the light no longer is found in Home Assistant, and the Eufy platform throws this error on start up.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

# Eufy Platform
eufy:
  username: !secret email
  password: !secret eufy_password

Traceback (if applicable):

Mon Sep 24 2018 22:00:34 GMT-0400 (Eastern Daylight Time)

Error while setting up platform eufy
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/eufy.py", line 31, in setup_platform
    add_entities([EufyLight(discovery_info)], True)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/eufy.py", line 58, in __init__
    self._bulb.connect()
  File "/config/deps/lib/python3.6/site-packages/lakeside/__init__.py", line 128, in connect
    return device.connect(self)
  File "/config/deps/lib/python3.6/site-packages/lakeside/__init__.py", line 66, in connect
    self.update()
  File "/config/deps/lib/python3.6/site-packages/lakeside/__init__.py", line 192, in update
    response = self.get_status()
  File "/config/deps/lib/python3.6/site-packages/lakeside/__init__.py", line 138, in get_status
    packet.sequence = self.get_sequence()
  File "/usr/local/lib/python3.6/site-packages/google/protobuf/internal/python_message.py", line 674, in field_setter
    new_value = type_checker.CheckValue(new_value)
  File "/usr/local/lib/python3.6/site-packages/google/protobuf/internal/type_checkers.py", line 134, in CheckValue
    raise ValueError('Value out of range: %d' % proposed_value)
ValueError: Value out of range: 2348398290

Additional information:

@MartinHjelmare
Copy link
Member

MartinHjelmare commented Sep 25, 2018

Clear your /config/deps/ directory and restart. The lakeside library should be installed under /usr/local/lib on docker/Hass.io.

@Jdwoodson
Copy link
Author

Done, but did not resolve the issue.

Tue Sep 25 2018 23:40:06 GMT-0400 (Eastern Daylight Time)

Error while setting up platform eufy
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/eufy.py", line 31, in setup_platform
    add_entities([EufyLight(discovery_info)], True)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/eufy.py", line 58, in __init__
    self._bulb.connect()
  File "/usr/local/lib/python3.6/site-packages/lakeside/__init__.py", line 128, in connect
    return device.connect(self)
  File "/usr/local/lib/python3.6/site-packages/lakeside/__init__.py", line 66, in connect
    self.update()
  File "/usr/local/lib/python3.6/site-packages/lakeside/__init__.py", line 192, in update
    response = self.get_status()
  File "/usr/local/lib/python3.6/site-packages/lakeside/__init__.py", line 138, in get_status
    packet.sequence = self.get_sequence()
  File "/usr/local/lib/python3.6/site-packages/google/protobuf/internal/python_message.py", line 674, in field_setter
    new_value = type_checker.CheckValue(new_value)
  File "/usr/local/lib/python3.6/site-packages/google/protobuf/internal/type_checkers.py", line 134, in CheckValue
    raise ValueError('Value out of range: %d' % proposed_value)
ValueError: Value out of range: 2443350535

Also tried unplugging and removing the device from the Eufy Home app, then going through the process of readding it, but no luck there as well.

@MartinHjelmare
Copy link
Member

CC @mjg59

@dereitz
Copy link

dereitz commented Dec 4, 2018

I'm having this same issue. I'm not sure which version introduced this issue. Did you ever find a workaround?

@dereitz
Copy link

dereitz commented Dec 16, 2018

The eufy component started working for me again around 0.83/0.84. Anyone else? IMO, I'm thinking this issue could be closed now if so.

@robbrad
Copy link

robbrad commented Dec 21, 2018

Not working for me. I tried it using python3 directly importing lakeside and it worked but not via Home Assistant

Results : https://community.home-assistant.io/t/help-required-with-configuring-eufy-smart-plug-uk/71304/15

Device T1203 is simply not being discovered

@dclobato
Copy link
Contributor

dclobato commented Jan 6, 2019

I'm using eufy bulbs, but listing them explicitly on configuration.yaml, e.g.:

eufy: !include eufy.yaml

and eufy.yaml looks like:

devices:
- address: 10.0.1.101
  name: SBSuite2
  access_token: CBF39XXXXX4212
  type: T1011

I'm on HA 0.84, running on Synology/Docker

@dclobato
Copy link
Contributor

dclobato commented Jan 6, 2019

I'm not sure if this is valid for other setup, but on my Docker, the lakeside requirement on /usr/src/app/requirements_all.txt is for version 0.10

The last version of lakeside is 0.11, and this version is required for detecting T1203-devices. Maybe it's time to update the docker image...

@fiservedpi
Copy link

I'm having the same issue since about 10 days ago HAssio RPi 3 B+ manually adding the component to my configuration.yaml as

eufy: 
       username:
       password:

Error while setting up platform eufy
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/eufy.py", line 31, in setup_platform
    add_entities([EufyLight(discovery_info)], True)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/eufy.py", line 58, in __init__
    self._bulb.connect()
  File "/usr/local/lib/python3.6/site-packages/lakeside/__init__.py", line 128, in connect
    return device.connect(self)
  File "/usr/local/lib/python3.6/site-packages/lakeside/__init__.py", line 66, in connect
    self.update()
  File "/usr/local/lib/python3.6/site-packages/lakeside/__init__.py", line 192, in update
    response = self.get_status()

@tavosansal
Copy link

tavosansal commented Feb 7, 2019

Having the same issue running Home Assistant v0.86.4. For some reason two of my bulbs work great still....but the other ones do not. and throw the same error you guys already entered.

Here is the error:
019-02-07 01:23:22 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform eufy
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/eufy.py", line 31, in setup_platform
    add_entities([EufyLight(discovery_info)], True)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/eufy.py", line 58, in __init__
    self._bulb.connect()
  File "/usr/local/lib/python3.6/site-packages/lakeside/__init__.py", line 128, in connect
    return device.connect(self)
  File "/usr/local/lib/python3.6/site-packages/lakeside/__init__.py", line 65, in connect
    self.s.connect((self.address, 55556))
OSError: [Errno 113] Host is unreachable

If anyone has had luck fixing this I would appreciate some suggestions.

@mjg59
Copy link
Contributor

mjg59 commented Feb 16, 2019

If you're getting the ValueError error, can you try using https://github.com/google/python-lakeside/tree/test_uint32 ?

mjg59 added a commit to mjg59/home-assistant that referenced this issue Feb 16, 2019
@ghost ghost assigned mjg59 Feb 16, 2019
@ghost ghost added the in progress label Feb 16, 2019
@gmalbert
Copy link

@mjg59 Is there anything we can do if we use Docker?

@mjg59
Copy link
Contributor

mjg59 commented Feb 17, 2019

I'm afraid I don't know how the docker images are built

@ghost ghost removed the in progress label Feb 17, 2019
@mjg59
Copy link
Contributor

mjg59 commented Feb 17, 2019

This should be fixed in the next release of Home Assistant. Sorry it took so long - I had something of a conceptual misunderstanding around how Protobufs work and thought this was a much more complicated problem than it actually was.

@fiservedpi
Copy link

Lol those are the most frustrating problems but thanks for your hard work

@dereitz
Copy link

dereitz commented Mar 21, 2019

Was this introduced to a Home Assistant release yet? I'm still having the problem.

@fiservedpi
Copy link

My Eufy bulbs are about as good as they are going to get brightness is wonky but works for the most part seems to fight the original app

@myoung34
Copy link

myoung34 commented May 7, 2019

Hass: 0.92.1
Running via docker latest as of today:
homeassistant/home-assistant latest b66d1a9659c7 10 days ago 2.3GB

2019-05-07 12:56:19 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform eufy
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/eufy/light.py", line 24, in setup_platform
    add_entities([EufyLight(discovery_info)], True)
  File "/usr/src/app/homeassistant/components/eufy/light.py", line 51, in __init__
    self._bulb.connect()
  File "/usr/local/lib/python3.7/site-packages/lakeside/__init__.py", line 128, in connect
    return device.connect(self)
  File "/usr/local/lib/python3.7/site-packages/lakeside/__init__.py", line 65, in connect
    self.s.connect((self.address, 55556))
OSError: [Errno 113] No route to host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.