Platform information:
- Hardware: Raspberry Pi 3 Model B Rev 1.2
- OS: OpenHAB
- openHAB version: openHAB 2.5.5-1 (Release Build)
- Motion detecor and Siren: NEO
Hi everyone,
I am trying to make a rule that when someone is going away from home then they can switch a Switch item in the Sitemap that turns a Rule on which then if motion is detected through Group of motion detectors it will turn on Group of sirens in the house
These are my Items
//State switch
Switch awaySwitch "Away" <alarm>
//Groups
Group motion_zwave "motion sensors" <motion>
Group light_zwave "Fibaro lights" <light>
Group siren_zwave "Siren" <siren>
This is my rule
//When person is away from home
rule "Armed House"
when
Item awaySwitch changed to ON
then
if(motion_zwave.state == ON) {
siren_zwave.sendCommand(ON)
}
end
However nothing happens when I move my hand in front of motion detector and the detector works because I am using it for turning on the lights as well as I can turn siren on manualy. There are no Errors in the logs and if I turn on the awaySwitch and the motion switch it aprears in the logs.
2020-06-29 18:55:47.856 [ome.event.ItemCommandEvent] - Item 'awaySwitch' received command ON
2020-06-29 18:55:47.869 [vent.ItemStateChangedEvent] - awaySwitch changed from OFF to ON
2020-06-29 18:55:54.864 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node15_alarm_motion changed from OFF to ON
2020-06-29 18:56:08.294 [ome.event.ItemCommandEvent] - Item 'awaySwitch' received command OFF
2020-06-29 18:56:08.306 [vent.ItemStateChangedEvent] - awaySwitch changed from ON to OFF
2020-06-29 18:56:13.734 [ome.event.ItemCommandEvent] - Item 'awaySwitch' received command ON
2020-06-29 18:56:13.764 [vent.ItemStateChangedEvent] - awaySwitch changed from OFF to ON
2020-06-29 18:56:24.184 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node16_alarm_motion changed from OFF to ON
2020-06-29 18:56:24.191 [ome.event.ItemCommandEvent] - Item 'FibaroDimmer1_DimmerSwitch1' received command ON
2020-06-29 18:56:24.253 [nt.ItemStatePredictedEvent] - FibaroDimmer1_DimmerSwitch1 predicted to become ON
2020-06-29 18:56:24.291 [vent.ItemStateChangedEvent] - FibaroDimmer1_DimmerSwitch1 changed from 0 to 100
2020-06-29 18:56:25.459 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node11_sensor_power changed from 0 to 1
2020-06-29 18:56:25.876 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node11_switch_dimmer1 changed from 0 to 2
2020-06-29 18:56:25.880 [vent.ItemStateChangedEvent] - FibaroDimmer1_DimmerSwitch1 changed from 100 to 2
2020-06-29 18:56:29.468 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node11_sensor_power changed from 1 to 1.5
2020-06-29 18:56:52.011 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node15_alarm_motion changed from ON to OFF
2020-06-29 18:56:55.222 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node16_alarm_motion changed from ON to OFF
2020-06-29 18:57:03.501 [ome.event.ItemCommandEvent] - Item 'FibaroDimmer1_DimmerSwitch1' received command OFF
2020-06-29 18:57:03.564 [nt.ItemStatePredictedEvent] - FibaroDimmer1_DimmerSwitch1 predicted to become OFF
2020-06-29 18:57:03.582 [vent.ItemStateChangedEvent] - FibaroDimmer1_DimmerSwitch1 changed from 2 to 0
2020-06-29 18:57:04.532 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node11_sensor_power changed from 1.5 to 0.4
2020-06-29 18:57:05.162 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node11_switch_dimmer1 changed from 2 to 0
2020-06-29 18:57:14.557 [vent.ItemStateChangedEvent] - zwave_device_f57cb095_node11_sensor_power changed from 0.4 to 0
2020-06-29 18:58:24.205 [ome.event.ItemCommandEvent] - Item 'FibaroDimmer1_DimmerSwitch1' received command OFF
2020-06-29 18:58:24.319 [nt.ItemStatePredictedEvent] - FibaroDimmer1_DimmerSwitch1 predicted to become OFF
I am quite new to rules and openhab so I appologize if the rule is horrible.