Fibaro Switch fires hold scene twice

Hello,

I use a Fibaro FGS-223 and activated scenes. I basically want to have the switch on channel 1 to trigger the light connected to S2 when the toggle button / push button is held and released. Therefore I put “15” in the scene configuration of the FGS, which gives me correctly all scenes (also double press, etc.). Now I have the following rule:

rule    "Light scene"
when
        Item    SCENE_LIGHT   received update 1.0
then
        if (LIGHT_2.state == ON) {
                LIGHT_2.send(OFF)
        } else {
                LIGHT_2.send(ON)
        }
end

Problem here is, that the “1.0” for press and hold is fired twice. First time when I press and hold the button and second time when I release it. This results in turning the light on shortly and then turning it off again. I am not able to press and hold the button to turn the light on and then subsequently do the same again to turn the light off.

Any idea how I could avoid the update being sent either too early (when I still hold the button) or after I release the button?

Thanks a lot!

If the device is really sending this, then there’s probably not a lot you can do to stop it. It might pay to grab a debug log and provide it here showing the two events so I can check that they are decoded correctly since in general, the decimal part of this should change with the different events (ie key-down, key-up etc.).

Hello @chris

thanks for your quick reply :slight_smile:

This is my settings in HABmin:

I’ll look into the logs and if I don’t get further will send them here. But obviously - as the rule is only triggered on 1.0 I doubt then there’s a lot I can do. :frowning:

One thing I use as a workaround now is that I’ve changed the rule to “changed to 1.0”, which then - clearly - doesn’t accept the same scene twice, so I have added a timer that sets the scene to 0 after 5 seconds. But that’s just a workaround.

What I wanted to check is if the ZWave binding is correctly handling the message it receives from the device or if it’s processing it incorrectly…

Could you please let me know how I can best provide you the logs? When I look in the logfile, the scene number doesn’t change at all (thus I used the received update in the rule) when pressing / holding or releasing the button.

If I go in Karaf and set log:set debug it’s a huge mess and I don’t see anything any more.

Please just let me know what and how to provide, so I can send it over. Sorry for bothering, but I’m not too well at the debugging.

So long as it’s not too big (less than 10MB) then you can email it to me if you like - just zip it up and email to chris -at- cd-jackson.com.

Okay - I get only one single line

15:39:19.420 [INFO ] [marthome.event.ItemStateChangedEvent] - SCENE_LIGHT changed from NULL to 1.0

in the logs after a fresh start. Nothing else is reported. If I press the button short (as when I normally turn on the light) it changes to 1.3. But on press and hold it goes again to 1.0 and no further log entry.

Seems the “update” is sent when it goes into the state and when I release the key. But no change in value.

Maybe it’s not in debug mode then.

To put the zwave logging into debug mode, use the command log:set DEBUG org.openhab.binding.zwave.

You definitely should get a lot more than a single line. Each zwave event should give 5 to 10 lines in the log…

Ah - thanks @chris. That was it. Here it is:

2017-08-27 15:49:49.894 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 17: Application Command Request (ALIVE:DETAILS)
2017-08-27 15:49:49.896 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 17: Incoming command class CENTRAL_SCENE
2017-08-27 15:49:49.898 [DEBUG] [dclass.ZWaveCentralSceneCommandClass] - NODE 17: Received CENTRAL_SCENE command V2
2017-08-27 15:49:49.900 [DEBUG] [dclass.ZWaveCentralSceneCommandClass] - NODE 17: Received scene 1 at key 0 [Single Press]
2017-08-27 15:49:49.902 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveCommandClassValueEvent
2017-08-27 15:49:49.904 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 17: Got an event from Z-Wave network: ZWaveCommandClassValueEvent
2017-08-27 15:49:49.906 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 17: Got a value event from Z-Wave network, endpoint = 0, command class = CENTRAL_SCENE, value = 1.0
2017-08-27 15:49:49.908 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 17: Updating channel state zwave:device:38c276a6:node17:scene_number to 1.0 [DecimalType]

Thanks - the lines I’d like to see should be just at the beginning of each event and look like this -:

Receive Message = 01 0B 00 04 00 67 05 70 06 0C 01 FF 16

Sent you log in PM

This does not happen on my FGS223 (used with the development binding version), take a look at my config and compare the settings:

Switch 1 gives you 1xclick=1.0 ,2xclick=1.3, 3xclick=1.4, press and hold=1.1, release 1.2
Switch 2 gives you 1xclick=2.0 ,2xclick=2.3, 3xclick=2.4, press and hold=2.1, release 2.2

@sihui

Hmmm… interesting as I don’t get 1.1 but 1.0. I’ll check the device by removing and re-adding it again.

Thanks for that hint. The 1x click is reported as 1.3 to me.

As I said: compare the settings and try to find differences. That should lead to a solution or at least to an idea …

I would be quite surprised if there’s a setting for this - if there is it would be non-compliant to Z-Wave standards!

@chris and all others: I got a hint from @meschmesch who pointed me to change from “Toggle Switch” to “Momentary Switch” and – tadaa! It works now and the reported values are as reported by @sihui who also had that Toggle Switch setting as Momentary.

Thanks a lot for your help guys!

Still - as German speaker I have not understood the difference between momentary and toggle switch. Could somebody enlighten me, please? In German I would have translated both to “Taster”.

1 Like

Toggle switch = Kippschalter, momentary switch=Taster

Edit: although a “Kippschalter” could also be technically a momentary switch from hardware side. But it is meant as “ON/OFF Switch”, “EIN/AUS Schalter”.

Hello @sihui

ah - I didn’t get that distinction, since there is a stable toggle switch and a toggle (without stable) switch and a momentary switch; so I thought that toggle and stable toggle are Taster vs. Schalter; I still don’t get then the difference between toggle and stable toggle.

Thanks a lot for your explanation. That helped me a lot!

Never heard the term “stable toggle”, but from the wording it should be:

stable toggle = Kippschalter als Ein/Aus-Schalter
toggle = Kippschalter als Taster

You are always on the safe side if referring to a “toggle switch” as “Ein/Aus Schalter” and to a “momentary switch” as “Taster”,

1 Like