Closed iankaufmann closed 1 year ago
I am seeing the same issue
I am not sure what to do with the addon as of right now as it appears the dev that makes amcrest2mqtt seems to have disappeared, https://github.com/dchesterton/amcrest2mqtt/issues/96 and the API seems to have changed. I myself do not have an amcrest device or I would have just forked it, if anyone knows of a more up to date amcrest2mqtt fork I can base the addon on let me know
What I ended up doing was going to "Settings > Devices & Integrations > Devices > amcrest2mqtt" and then enabling the binary sensor for "running".
Then I set up this automation:
- id: monitor_amcrest2mqtt_off
alias: Monitor - amcrest2mqtt - off
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.amcrest2mqtt_running
to: 'off'
for: '00:00:10'
action:
- alias: "Try to restart amcrest2mqtt until running"
repeat:
until: "{{ is_state('binary_sensor.amcrest2mqtt_running', 'on') or index > 5 }}"
sequence:
- service: hassio.addon_restart
data:
addon: 3490a758_amcrest2mqtt-addon
- delay:
seconds: 30
I didn't realize the API has changed. I don't plan on updating my AD410 unless there is a good reason to. I have it blocked from the internet and don't use their app or anything. Just pipe it into BlueIris via RTSP, and then I use this addon to get button press events so I can trigger the doorbell sound through multiple sonos speakers in the house.
Add-on version: 2022.5.1 You are running the latest version of this add-on. System: Home Assistant OS 9.5 (amd64 / qemux86-64) Home Assistant Core: 2023.1.7 Home Assistant Supervisor: 2023.01.1
I have noticed this happen a few times over the last month that I've been using the addon (I used to just run it in a self-managed docker container and never had an issue).
I will notice that all of a sudden the addon is stopped, and the logs only contain a cryptic unexpected error.
I have the "watchdog" option turned on, but it doesn't seem to actually revive the addon. However, hitting "start" manually turns the addon back on without any issues, then it works for a week or so before happening again.
Edit: I caught the log this time and will paste it below. It looks like it is happening when the doorbell can't be reached in 6 seconds. I guess my question is why that kills the addon and why it doesn't get restarted by the watchdog.