There is one thing I don’t understand.
I have a script which is executed every minute (exec binding) with a exit code of 0, 1 or 2.
The event log shows every change of the Item bound to the Thing:
Thing exec:command:net_pres_smith20 “OpenHab2 (Server 01)” @ “H_UG_Büro” [command="/etc/openhab2/scripts/10_network_presence.sh 192.168.x.x", interval=60, timeout=30]
Group g_typ_autm
Group g_net_pres
Group g_typ_srvr
Number png_pres_smith20 “OpenHab2 (Server 01)” <it_server> (g_net_pres, g_typ_srvr, g_typ_autm)
{ channel=“exec:command:net_pres_smith20:exit” }
and a mysql.persist:
Strategies {
// if no strategy is specified for an item entry below, the default list will be used
everyMin05 : "0 */5 * * * ?"
default = everyChange
}
Items {
// persist all items once a day and on every change and restore them from the db at startup
* : strategy = everyChange, restoreOnStartup
// additionally, persist g_net_pres every 5 minutes
g_net_pres* : strategy = everyChange, everyMin05, restoreOnStartup
}
So far so good, everything works well. As long as the exit code of the script doesn’t change it’s value (i.e. “2”) every 5 Minutes the value “2” is persisted.
If the exit code of the script changes to “0” this is persisted with “0” and the timestamp of the change.
If the script continues with an exit code of “0” this is not persisted every 5 minutes with “0”. It is persisted with the old value of “2”.
Any ideas?