After sending a command to the poweroutlets, a second command is not sent.
I am sending a command (exec) to change the state of 433 MHz poweroutlets. And it works great. However, openhab can not know the state of the poweroutlets at any time.
On the one hand they can not answer, if they received the 433 MHz signal. On the other hand openhab can never know, if I sent another signal with a simple 433 MHz remote control.
If I send the command ON to the poweroutlets via openhab, switch them off via remote and want to switch them on again via openhab, they will not be turned ON at the second time. I guess, openhab somehow assumes, that the poweroutlets are still ON.
openhabian@openhabian:~ $ cat /etc/openhab/things/poweroutlets.things
Thing exec:command:poweroutletA-control [ command="/home/openhabian/scripts/call_rpi_433.sh A %2$s", interval=0, autorun=true ]
Thing exec:command:poweroutletB-control [ command="/home/openhabian/scripts/call_rpi_433.sh B %2$s", interval=0, autorun=true ]
Thing exec:command:poweroutletC-control [ command="/home/openhabian/scripts/call_rpi_433.sh C %2$s", interval=0, autorun=true ]
Thing exec:command:poweroutletD-control [ command="/home/openhabian/scripts/call_rpi_433.sh D %2$s", interval=0, autorun=true ]
openhabian@openhabian:~ $ cat /etc/openhab/items/poweroutlets.items
Group grp_poweroutlets "Funksteckdosen Wohnzimmer" <poweroutlet>
String poweroutletASwitch "Funksteckdosen A Kinderzimmer" <poweroutlet> [ "Switchable" ] { channel="exec:command:poweroutletA-control:input", autoupdate="true" }
String poweroutletBSwitch "Funksteckdosen B Wohnzimmer" <poweroutlet> (grp_poweroutlets) [ "Switchable" ] { channel="exec:command:poweroutletB-control:input", autoupdate="true" }
String poweroutletCSwitch "Funksteckdosen C Schlafzimmer" <poweroutlet> [ "Switchable" ] { channel="exec:command:poweroutletC-control:input", autoupdate="true" }
String poweroutletDSwitch "Funksteckdosen D Flur" <poweroutlet> [ "Switchable" ] { channel="exec:command:poweroutletD-control:input", autoupdate="true" }
triggers:
- id: "1"
configuration:
thingUID: deconz:switch:00212E069C7B:0017880108f2559802fc00
event: "2000"
channelUID: deconz:switch:00212E069C7B:0017880108f2559802fc00:buttonevent
type: core.ChannelEventTrigger
conditions: []
actions:
- inputs: {}
id: "2"
configuration:
itemName: grp_poweroutlets
command: ON
type: core.ItemCommandAction
2021-03-31 00:06:32.757 [INFO ] [openhab.event.ChannelTriggeredEvent ] - deconz:switch:00212E069C7B:0017880108f2559802fc00:buttonevent triggered 3000
2021-03-31 00:06:32.759 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'grp_poweroutlets' received command OFF
2021-03-31 00:06:32.762 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'poweroutletBSwitch' received command OFF
2021-03-31 00:06:32.778 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'poweroutletBSwitch' changed from ON to OFF
2021-03-31 00:06:32.810 [INFO ] [openhab.event.ChannelTriggeredEvent ] - deconz:switch:00212E069C7B:0017880108f2559802fc00:buttonevent triggered 3002
2021-03-31 00:06:32.902 [INFO ] [openhab.event.ChannelTriggeredEvent ] - deconz:switch:00212E069C7B:0017880108f2559802fc00:buttonevent triggered 3000
2021-03-31 00:06:32.905 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'grp_poweroutlets' received command OFF
2021-03-31 00:06:32.910 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'poweroutletBSwitch' received command OFF
2021-03-31 00:06:32.991 [INFO ] [openhab.event.ChannelTriggeredEvent ] - deconz:switch:00212E069C7B:0017880108f2559802fc00:buttonevent triggered 3002
2021-03-31 00:06:40.221 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'BewegungsmelderFlurPrasenzCentraLite_LastUpdated' changed from 2021-03-31T00:06:13.130+0200 to 2021-03-31T00:06:40.209+0200
2021-03-31 00:06:42.643 [INFO ] [openhab.event.ChannelTriggeredEvent ] - deconz:switch:00212E069C7B:0017880108f2559802fc00:buttonevent triggered 2000
2021-03-31 00:06:42.646 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'grp_poweroutlets' received command ON
2021-03-31 00:06:42.649 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'poweroutletBSwitch' received command ON
2021-03-31 00:06:42.660 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'poweroutletBSwitch' changed from OFF to ON
2021-03-31 00:06:42.770 [INFO ] [openhab.event.ChannelTriggeredEvent ] - deconz:switch:00212E069C7B:0017880108f2559802fc00:buttonevent triggered 2002
In the log I can see, that the rule is fired. But openhab decides, that it does not actualy have to execute the command. The script is not called, unless it officially received an OFF command before.
How can I convince openhab to always execute the command?
- Platform information:
-
Hardware: Raspberry Pi 4
-
OS: Linux openhabian 5.10.11-v7l+ #1399 SMP Thu Jan 28 12:09:48 GMT 2021 armv7l
-
Java Runtime Environment: openjdk 11.0.10 2021-01-19 LTS
OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
OpenJDK Client VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode) -
openHAB version: 3.0.1 - Release Build
-