Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

2.13 Log errors when motion sensor triggered. #228

Open
Fulch opened this issue Mar 11, 2020 · 6 comments
Open

2.13 Log errors when motion sensor triggered. #228

Fulch opened this issue Mar 11, 2020 · 6 comments

Comments

@Fulch
Copy link

Fulch commented Mar 11, 2020

HA 106.6
Native hue integration setup, only using custom component for remotes.
Only entry referencing 'huesensor' in configuration.yaml .

### hue sensors ###
remote:
  - platform: huesensor
    scan_interval: 2

Get this pair of errors each time a motion sensor is activated, the sensors are paired to the hue hub and are working as I would expect. The log time stamps exactly match the 'detect' and 'clear' event times reported in HA.

2020-03-11 11:32:16 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/huesensor/data_manager.py", line 137, in async_update_from_bridges
self.sensors[dev_id].async_write_ha_state()
KeyError: 'SML_00:17:88:01:03:2b:f8:78-02'
2020-03-11 11:32:31 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/huesensor/data_manager.py", line 137, in async_update_from_bridges
self.sensors[dev_id].async_write_ha_state()
KeyError: 'SML_00:17:88:01:03:2b:f8:78-02'

Thanks for looking.

azogue added a commit to azogue/Hue-sensors-HASS that referenced this issue Mar 11, 2020
With last changes, a detected new device in any bridge was not added
(only those available in platform setup were included), and errors could raise.

* Now we register 'model types' in setup platform, and add to HA the entities
  that match, for each platform.
* If an unregistered device (of a registered model) appears at anytime,
  it is also added to HA.
* If some registered entity is caught in a data update before being added to HA,
  a warning is logged, avoiding the KeyError stated in robmarkcole#224 and robmarkcole#228
@azogue
Copy link
Contributor

azogue commented Mar 11, 2020

Hi @Fulch,

Some things were broken (sorry!) with the last versions. I hope they are fixed with #229. Could you check it before it is released, to be sure?

@Fulch
Copy link
Author

Fulch commented Mar 11, 2020

Hi @azogue,

Have only got one bridge in my setup to test with but am pleased to say no more log errors in response to motion sensor events. Tested my two remotes as well and all looks good!

Thank you very much for such a prompt fix.

@Kugelfang666
Copy link

Will give it a spin tonight. Just a naive question, how do I deploy a non released version to my system. Typically I’m using HACS to deploy CC to my setup...

@azogue
Copy link
Contributor

azogue commented Mar 11, 2020

Hi @Kugelfang666,

how do I deploy a non released version to my system. Typically I’m using HACS to deploy CC to my setup...

If you have access to your ha host (with SAMBA or any other), you should see the CC files in the custom_components folder, so you could download the repo from the unmerged branch in https://github.com/azogue/Hue-sensors-HASS/tree/feature/refactor and replace the files (not sure if it would break HACS for the version handling, though, so use with care)

Maybe @robmarkcole releases it quickly :)

@Kugelfang666
Copy link

so I just updated to the 2.14 an with that all sensors from both bridges seem to be working. Was your proposed PR part of 2.14?

@Kugelfang666
Copy link

so I just updated the CC to 2.14 . while I still encounter the errors in the log something has changed:

ERROR (MainThread) [homeassistant.components.hue.light] Error fetching group data: 
ERROR (MainThread) [homeassistant.components.hue.light] Error fetching light data: 
ERROR (MainThread) [homeassistant.components.hue.sensor_base] Error fetching sensor data:

Error fetching light data: 83x
Error fetching group data: 84x
Error fetching sensor data: 2x

before they always had the same (similar) count...

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

3 participants