Profile change after restart
Posted: Mon Mar 30, 2020 11:35 am
I'm using my home automation (Openhab) to control active profiles in BI. I use various profiles depending on the situation: No one at home daytime, only children at home during night, etc. I have the home automation system change profile e.g. when my or my wifes mobilephone connects to the WIFI (i.e. when profile in BI was set to e.g. "Parents Away, daytime"). I use the MQTT connection and http-API in BI for this inter-system communication.
One problem with this setup is when BI for whatever reason is restarted. Not a big problem when I'm doing the restarting, but I've also seen restarts initiated by BI itself (Can be seen in the log). Profile is then set to profile 1 (which I for example am not using in any of the scenarious controlled by the home automation system). This then stays the profile until a condition is met to iniate a change of profile (e.g. sundown) by the automation system. This can take many hours if I'm unlucky.
To solve this problem I'm monitoring the MQTT-topic "BlueIris/app". The payload "running" is sent when BI has been (re-)started. I then put a delay of 20 seconds to allow full startup, and then I have my home automation software tell BI to activate the profile that was active before the restart.
This works fine for me, but I would appreciate any comments on how there might be better/simpler/more reliable solutions out there.
One problem with this setup is when BI for whatever reason is restarted. Not a big problem when I'm doing the restarting, but I've also seen restarts initiated by BI itself (Can be seen in the log). Profile is then set to profile 1 (which I for example am not using in any of the scenarious controlled by the home automation system). This then stays the profile until a condition is met to iniate a change of profile (e.g. sundown) by the automation system. This can take many hours if I'm unlucky.
To solve this problem I'm monitoring the MQTT-topic "BlueIris/app". The payload "running" is sent when BI has been (re-)started. I then put a delay of 20 seconds to allow full startup, and then I have my home automation software tell BI to activate the profile that was active before the restart.
This works fine for me, but I would appreciate any comments on how there might be better/simpler/more reliable solutions out there.