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

Detected entities are orphaned #13

Closed
boctok opened this issue Jul 22, 2021 · 2 comments
Closed

Detected entities are orphaned #13

boctok opened this issue Jul 22, 2021 · 2 comments
Assignees

Comments

@boctok
Copy link

boctok commented Jul 22, 2021

After fresh install everything installed correctly, as best I can tell, and everything (except the smart lock) was detected. Unfortunately, many things are coming up unavailable.

Devices list:
T8210 - Doorbell - all detected entities available (battery, motion, wifi), but no camera feed
T8510 - Smart lock - Wifi signal avail, battery not avail, motion and person detection obviously not avail
T8910 - Motion sensor - none of the entities are available (motion, battery, wifi)
T8410 - Indoor camera (x2) - motion available, wifi entity unavailable, no camera feed
T8114 - Outdoor camera (x2) - all detected entities available (battery, motion, wifi), but no camera feed

Log error entries after reboot:

`Logger: homeassistant.components.camera
Source: custom_components/eufy_security/camera.py:124
Integration: Camera (documentation, issues)
First occurred: 1:15:02 AM (2 occurrences)
Last logged: 1:27:22 AM

Error while setting up eufy_security platform for camera
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/eufy_security/camera.py", line 76, in async_setup_entry
_LOGGER.debug(f"{DOMAIN} - camera setup entries - {entities}")
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 803, in repr
return f"<Entity {self.name}: {self.state}>"
File "/config/custom_components/eufy_security/camera.py", line 124, in state
self.entity["rtspStream"] == True
KeyError: 'rtspStream'`

`Logger: homeassistant.components.sensor
Source: custom_components/eufy_security/sensor.py:86
Integration: Sensor (documentation, issues)
First occurred: 1:15:02 AM (4 occurrences)
Last logged: 1:27:22 AM

Error adding entities for domain sensor with platform eufy_security
Error while setting up eufy_security platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 383, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 588, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 666, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 419, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 453, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 425, in _stringify_state
state = self.state
File "/config/custom_components/eufy_security/sensor.py", line 86, in state
return self.entity[self.key]
KeyError: 'battery'`

`Logger: homeassistant.components.binary_sensor
Source: custom_components/eufy_security/binary_sensor.py:77
Integration: Binary sensor (documentation, issues)
First occurred: 1:15:02 AM (6 occurrences)
Last logged: 1:27:23 AM

Error adding entities for domain binary_sensor with platform eufy_security
Error while setting up eufy_security platform for binary_sensor
eufy_security: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 383, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 588, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 666, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 419, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 453, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 425, in _stringify_state
state = self.state
File "/config/custom_components/eufy_security/binary_sensor.py", line 77, in state
return self.entity[self.key]
KeyError: 'personDetected'`

`This error originated from a custom integration.

Logger: custom_components.eufy_security
Source: custom_components/eufy_security/websocket.py:67
Integration: Eufy Security (documentation, issues)
First occurred: 1:15:01 AM (130 occurrences)
Last logged: 1:51:10 AM

eufy_security - Exception - process_messages : 'serialNumber' - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/websocket.py", line 65, in process_messages await self.on_message(msg) File "/config/custom_components/eufy_security/websocket.py", line 81, in on_message await self.message_callback(message) File "/config/custom_components/eufy_security/coordinator.py", line 143, in on_message serial_number = message["serialNumber"] KeyError: 'serialNumber'
eufy_security - Exception - process_messages : 'personDetected' - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/websocket.py", line 65, in process_messages await self.on_message(msg) File "/config/custom_components/eufy_security/websocket.py", line 81, in on_message await self.message_callback(message) File "/config/custom_components/eufy_security/coordinator.py", line 170, in on_message self.async_set_updated_data(self.data) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 287, in async_set_updated_data update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 419, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 453, in _async_write_ha_state state = self._stringify_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 425, in _stringify_state state = self.state File "/config/custom_components/eufy_security/binary_sensor.py", line 77, in state return self.entity[self.key] KeyError: 'personDetected'
eufy_security - Exception - process_messages : 'motionDetected' - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/websocket.py", line 65, in process_messages await self.on_message(msg) File "/config/custom_components/eufy_security/websocket.py", line 81, in on_message await self.message_callback(message) File "/config/custom_components/eufy_security/coordinator.py", line 170, in on_message self.async_set_updated_data(self.data) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 287, in async_set_updated_data update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 419, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 453, in _async_write_ha_state state = self._stringify_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 425, in _stringify_state state = self.state File "/config/custom_components/eufy_security/binary_sensor.py", line 77, in state return self.entity[self.key] KeyError: 'motionDetected'`

@fuatakgun fuatakgun self-assigned this Jul 22, 2021
@fuatakgun fuatakgun added the bug label Jul 22, 2021
@fuatakgun
Copy link
Owner

fuatakgun commented Jul 22, 2021

i have updated codebase so that cameras should work. I will continue working on adding more support to other devices. please get latest changes from HACS, restart your HA instance and keep us updated.

@fuatakgun
Copy link
Owner

orphaned entities should be resolved

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

No branches or pull requests

2 participants