Hi!
I need some help figuring something out…
I have a Fibaro Roller Shutter 2 module for controlling my blinds and I am trying to create a rule for my wall switches to move the rollers up/down if not already moving, but stop if they are already moving. And I am detecting the movement by checking the current power used by the shutter module.
This is (part) the rule that works fine:
else if ((Zgoraj_AndrejSoba_SwitchMain_Input.state == 4)) {
// Input for main blind down
// Stop if already moving, else move down
if (zwave_device_ebf2caa1_node2_sensor_power.state > 5) {
sendCommand(Zgoraj_AndrejSoba_Rolete_Output, STOP)
} else {
sendCommand(Zgoraj_AndrejSoba_Rolete_Output, 77)
}
}
else if ((Zgoraj_AndrejSoba_SwitchMain_Input.state == 8)) {
// Input for main blind down
// Stop if already moving, else move down
if (zwave_device_ebf2caa1_node2_sensor_power.state > 5) {
sendCommand(Zgoraj_AndrejSoba_Rolete_Output, STOP)
} else {
sendCommand(Zgoraj_AndrejSoba_Rolete_Output, 0)
}
}
But if I define my zwave_device_ebf2caa1_node2_sensor_power
in items file as:
Number Zgoraj_AndrejSoba_Rolete_CurrentPower "Rolete - trenutna moč" (Zgoraj_AndrejSoba) {channel="zwave_device_ebf2caa1_node2_sensor_power"}
And then use Zgoraj_AndrejSoba_Rolete_CurrentPower
instead of using zwave_device_ebf2caa1_node2_sensor_power
directly it doesn’t work as expected - the blinds won’t stop moving if I press the same button again. So why does accessing a channel directly in a rule work fine, but not accessing it via an item state? What am I doing wrong?