I am running openhab2 an a raspberry pi with openhabian.
My problem is that several rules are triggered more than once because the tigger fired multiple times.
I deleted all my rules beside a single one using a startup trigger:
rule "openHabInit"
when
System started
then
logInfo("startup.rules", "Startup-Timer started...")
createTimer(now.plusSeconds(30), [|
logInfo("startup.rules", "Startup-Timer expired ... initialise presets") sendBroadcastNotification("exec whitelist workaround")
executeCommandLine("chmod -v 755 /etc/openhab2/misc/exec.whitelist")
])
end
At raspberry pi startup I get the following entries in openhab.log:
…
2020-05-21 17:16:05.527 [INFO ] [o.internal.handler.AstroThingHandler] - Scheduled Positional job astro:sun:local every 300 seconds
2020-05-21 17:16:05.977 [INFO ] [o.internal.handler.AstroThingHandler] - Scheduled Positional job astro:sun:local every 300 seconds
2020-05-21 17:16:09.178 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'openhabianpi' with clientid 8d786094-7f45-45c5-a16e-120ac8e02b4a
2020-05-21 17:16:12.444 [INFO ] [smarthome.model.script.startup.rules] - Startup-Timer started...
2020-05-21 17:16:13.593 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2020-05-21 17:16:13.667 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = f8726efb-3e32-474e-a2fc-0b505c554ff6, base URL = http://localhost:8080)
2020-05-21 17:16:13.839 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2020-05-21 17:16:14.094 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2020-05-21 17:16:19.750 [INFO ] [smarthome.model.script.startup.rules] - Startup-Timer started...
2020-05-21 17:16:42.476 [INFO ] [smarthome.model.script.startup.rules] - Startup-Timer expired ... initialise presets
2020-05-21 17:16:42.514 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine 'chmod -v 755 /etc/openhab2/misc/exec.whitelist'
2020-05-21 17:16:49.760 [INFO ] [smarthome.model.script.startup.rules] - Startup-Timer expired ... initialise presets
2020-05-21 17:16:49.820 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine 'chmod -v 755 /etc/openhab2/misc/exec.whitelist'
As you can see the startup trigger fires twice resulting in two timers…