Startup test scripts

I love openhab but I have had a few stability issues (some due to my setup, others I’m not really sure). Ideally I would like a script to run on the system startup and just verify all the key parts of my system are working find (a reboot normally fixes everything, so if it’s not working I could just manually bounce it).

I’ve written one to verify z-wave is working great (one of my sockets reports power usage so I can tell when it’s on/off - I simply toggle it and verify the reported power has changed).

I also intend to write some tests for the other bindings I use - Plex, Hue, A hacked together 433 socket controller, my alarm system.

Has anyone else done this before?

I do this sort of. I have two Raspberry Pis with flakey networking. They report to OH over MQTT so I use the MQTT Last Will and Testament to announce to OH that the Pi has died. It then waits a few minutes just to make sure it isn’t an intermittent network outage and if it isn’t back by then it toggles the outlets the Pis are powered by (zwave) off then on to reboot the Pis.

I have just written my test for Hue.

Basically I use an external service (Maker channel on IFTTT) to turn on &off a light, and I verify my hue bindings reflect that.

Working nicely!