Hello,
unfortunately I again face a strange issue in my setup, which - until now - doesn’t make any sense to me…
- Platform information:
- Hardware: x86, 8GB Memory
- OS: Ubuntu 18
- Java Runtime Environment: openjdk “1.8.0_252”
- openHAB version: 2.5.5-1
My Problem:
I’m running Motion Sensors (Ikea Tradfri), connected to a deconz GW, which is connected to openHAB via the HUE Binding.
The motion Sensors “Motion” is a switch item in openhab. Changes to ON trigger a rule to set a presence State for this room. Change on presence State Item (to ON) activates to light (in case all conditions are met). Changes from ON to OFF are inverse. This complex thing was necessary to cover all aspects like various light durations, manuell turn off of the lights, etc. However this rules are normally working pretty good. I have the same construct in some other rooms without any issue.
rule "Presence Bad Motion Sensor detected motion"
when
Item Tradfri_Motion_Sensor_Bad_Motion changed to ON //received updated
then
logInfo("motion Bad", "Motion Sensor Bad changed on to ON, pres_BA state: " + pres_BA.state + "timer_bad: " + timer_bad)
if (pres_BA.state != ON) {
pres_BA.sendCommand(ON)
}
if (timer_bad !== null) {
logInfo("motion Bad","motion change dto ON and a timer was running, canceling timer now")
timer_bad.cancel()
}
timer_bad = null
end
rule "Presence Bad"
when
Item Tradfri_Motion_Sensor_Bad_Motion changed to OFF //received updated
then
var Number delaytime = malt_bad.state as Number
logInfo("motion Bad","Motion Sensor went from ON to OFF")
if (pres_BA.state == ON) {
if (timer_bad !== null) {
logInfo("motion Bad","motion changed to OFF and a timer was running, canceling timer now")
timer_bad.cancel()
}
timer_bad = null
logInfo("motion Bad","initial trigger - setting up timer")
timer_bad = createTimer(now.plusSeconds(delaytime.intValue), [|
pres_BA.sendCommand(OFF)
timer_bad = null
])
}
end
rule "Licht Bad OFF"
when
Item pres_BA changed to OFF // recieve update
then
logInfo("lights Bad","Presenence state changed "+pres_BA.state+" Licht State Bad " + Licht_Bad_State_sw1.state + " enabled via motion = "+ enabled_via_motion)
if (enabled_via_motion && Licht_Bad_State_sw2.state == ON) {
Licht_Bad_State_sw2.sendCommand(OFF)
enabled_via_motion = false
}
end
rule "Licht Bad ON"
when
Item pres_BA changed to ON // recieve update
then
logInfo("lights Bad","Presenence state changed "+pres_BA.state+" current day slot: "+day_slot.state+" current day: "+day_day.state)
if (Licht_Bad_State_sw2.state == OFF && mce_bad.state == ON) {
logInfo("lights Bad","turn homematic Bad switch on")
enabled_via_motion = true
Licht_Bad_State_sw2.sendCommand(ON)
}
end
my problem:
it is working and out of a sudden it stops working.
I can see the Motion sensor items changing
2020-05-23 07:00:17.027 [vent.ItemStateChangedEvent] - Tradfri_Motion_Sensor_Bad_Motion changed from OFF to ON
2020-05-23 07:01:16.906 [vent.ItemStateChangedEvent] - Tradfri_Motion_Sensor_Bad_Motion changed from ON to OFF
But, my rule is not triggered.
in any case the should be the log-line I write in the rule when the motion sensore changed to ON, but greping through my openhab.log doesn’t show it:
grep “Motion Sensor Bad” /var/log/openhab2/openhab.log.7
2020-05-16 17:37:40.595 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-16 17:39:15.005 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: ONtimer_bad: org.eclipse.smarthome.model.script.internal.actions.TimerImpl@5683d66c
2020-05-16 17:40:52.076 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: ONtimer_bad: org.eclipse.smarthome.model.script.internal.actions.TimerImpl@2efa6e78
2020-05-16 17:42:28.652 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: ONtimer_bad: org.eclipse.smarthome.model.script.internal.actions.TimerImpl@6ce5cc1e
2020-05-16 17:48:12.282 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-16 17:49:51.333 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: ONtimer_bad: org.eclipse.smarthome.model.script.internal.actions.TimerImpl@3e9f0002
2020-05-16 17:51:29.290 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: ONtimer_bad: org.eclipse.smarthome.model.script.internal.actions.TimerImpl@5639b437
2020-05-16 17:53:09.341 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: ONtimer_bad: org.eclipse.smarthome.model.script.internal.actions.TimerImpl@61941973
2020-05-16 17:54:46.792 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: ONtimer_bad: org.eclipse.smarthome.model.script.internal.actions.TimerImpl@1d9f4a1b
2020-05-16 17:56:27.947 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: ONtimer_bad: org.eclipse.smarthome.model.script.internal.actions.TimerImpl@71146bcc
2020-05-16 17:58:07.249 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: ONtimer_bad: org.eclipse.smarthome.model.script.internal.actions.TimerImpl@2dc00178
2020-05-16 18:24:59.093 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-16 19:09:38.570 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 20:22:11.755 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 22:06:08.329 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 22:36:26.555 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 22:38:30.639 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 22:40:06.700 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 22:41:44.789 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 22:43:31.629 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 22:45:11.263 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 22:46:48.866 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-20 22:48:32.589 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-21 02:49:12.395 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-21 03:18:07.311 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-21 03:38:12.876 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-21 03:49:43.500 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
2020-05-21 06:17:28.795 [INFO ] [se.smarthome.model.script.motion Bad] - Motion Sensor Bad changed on to ON, pres_BA state: OFFtimer_bad: null
Since I had the change right now I also started a DEBUG log session, but also nothing in there.
Anyone any idea? What that could be and/or how to continue troubleshooting?
thanks
martin