Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Errors in Eufy setup with home-assistant #2

Open
jmutnick opened this issue Apr 28, 2018 · 7 comments
Open

Errors in Eufy setup with home-assistant #2

jmutnick opened this issue Apr 28, 2018 · 7 comments

Comments

@jmutnick
Copy link

Getting this error on Home Assistant startup. I have verified my credentials are correct.

2018-04-28 08:03:16 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform eufy
Traceback (most recent call last):
File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/eufy.py", line 20, in setup_platform
add_devices([EufySwitch(discovery_info)], True)
File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/components/switch/eufy.py", line 37, in init
self._switch.connect()
File "/home/pi/homeassistant/lib/python3.5/site-packages/lakeside/init.py", line 201, in connect
return device.connect(self)
File "/home/pi/homeassistant/lib/python3.5/site-packages/lakeside/init.py", line 56, in connect
self.update()
File "/home/pi/homeassistant/lib/python3.5/site-packages/lakeside/init.py", line 218, in update
response = self.get_status()
File "/home/pi/homeassistant/lib/python3.5/site-packages/lakeside/init.py", line 214, in get_status
response = self.send_packet(packet, True)
File "/home/pi/homeassistant/lib/python3.5/site-packages/lakeside/init.py", line 204, in send_packet
return device.send_packet(self, packet, response)
File "/home/pi/homeassistant/lib/python3.5/site-packages/lakeside/init.py", line 74, in send_packet
length = struct.unpack("<H", decrypted_packet[0:2])[0]
struct.error: unpack requires a bytes object of length 2

@jmutnick jmutnick changed the title Errors in Eufy setup with home-assistanrt Errors in Eufy setup with home-assistant Apr 28, 2018
@mjg59
Copy link
Contributor

mjg59 commented Apr 29, 2018

What sort of device is this?

@Desterly
Copy link

Desterly commented May 7, 2018

EDITED:

I'm was getting the same issue
In my case it's a T1202 switch and the send_packet() method called from get_status() is returning 0 bytes in the response, which fails with the above error on struct.unpack (decrypted data also 0).

I ended up unplugging the device, plugging it back in and then it reported correctly.

Apparently if the device goes into an unknown state it will sometimes still connect via wifi but can't control the device state.

@jmutnick
Copy link
Author

jmutnick commented May 7, 2018

I got mine working. It was a missing dependancy. I used pip3 to attempt to install everything in the import statements and it started working fine. Sorry for the false alarm.

@fiservedpi
Copy link

I'm having the same issue on HAssio 0.86.4 with eufy component can you tell me the fix ?

Sat Feb 02 2019 11:36:34 GMT-0500 (Eastern Standard 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()

@fiservedpi
Copy link

fiservedpi commented Feb 18, 2019

Here is my log from a fresh install of HA 0.87.1 on UnRaid with only the eufy component added
https://pastebin.com/3ttqkVsS

@DoctorOctagonapus
Copy link

OK I've created a custom version of the HA Eufy integration with all the unmet dependencies I've found added into the manifest.json for use in HassOS. It works miles better than the official HA integration (read: it actually works at all), but becomes increasingly unreliable the longer HA is running. I can't tell if I've missed something or the problem really is with Lakeside and we're stuck with it until this gets updated.

https://github.com/DoctorOctagonapus/HA-Eufy-Integration/blob/main/manifest.json

@dehnert
Copy link

dehnert commented Nov 19, 2022

Here is my log from a fresh install of HA 0.87.1 on UnRaid with only the eufy component added https://pastebin.com/3ttqkVsS

This log looks like the same issue as #23 ?

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

No branches or pull requests

6 participants