WTH: Why is there no supervisor devices/entities?

I know why, no one has added them, but why not?

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:

All these topics exist because someone wanted this information inside Home Assistant and/or found a way to react to it.

Not only is the supervisor and the connection from Home Assistant more than capable to provide this, but so much more https://github.com/home-assistant/supervisor/blob/7e1b179cdd2c0f99a632097bd41749e68ecb00d9/API.md

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 :tada:

Add started/not started to this.

You have my vote.

2 Likes

The switch state already tell you that, no need for a separate entity.

Yes, forgot about that. Anyway, a good WTH.

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.

Not sure, but if it is it should be added to the /info endpoints as "start_time": <datetime string>

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.

2 Likes

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.