TECH7Fox / asterisk-hass-integration

Asterisk integration for Home Assistant
57 stars 13 forks source link

The integration stop updating entities over time #71

Closed felipecrs closed 1 year ago

felipecrs commented 1 year ago

This seems to happen when the Asterisk server is restarted, but I think it also happens occasionally.

The work around is to restart the integration, which is a little unfortunate. =/

Because of this, I can't reliably use this integration to detect when someone rings my doorbell so I can send notifications.

Work around is to use another integration for such trigger, like the Dahua integration, but it unfortunately is rather slow to refresh the button pressed state.

wolfwander commented 1 year ago

Could you please post the logs of the integration when this happens? I have made and automation that warns me when the connection to Asterisk server is lost.

felipecrs commented 1 year ago

I also made something similar:

alias: Reload Asterisk integration when it disconnects
trigger:
  - platform: state
    entity_id:
      - sensor.asterisk_server
    to: Disconnected
    for:
      hours: 0
      minutes: 0
      seconds: 5
action:
  - service: homeassistant.reload_config_entry
    target:
      device_id: 1e5c1e55c2aec7670f61f2cb46b801c5
    alias: Reload Asterisk integration
mode: single

And it works nice after having this automation enabled. But I'll try to get logs here for when it happens.

TECH7Fox commented 1 year ago

Guessing because it fails to stay connected and crashes. Planning on remaking the entire integration with a new library. It's kind of a mess right now anyways.

andyboeh commented 1 year ago

The workaround and @TECH7Fox's comment is great news, I was about to post the same issue. I noticed that it breaks when I restart Asterisk (I just had to), so I'm going to use the automation for now.

TECH7Fox commented 1 year ago

Should be fixed in v1.0.2

felipecrs commented 1 year ago

I have deleted my automation and I'm now relying on the integration. So far it has been working great. Thank you!