marcelwestrahome / home-assistant-niu-component

niu scooter integration for Home assistant.
Apache License 2.0
47 stars 30 forks source link

Timeout after 30 seconds when not being able to fetch data from NIU #3

Closed larsren73 closed 4 years ago

larsren73 commented 4 years ago

I have tested your component for NIU scooter integration and it seems to work OK, but lately I am experiencing problems with my HA instance that perhaps is due to communication locking up occasionally. I have this example in my log:

Logginformation (WARNING) Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:545 Integration: Sensor (documentation, issues) First occurred: 21:06:15 (3 occurrences) Last logged: 21:08:18

Updating niu sensor took longer than the scheduled update interval 0:00:30

Does this mean that the fetching of information does not time out until 30 seconds has passed? Couldn't this potentially lock up the frontend/backend of Home Assistant?

Also I am not aware of how often the values are polled from NIU, perhaps introducing a configuration option for poll interval would be possible to implement?

marcelwestrahome commented 4 years ago

Hi,

disable the following sensors:

- Distance
- RidingTime

may be thats helps. (these sensors are not always available on niu side...)

The 30 seconds is a HA number.

marcelwestrahome commented 4 years ago

solved