What would be the best way to monitor if certain addons are running?
I’ve had 2-3 cases where deconz wasn’t running and I’d like to monitor that so I can react if necessary.
I was thinking possibly through a sensor which I can use in automations, I’m open to other options though.
Another idea… you could consider Portainer. I run it as a separate Docker container, but there is also an HA Addon which you could install. It shows all the Docker containers and their status. Also gives access to the logs which can be handy.
Thanks for sharing . This code worked for me. For your information I use it as a condition to only show certain input fields in my Lovelace interface when node red is started.
- platform: rest
resource: http://<local ip address>:8123/api/hassio/addons/a0d7b954_nodered/info
name: status nodered
value_template: '{{ value_json.data.state }}'
headers:
Authorization: !secret rest_command_secret
Content-Type: application/json
I do not use https as as this is all local for me. Also I have stored my authorization key in my secrets file as I use it for other api calls as well.
Settings → Devices & Entities → Home Assistant Supervisor → on the screen xxx entities (click on these) →
Search for binary_sensor.xxx_running, where xxx will be something like nodered or a0d7b954_nodered → Click on that → Cog wheel right upper corner → enable → update