The hassio (supervisor) integration should be able to create devices with entities to represent itself (supervisor) the host and the installed add-ons.
Home Assistant is an awesome tool for data collection and automation, so why is it so “hard” to use the data that the supervisor has, in Home Assistant.
There are multiple topics regarding getting and reacting on the data from the supervisor, here are some example:
It would be great if the hassio (supervisor) integration set up this automagically for installations that have it so these workarounds were not needed.
For the supervisor device we should have:
Version sensor(s)
Usage metrics (CPU/RAM)
For the host device we should have:
Storage sensor(s)
Version sensor(s) (if HAOS)
For add-ons we should have 1 device for each installed add-on with:
Version sensor(s)
Usage metric sensors (CPU/RAM)
Start/Stop Switch (this will include the running/stopped state)
Specific services based on capabilities (stdin for instance)
There are probably more to it then what I see, but this is my WTH regarding this
I spent a number of hours setting up started/not started binary sensors for my critical addons just yesterday. So yes this would be a welcome addition. +1
Also
would be a lot easier than using the portainer addon to determine where a resource hog is.
Is there a way to get container start times as well? I had to do some goofy work around to get a relative time for the last time home assistant was restarted.
I tried adding this yesterday and it worked great, was almost ready to make a PR to expose that to the /info endpoints of add-ons and the core container, but on update/restart of the supervisor that data is not kept and needs to be re-indexed somewhere (on a SU restart the data just showed None), not yet sure where so I gave up on that for now.
I just got HA set up again but the new zwave add-on fails to start at boot and will sometimes crash if it gets overloaded. So I’ve found myself looking for a way to simply check the state of the add-on and potentially restart it automatically. Hard to believe this still isn’t easily doable. I wrote a custom component more than a year ago that simply extended the hassio component to add switches and sensors but it’s apparently broken now. I might have to try to get it working again.
Edit: Just after posting I see the add-on has a “Watchdog” option to restart when crashing. That at least addresses my needs for now, but I still think it would be nice to have this info more readily available within Home Assistant.