openHAB version: latest version 2.4.0 Release build
Hello,
I use roller shutter FGR-222 for my roller blinds and the switch FGS-213 which is connected to a momentary switch to control the roller shutter (there is no wired connection between the roller shutter module and the switch possible, that’s why I use the scene functionality of the FGS…).
rule "Gaestezimmer runterfahren" //it means shut down roller blinds
when
Item Gaestezimmer_Switch_SceneNumber received update 1.0
then
if (Sensor_Power.state == 0) {
sendCommand(Gaestezimmer_Rollladen, DOWN)
}
else if (Sensor_Power.state != 0) {
sendCommand(Gaestezimmer_Rollladen, STOP)
}
end
rule "Gaestezimmer hochfahren" //it means roller blinds should go up
when
Item Gaestezimmer_Switch_SceneNumber received update 2.0
then
if (Sensor_Power.state == 0) {
sendCommand(Gaestezimmer_Rollladen, UP)
//Gaestezimmer_Rollladen.sendCommand(UP)
}
else if (Sensor_Power.state != 0) {
sendCommand(Gaestezimmer_Rollladen, STOP)
}
end
The rules work but there is a very long delay. For example if I press one of the up/down buttons to stop the moving roller blind, it takes sometimes two seconds or longer before the blind stops. The Rasberry is located right next to the devices.
As you can see the command is received immediately but it takes a few seconds before the command is processed:
2019-02-06 08:27:50.896 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Schalte 2.0
==> /var/log/openhab2/events.log <==
2019-02-06 08:27:50.906 [ome.event.ItemCommandEvent] - Item 'Gaestezimmer_Rollladen' received command STOP
2019-02-06 08:27:52.832 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 70 to 44
2019-02-06 08:27:53.833 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 44 to 43
2019-02-06 08:27:53.851 [vent.ItemStateChangedEvent] - Sensor_Power changed from 90.4 to 0
Does anyone have an idea what could be the rout cause?
Hello, I have just added the logging. First of all the rules:
rule "Gaestezimmer runterfahren"
when
Item Gaestezimmer_Switch_SceneNumber received update 1.0
then
logInfo("Szene_Gaestezimmer.rules", "Scenenumber {} received", Gaestezimmer_Switch_SceneNumber.state.toString)
if (Sensor_Power.state == 0) {logInfo("Szene_Gaestezimmer.rules", "Sensor Power is zero")
sendCommand(Gaestezimmer_Rollladen, DOWN)
logInfo("Szene_Gaestezimmer.rules", "Guest room command DOWN is sent")
}
else if (Sensor_Power.state != 0) {logInfo("Szene_Gaestezimmer.rules", "Sensor Power is not zero")
sendCommand(Gaestezimmer_Rollladen, STOP)
logInfo("Szene_Gaestezimmer.rules", "Guest room command STOP sent")
}
end
rule "Gaestezimmer hochfahren"
when
Item Gaestezimmer_Switch_SceneNumber received update 2.0
then
logInfo("Szene_Gaestezimmer.rules", "Scenenumber {} received", Gaestezimmer_Switch_SceneNumber.state.toString)
if (Sensor_Power.state == 0) {logInfo("Szene_Gaestezimmer.rules", "Sensor Power is zero")
sendCommand(Gaestezimmer_Rollladen, UP)
logInfo("Szene_Gaestezimmer.rules", "Guest room command UP is sent")
}
else if (Sensor_Power.state != 0) {logInfo("Szene_Gaestezimmer.rules", "Sensor Power is not zero")
sendCommand(Gaestezimmer_Rollladen, STOP)
logInfo("Szene_Gaestezimmer.rules", "Guest room command STOP is sent")
}
end
…and now the log entries. I pushed the up and down button several times:
2019-02-06 21:56:49.973 [vent.ItemStateChangedEvent] - zwave_device_RaspberryPi3_node4_switch_binary2 changed from OFF to ON
2019-02-06 21:56:50.042 [vent.ItemStateChangedEvent] - Gaestezimmer_Switch_SceneNumber changed from 1.0 to 2.0
==> /var/log/openhab2/openhab.log <==
2019-02-06 21:56:50.727 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Scenenumber 2.0 received
2019-02-06 21:56:50.733 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Sensor Power is zero
2019-02-06 21:56:50.738 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Guest room command UP is sent
==> /var/log/openhab2/events.log <==
2019-02-06 21:56:50.738 [ome.event.ItemCommandEvent] - Item 'Gaestezimmer_Rollladen' received command UP
2019-02-06 21:56:50.744 [nt.ItemStatePredictedEvent] - Gaestezimmer_Rollladen predicted to become UP
2019-02-06 21:56:50.751 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 100 to 0
2019-02-06 21:56:52.122 [vent.ItemStateChangedEvent] - Sensor_Power changed from 0 to 92.7
2019-02-06 21:56:52.310 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 0 to 93
2019-02-06 21:56:55.762 [vent.ItemStateChangedEvent] - zwave_device_RaspberryPi3_node4_switch_binary1 changed from OFF to ON
2019-02-06 21:56:55.825 [vent.ItemStateChangedEvent] - Gaestezimmer_Switch_SceneNumber changed from 2.0 to 1.0
==> /var/log/openhab2/openhab.log <==
2019-02-06 21:56:55.840 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Scenenumber 1.0 received
2019-02-06 21:56:55.855 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Sensor Power is not zero
2019-02-06 21:56:55.865 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Guest room command STOP sent
==> /var/log/openhab2/events.log <==
2019-02-06 21:56:55.873 [ome.event.ItemCommandEvent] - Item 'Gaestezimmer_Rollladen' received command STOP
2019-02-06 21:56:57.477 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 93 to 68
2019-02-06 21:56:58.476 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 68 to 67
2019-02-06 21:56:58.505 [vent.ItemStateChangedEvent] - Sensor_Power changed from 92.7 to 0
2019-02-06 21:57:02.076 [vent.ItemStateChangedEvent] - zwave_device_RaspberryPi3_node4_switch_binary2 changed from ON to OFF
2019-02-06 21:57:02.138 [vent.ItemStateChangedEvent] - Gaestezimmer_Switch_SceneNumber changed from 1.0 to 2.0
==> /var/log/openhab2/openhab.log <==
2019-02-06 21:57:02.231 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Scenenumber 2.0 received
2019-02-06 21:57:02.244 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Sensor Power is zero
2019-02-06 21:57:02.255 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Guest room command UP is sent
==> /var/log/openhab2/events.log <==
2019-02-06 21:57:02.267 [ome.event.ItemCommandEvent] - Item 'Gaestezimmer_Rollladen' received command UP
2019-02-06 21:57:02.278 [nt.ItemStatePredictedEvent] - Gaestezimmer_Rollladen predicted to become UP
2019-02-06 21:57:02.282 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 67 to 0
2019-02-06 21:57:03.840 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 0 to 67
2019-02-06 21:57:03.928 [vent.ItemStateChangedEvent] - Sensor_Power changed from 0 to 92.8
2019-02-06 21:57:05.831 [vent.ItemStateChangedEvent] - zwave_device_RaspberryPi3_node4_switch_binary2 changed from OFF to ON
==> /var/log/openhab2/openhab.log <==
2019-02-06 21:57:05.944 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Scenenumber 2.0 received
2019-02-06 21:57:05.959 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Sensor Power is not zero
2019-02-06 21:57:05.969 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Guest room command STOP is sent
==> /var/log/openhab2/events.log <==
2019-02-06 21:57:05.978 [ome.event.ItemCommandEvent] - Item 'Gaestezimmer_Rollladen' received command STOP
2019-02-06 21:57:09.050 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 67 to 41
2019-02-06 21:57:09.957 [vent.ItemStateChangedEvent] - Azimut changed from 300.77170485252657 to 302.12359759240906
2019-02-06 21:57:09.969 [vent.ItemStateChangedEvent] - Sonnenhoehe changed from -43.495526800748465 to -44.20176994175195
2019-02-06 21:57:10.024 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 41 to 36
2019-02-06 21:57:10.043 [vent.ItemStateChangedEvent] - Sensor_Power changed from 92.8 to 0
2019-02-06 21:57:17.888 [vent.ItemStateChangedEvent] - zwave_device_RaspberryPi3_node4_switch_binary2 changed from ON to OFF
==> /var/log/openhab2/openhab.log <==
2019-02-06 21:57:17.963 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Scenenumber 2.0 received
2019-02-06 21:57:17.972 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Sensor Power is zero
2019-02-06 21:57:17.980 [INFO ] [odel.script.Szene_Gaestezimmer.rules] - Guest room command UP is sent
==> /var/log/openhab2/events.log <==
2019-02-06 21:57:17.984 [ome.event.ItemCommandEvent] - Item 'Gaestezimmer_Rollladen' received command UP
2019-02-06 21:57:17.991 [nt.ItemStatePredictedEvent] - Gaestezimmer_Rollladen predicted to become UP
2019-02-06 21:57:18.002 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 36 to 0
2019-02-06 21:57:19.547 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 0 to 36
2019-02-06 21:57:19.621 [vent.ItemStateChangedEvent] - Sensor_Power changed from 0 to 92.7
2019-02-06 21:57:26.757 [vent.ItemStateChangedEvent] - Sensor_Power changed from 92.7 to 0
2019-02-06 21:57:28.214 [vent.ItemStateChangedEvent] - Gaestezimmer_Rollladen changed from 36 to 0
Just let me know in case you need further information.
By the way - perhaps it is important: I see a similar behaviour if I use the up/down/stop button in the Paper UI control environment. The initial command up/down command works perfectly but if I try to stop, it takes time…
Ok, Thank you, I see tomorrow The rollershutters’ power sensor measures the energy transmitted in real time. My idea behind it is: I wanted to use the up/down button to stop the blinds in case they are in movement. For me (as a beginner it was the only possibility to identify this status.
You can also try to use direct associations. This will send a direct command from the switch to the roller shutter, without any delay. But because it’ll bypass openhab, you can’t use rules for any other thing you wanna do with it.
I personally don’t really know how to read zwave logs but what you need to do is look for log statements from the devices based on node number, and compare the timestamps with the log statements in events.log and openhab.log. If the time stamps correspond you know the problem isn’t zwave. If the timestamps are two seconds after events.log send the command then you know the problem is in the binding.