HomeAssistant monitoring plugin

Python appears to be part of at least the SSH addon container if not the base OS. I was able to pip3 install docker but then everything in home assistant got wobbly and I had to reboot. Next I tried a virtual environment and modified the check_mk_agent to activate it. At that point, the checks stopped completing. I gave up on that whole approach since even if the container is running, it doesn’t tell me if my automation failed or if my Sonos is offline (happened last month due to a bug in that integration).

I’ve got working code talking to the HA API. It doesn’t lend itself to easy monitoring. In my case, I’m using Cisco Mobility Express as a device tracker, so every single client shows up as an entity. If I add a new device, discovery will warn on it until I either create a discovery rule or mark it unmonitored. The state information for each device is specific to that device class. Some are numeric measurements, some are text. It will be a trial and error exercise to determine proper state for each device class unless perhaps I can find a decoder ring somewhere in the entity data. I’m only a couple hours into this so there may be a breakthrough waiting.

There is also the observer on http port 4357. It provides 3 very basic status messages for HA subsystems. Since looking at that should be a prerequisite before checking entities, I will likely just start there with beautifulsoup or another web scraper.