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

Versions > 3.2.0 broken: keep loosing connection to devices #1138

Open
unlucio opened this issue Mar 16, 2023 · 7 comments
Open

Versions > 3.2.0 broken: keep loosing connection to devices #1138

unlucio opened this issue Mar 16, 2023 · 7 comments
Labels
diagnostics Waiting device diagnostics

Comments

@unlucio
Copy link

unlucio commented Mar 16, 2023

Hello,
thanks for the great work as this integration worked like a charm for years, yet it's having a bit of troubled last versions:

Every release in the last ~6-to-7 months has had the unfortunate yet annoying issue of randomly loosing connection to all, or some, of my sonoff-mini (I have no other sonoff stuff in my house), and the only way to get them back is to restart the whole HA instance.

Every time I update I have to rollback to 3.2, or I have to keep restarting HA (not a good option, imho) in order to be able to use my house, which is a bit suboptimal 😅

Here are the the latest error logs from 3.4:

2023-03-15 18:40:55.964 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.display_center: Skipping sensor setup Model not found in library (manufacturer: Govee, model: H6110)
2023-03-15 18:40:55.971 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.display_center: Skipping sensor setup: Model not found in library (manufacturer: Govee, model: H6110)
2023-03-15 18:40:55.973 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.display_left: Skipping sensor setup Model not found in library (manufacturer: Govee, model: H6110)
2023-03-15 18:40:55.975 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.display_left: Skipping sensor setup: Model not found in library (manufacturer: Govee, model: H6110)
2023-03-15 18:40:55.976 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.display_right: Skipping sensor setup Model not found in library (manufacturer: Govee, model: H6110)
2023-03-15 18:40:55.978 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.display_right: Skipping sensor setup: Model not found in library (manufacturer: Govee, model: H6110)
2023-03-15 18:40:55.980 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.piano_table: Skipping sensor setup Model not found in library (manufacturer: Govee, model: H6159)
2023-03-15 18:40:55.981 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.piano_table: Skipping sensor setup: Model not found in library (manufacturer: Govee, model: H6159)
2023-03-15 18:40:55.991 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_anteroom: Skipping sensor setup Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:55.992 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_anteroom: Skipping sensor setup: Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:55.994 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_bathroom: Skipping sensor setup Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:55.995 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_bathroom: Skipping sensor setup: Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:55.997 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_bedroom_parentheses: Skipping sensor setup Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:55.999 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_bedroom_parentheses: Skipping sensor setup: Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.000 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_entrance: Skipping sensor setup Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.002 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_entrance: Skipping sensor setup: Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.003 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_kitchen_center: Skipping sensor setup Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.005 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_kitchen_center: Skipping sensor setup: Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.006 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_kitchen_columns: Skipping sensor setup Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.008 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_kitchen_columns: Skipping sensor setup: Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.010 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_livingroom_led_row_1: Skipping sensor setup Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.011 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_livingroom_led_row_1: Skipping sensor setup: Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.013 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_livingroom_led_row_2: Skipping sensor setup Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:56.014 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.sonoff_mini_livingroom_led_row_2: Skipping sensor setup: Model not found in library (manufacturer: SONOFF, model: MINI)
2023-03-15 18:40:58.558 ERROR (MainThread) [homeassistant.components.binary_sensor] rpi_power: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 732, in async_device_update
    await task
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/rpi_power/binary_sensor.py", line 52, in update
    value = self._under_voltage.get()
AttributeError: 'NoneType' object has no attribute 'get'

I'd be awesome if it'd be back to be reliable, and thus being able to safely update again.

@unlucio
Copy link
Author

unlucio commented Mar 16, 2023

Actually neither 3.2.0 works, I just had to downgrade to 3.1 :(

@federicosantolini
Copy link

Same issue here but I cannot downgrade to 3.1. It just fails to work

@unlucio
Copy link
Author

unlucio commented Mar 20, 2023

Actually now I'm having the same problem with 3.1 as well.
And nothing useful in the logs: grepping for "sonoff" it only gives what I'v already posted, and it has nothing to do with this.

This is getting a bit of a pickle since I've to keep checking and restarting HA to get the lights back up, and my family is getting (understandably) very very frustrated by lights randomly not working.

Suggestions form someone of the team would be greatly appreciated.

@Darren-Hill
Copy link

Darren-Hill commented Mar 21, 2023

I've been seeing something similar as well, although in my case it's a single simple Basic2 wifi switch that occasionally disconnects from the integration. In my case restarting either HA or just the integration brings it back fine.

So I made a little automation which keeps watch and does the integration restart if it goes offline.

alias: Sonoff Watchdog
description: Reload integration if the lamp entity becomes unavailable
trigger:
  - platform: state
    entity_id:
      - switch.sonoff
    to: unavailable
    for:
      hours: 0
      minutes: 0
      seconds: 10
condition: []
action:
  - service: homeassistant.reload_config_entry
    data:
      entry_id: 94d103c80c1a770eaea2f4ca69dc598f
  - service: notify.persistent_notification
    data:
      message: Sonoff Watchdog Triggered
mode: single

where the switch.sonoff is a Sonoff controlled entity (my basic2 switch in this case) and entry_id is obtained from the file /config/.storage/core.config_entries accessed via ssh into my HAOS Pi4.

Not a fix I know, but a temporary containment measure that may be of interest whilst things get looked into.

@unlucio
Copy link
Author

unlucio commented Mar 24, 2023

@Darren-Hill that's def a good idea for a momentary patch (and I just put it in place for ease of life).
But still I think there's a bug somewhere that unfortunately no log seems to evidence.

@thefunkygibbon
Copy link

this is great and needs to be more visible over the numerous posts on this issue.
Its a little concerning that none of the devs have piped up and commented on any of them over the few months this has been an issue.
but this is a lifesaver. I didn't know you could restart the service if it was detected unavailable, but of course that makes perfect sense! thank you so much, I can now have a nice warm office in the mornings again.

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 30, 2023

@unlucio all your log not related to this integration. Snow device diagnostics from any sonoff device.

@AlexxIT AlexxIT added diagnostics Waiting device diagnostics and removed question Further information is requested labels Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostics Waiting device diagnostics
Projects
None yet
Development

No branches or pull requests

5 participants