davesmeghead / visonic

Visonic Custom Component for integration with Home Assistant
Apache License 2.0
92 stars 20 forks source link

No data from panel AND Error unloading entry panel X #71

Closed ElMontyerde closed 1 year ago

ElMontyerde commented 1 year ago

Hi

Hi have been using this integration with no problems until last year. I was having problems receiving data from panel but I hadn't time to check on this. Now I have tried to delete the integration and add it again but I get these errors:

2023-01-12 15:53:33.534 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected because the Ethernet/USB connection was externally terminated.
2023-01-12 15:53:34.538 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Panel 2 for select
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 533, in async_unload
    result = await component.async_unload_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 68, in async_unload_entry
    return await component.async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 181, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2023-01-12 15:53:34.545 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Panel 2 for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 533, in async_unload
    result = await component.async_unload_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 175, in async_unload_entry
    return await component.async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 181, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
2023-01-12 15:53:34.550 ERROR (MainThread) [homeassistant.config_entries] Error unloading entry Panel 2 for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 533, in async_unload
    result = await component.async_unload_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 89, in async_unload_entry
    return await component.async_unload_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 181, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

Panel number is increasing as i add and delete the integration thats why it shows Panel 2 in the logs (I only have one panel)

Those are the log entries when I add the integration:

2023-01-12 16:00:01.093 INFO (MainThread) [custom_components.visonic] Starting Visonic with entry id=947d4fae0dddb0a8069e85e125fe01da configured panels=1
2023-01-12 16:00:32.169 ERROR (MainThread) [custom_components.visonic.pyvisonic] [Controller] Visonic Plugin has suspended all operations, there is a problem with the communication with the panel (i.e. no data has been received from the panel)
2023-01-12 16:00:32.175 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up alarm_control_panel.visonic
2023-01-12 16:00:32.192 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new alarm_control_panel.visonic entity: alarm_control_panel.visonic_alarm_panel_3
davesmeghead commented 1 year ago

This error ERROR Connection Lost : disconnected because the Ethernet/USB connection was externally terminated. means that there's an external problem, the ethernet connection between Home Assistant and your panel has been interrupted and there's nothing I can help with

The other 3 errors are my integration trying to delete the visonic entities but they no longer exist. I cannot check to see if they exist so I just go ahead and remove them just in case to tidy up as the integration terminates.

The panel number increases as HA must still have a record on previous installations of the integration, make sure you delete all instances of the integration before installing it. When it stops (as per the above error) you do not need to install it again, just restart it.

I'd say that the most important thing to do first is to work out what changes in your home network to make it keep disconnecting, did you change your router, or your router location if you rely on wifi perhaps.

Let me know how you get on.

davesmeghead commented 1 year ago

The errors such as "Error unloading entry Panel 2" when trying to delete entities that no longer exist should be fixed in the latest release 0.8.5.0. I have also removed auto panel numbering so users with multiple panels will now need to manually number them. The integration will tell them with an Error if the same panel number has already been used.

I'm going to close this issue, if you have further problem then please create a new Issue with a description of the problem.