As i’m trying again to get some stuff working with each other i have (again) a problem.
My doorbel (dingdong) is connected to a Velbus relay output. So if i switch this relay on, it does “ding” if i switch it of, is does “dong”
My button at the front door is connected to a Velbus input module. So in Velbuslink, i configured it so when i push the button, the relay goes on 1 second, off 1 second and this repeats 2 times. So i get “ding, dong, ding, dong”.
Since a couple of months i have a doorbird installed on my eletric gate.
Now i want to make the button of the doorbird also make my doorbel do “ding dong” but only once so i can know the difference between front door and gate.
I made a rule:
rule "Timer Doorbird bel"
when
Channel 'doorbird:d210x:8c76aea5:doorbell' triggered PRESSED
then
GF_Deurbel.sendCommand (ON)
createTimer(now.plusSeconds(2), GF_Deurbel.sendCommand (OFF))
end
and this works, but when i look at the log from the Karaf console with
log:tail
i get the following output:
14:48:20.440 [INFO ] [smarthome.event.ChannelTriggeredEvent] - doorbird:d210x:xxxxxx:doorbell triggered PRESSED
14:48:20.625 [ERROR] [runtime.internal.engine.RuleEngineImpl] - Rule 'Timer Doorbird bel': null
14:48:20.642 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'GF_Deurbel' received command ON
14:48:20.651 [INFO ] [smarthome.event.ItemStatePredictedEvent] - GF_Deurbel predicted to become ON
14:48:20.689 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'GF_Deurbel' received command OFF
14:48:20.695 [INFO ] [smarthome.event.ItemStateChangedEvent] - GF_Deurbel changed from OFF to ON
14:48:20.701 [INFO ] [smarthome.event.ItemStatePredictedEvent] - GF_Deurbel predicted to become OFF
14:48:20.724 [INFO ] [smarthome.event.ItemStateChangedEvent] - GF_Deurbel changed from ON to OFF
14:48:20.731 [INFO ] [smarthome.event.ItemStateChangedEvent] - GF_Deurbel changed from OFF to ON
14:48:20.751 [INFO ] [smarthome.event.ItemStateChangedEvent] - GF_Deurbel changed from ON to OFF
What could be the reason of the ERROR? And why is the doorbel going on and off twice?
rule "Timer Doorbird bel"
when
Channel 'doorbird:d210x:8c76aea5:doorbell' triggered PRESSED
then
if ( GF_Deurbel.state == OFF ){
GF_Deurbel.sendCommand (ON)
createTimer(now.plusSeconds(2)) [ |
GF_Deurbel.sendCommand (OFF)
]
}
end
1 Like
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
3
The DSL rule solution provided by @H102 is by far the easiest solution.
If you want to really over complicate the solution, but explore more options within your Velbus setup, you might want to look at the NodeRed Function code that I have just “hacked” together.
You could inject a 1 second timer into the function when the gate door bell is triggered?
However you might need to add an openHAB2 events node to detect the Pressed event