First Switch Press Noticeable Delay

Hi,

I am running OH 2.5-5 at Raspbian with the USB300 Enocean Gateway.

My RockerSwitch is an Eltako FT55 and I have a Hue Bridge where my lights are connected to.

When pressing the upper part of my switch my Hue lamps should go on. Working so far. But when pressing the rocker switch after a while it take a markable amount of time until the lights go on (3-5seconds).
Pressing down to switch off the lights immediately are off. Followedd by another UP switches the lights on immediately.

So the first press takes three seconds - anyone having a clue why?

Here’s the event.log. You can see the delay of three seconds until the lights go on.

2020-05-29 18:46:43.067 [vent.ChannelTriggeredEvent] - enocean:rockerSwitch:b4870eea:rockerswitchA triggered DIR1_PRESSED
2020-05-29 18:46:43.081 [ome.event.ItemCommandEvent] - Item 'EltakoOben' received command ON
2020-05-29 18:46:43.110 [nt.ItemStatePredictedEvent] - EltakoOben predicted to become ON
2020-05-29 18:46:43.138 [vent.ItemStateChangedEvent] - EltakoOben changed from OFF to ON
2020-05-29 18:46:43.242 [vent.ChannelTriggeredEvent] - enocean:rockerSwitch:b4870eea:rockerswitchA triggered DIR1_RELEASED
2020-05-29 18:46:46.246 [ome.event.ItemCommandEvent] - Item 'EG_Flur_Schalter' received command ON
2020-05-29 18:46:46.276 [ome.event.ItemCommandEvent] - Item 'EG_Flur_Farbtemp' received command 0
2020-05-29 18:46:46.291 [nt.ItemStatePredictedEvent] - EG_Flur_Schalter predicted to become ON
2020-05-29 18:46:46.320 [ome.event.ItemCommandEvent] - Item 'EG_Flur_Helligkeit' received command 100
2020-05-29 18:46:46.354 [nt.ItemStatePredictedEvent] - EG_Flur_Farbtemp predicted to become 0
2020-05-29 18:46:46.386 [nt.ItemStatePredictedEvent] - EG_Flur_Helligkeit predicted to become 100
2020-05-29 18:46:46.410 [vent.ItemStateChangedEvent] - EG_Flur_Schalter changed from OFF to ON
2020-05-29 18:46:46.415 [vent.ItemStateChangedEvent] - EG_Flur_Farbtemp changed from NULL to 0
2020-05-29 18:46:46.421 [vent.ItemStateChangedEvent] - EG_Flur_Helligkeit changed from 0 to 100
2020-05-29 18:46:46.499 [vent.ItemStateChangedEvent] - inBytes changed from 2885526 to 2886030
2020-05-29 18:46:52.638 [vent.ItemStateChangedEvent] - EG_Flur_Farbtemp changed from 0 to NULL
2020-05-29 18:46:52.648 [vent.ItemStateChangedEvent] - EG_Flur_Helligkeit changed from 100 to 96

My rules file:

rule "Flurlicht Tag AN"
when
        Item EltakoOben changed to ON
then
        if (vTimeOfDay.state == "TAG" ) {
                EG_Flur_Schalter.sendCommand(ON)
                EG_Flur_Farbtemp.sendCommand(0)
                EG_Flur_Helligkeit.sendCommand(100)
        }
        if (vTimeOfDay.state == "NACHMITTAG" ) {
                EG_Flur_Schalter.sendCommand(ON)
                EG_Flur_Farbtemp.sendCommand(50)
                EG_Flur_Helligkeit.sendCommand(100)
        }
        if (vTimeOfDay.state == "ABEND" ) {
                EG_Flur_Schalter.sendCommand(ON)
                EG_Flur_Farbtemp.sendCommand(75)
                EG_Flur_Helligkeit.sendCommand(100)
        }
        if ((vTimeOfDay.state == "NACHT" ) || (vTimeOfDay.state == "MORGEN")) {
                EG_Flur_Schalter.sendCommand(ON)
                EG_Flur_Farbtemp.sendCommand(85)
                EG_Flur_Helligkeit.sendCommand(80)
        }
        if (vTimeOfDay.state == "SCHLAFEN" ) {
                EG_Flur_Schalter.sendCommand(ON)
                EG_Flur_Farbtemp.sendCommand(100)
                EG_Flur_Helligkeit.sendCommand(30)
        }
end

rule "Flurlicht Tag AUS"
when
        Item EltakoOben changed to OFF
then
        EG_Flur_Schalter.sendCommand(OFF)

end

Thanks for all ideas!
/KNEBB

HI @knebb,

just a guess: The connection between the rocker switch raw messages and a SwitchItem is done by a profile. Maybe loading this profile does take some time during the first press.

So instead of connecting your rocker switch to a SwicthItem, you should just listen directly to the trigger events of it. You could nearly use the same rules, just replace Item EltakoOben changed to On with Channel "enocean:rockerSwitch:???:???:rockerswitchA" triggered DIR1_RELEASED and the Off case with DIR2_RELEASED.

Best regards
Daniel

Hi,

thanks for the idea. I can see this behaviour only rarely but I will give it a try using the cahnnel.

Thanks!

/KNEBB

Note that the very first time a DSL rule runs after system boot or rules file refresh, it is usual for a few seconds delay.

There are also other circumstances however -

Thanks @rossko57

I will give the “return only” rule a try.

Greetings
/KNEBB