Fibaro Button FGPB-101

Hello,

I have recently purchased the above button. Generally it works fine but I have the following issue

I want to control the lights on a fibaro 2 relay switch. So essentially I want control one relay and not both. Since the button works by adding zwave nodes into association groups this is not going to cut it.

Has anyone found a way to make it work without switching on / off both relays at the same time ?

Regards

I don’t use association groups at all in my Z-Wave setup
I control all from OH2 items and rules

I assume that the FGS-222 has 2 channels that you can link to 2 different items.

For example:

Switch  FGS_Switch1	"Switch 1"	<switch>	{channel="zwave:[...]1"}
Switch  FGS_Switch2	"Switch 2"	<switch>	{channel="zwave:[...]2"}

Then, for the FGBP-101:

Number  FibBut01_Scene	"FB01 Scene"	<contact>	{channel="zwave:device:ZW090C:node5:scene_number"}

and the rule:

rule	"Fibaro Button 01 Pushing"
when
	Item FibBut01_Scene received update
then
	if (FibBut01_Scene.state == 1.0) {
		logInfo("FB01", "FB01 1x pushed")
		FGS_Switch1.sendCommand(ON)
	}
	if (FibBut01_Scene.state == 1.1) {
		logInfo("FB01", "FB01 let go")
		FGS_Switch1.sendCommand(OFF)
	}
	if (FibBut01_Scene.state == 1.2) {
		logInfo("FB01", "FB01 kept in")
		FGS_Switch1.sendCommand(ON)
	}
	if (FibBut01_Scene.state == 1.3) {
		logInfo("FB01", "FB01 2x pushed")
		FGS_Switch2.sendCommand(ON)
	}
	if (FibBut01_Scene.state == 1.4) {
		logInfo("FB01", "FB01 3x pushed")
		FGS_Switch2.sendCommand(OFF)
	}
	if (FibBut01_Scene.state == 1.5) {
		logInfo("FB01", "FB01 4x pushed")
		FGS_Switch1.sendCommand(ON)
		FGS_Switch2.sendCommand(ON)
	}
	if (FibBut01_Scene.state == 1.6) {
		logInfo("FB01", "FB01 5x pushed")
		FGS_Switch1.sendCommand(OFF)
		FGS_Switch2.sendCommand(OFF)
	}
end

I was afraid this is going to be the solution. i have played with scenes. The problem with this is that it is not as intuitive as using the association groups. The users (apart from me) will have to know to use different scenes in order to switch the lights on and off

With association groups you could just push the button once to switch them on and once again to switch the off like the traditional bistable switch.

But I confirm it works this way

You can achieve the same functionality with a simple rule also.
You just add a check for the current status of the switch and send the opposite command to it when pressing once the Fib Button.

The problem with this is that once you press the button one time, the moment you press it again there is no update sent to openhab. Only when the scene number changes (when you tap the button twice for example) does the update being sent to openhab

Are you sure? This would be strange for a scene controller to do this so I would suggest to double check the logs in debug mode. Maybe it’s a bad implementation by Fibaro, but it would be quite a nasty error I think.

Yes I am positive. That is exactly what I did. I was pushing the button while monitoring the events.log and that is exactly what I saw.

I press the button once and then I get this

2017-06-17 22:33:38.614 [ItemStateChangedEvent ] - ButtonScene changed from 1.1 to 1.0

I press it again once and I do not see anything

But your post made me check a bit more. I enabled debug logs and indeed in there I see updates all the time

2017-06-17 22:38:02.650 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 19: Incoming command class CENTRAL_SCENE
2017-06-17 22:38:02.651 [DEBUG] [dclass.ZWaveCentralSceneCommandClass] - NODE 19: Received CENTRAL_SCENE command V3
2017-06-17 22:38:02.651 [DEBUG] [dclass.ZWaveCentralSceneCommandClass] - NODE 19: Received scene 1 at key 0 [Single Press]
2017-06-17 22:38:02.652 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveCommandClassValueEvent
2017-06-17 22:38:02.653 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 19: Got an event from Z-Wave network: ZWaveCommandClassValueEvent
2017-06-17 22:38:02.653 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 19: Got a value event from Z-Wave network, endpoint = 0, command class = CENTRAL_SCENE, value = 1.0
2017-06-17 22:38:02.654 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 19: Updating channel state zwave:device:2947fb5e:node19:scene_number to 1.0 [DecimalType]

I press again

2017-06-17 22:39:17.949 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 19: Application Command Request (ALIVE:DONE)
2017-06-17 22:39:17.949 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 19: Starting initialisation from DONE
2017-06-17 22:39:17.950 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@a582b0 already registered
2017-06-17 22:39:17.951 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 19: Incoming command class CENTRAL_SCENE
2017-06-17 22:39:17.952 [DEBUG] [dclass.ZWaveCentralSceneCommandClass] - NODE 19: Received CENTRAL_SCENE command V3
2017-06-17 22:39:17.952 [DEBUG] [dclass.ZWaveCentralSceneCommandClass] - NODE 19: Received scene 1 at key 0 [Single Press]
2017-06-17 22:39:17.953 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveCommandClassValueEvent
2017-06-17 22:39:17.953 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 19: Got an event from Z-Wave network: ZWaveCommandClassValueEvent
2017-06-17 22:39:17.954 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 19: Got a value event from Z-Wave network, endpoint = 0, command class = CENTRAL_SCENE, value = 1.0
2017-06-17 22:39:17.955 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 19: Updating channel state zwave:device:2947fb5e:node19:scene_number to 1.0 [DecimalType]

Does it look like an openhab issue ?

Regards,
Christos

It looks like the binding is sending out the update, and the event message is probably right since the value didn’t change. But OH can send events and trigger rules when there’s a change, or when there’s any update, so my first question would be what your rule looks like that you’re using to trigger the actions?

Not sure if I can use a ‘received update’ on my rules in this case because I need to specify to which value this has been changed. I simple ‘received update’ will apply to all scenes and I want to only focus on 1.0

I just tried a pretty simple rule and it did not work

when
        Item ButtonScene changed to 1.0
then
        
    if(Bathlights.state==OFF) {
            sendCommand(BathLights, ON)
    }
    else {
            sendCommand(BathLights, OFF)
    }

Pressing the button once constantly does nothing

When I use the one below, it works

when
        Item ButtonScene changed to 1.0
then
     sendCommand(BathLights, ON)
     sendCommand(Manual_Override, ON)

end

rule "Switch Off Lights with Fibaro Button"

when
        Item ButtonScene changed to 1.2
then
        sendCommand(BathLights, OFF)
        sendCommand(Manual_Override, OFF)
end

Your current rule won’t work properly since your trigger will not fire (there will be no change to the state from another value to 1.0 if you press the button only once constantly)

A solution would be to trigger on received update and then within the logic of the rule handle the scene values

Something like:

rule	"ButtonScene"
when
	Item ButtonScene received update
then
	if (ButtonScene.state == 1.0) {
		if(Bathlights.state==OFF) {
			BathLights.sendCommand(ON)
		}
  	 	else {
			BathLights.sendCommand(OFF)
		}
	}
[...]

warning: I didn’t test this out and I am not so good in writing nested if statements :slight_smile:

Thanks Angele!!!

I did not know that even though the eventlogs do not display anything, the ‘received update’ is still triggered !
I did some testing while inserting extra logging in several parts of the code and I can confirm that this is the case. Tested this and it works!

Many thanks for the pointers to both of you!

1 Like

I don’t understand the behavior. If I press the button shortly it won’t fire an event. If I press the button longer I get the event 1.1 if I press down the button and if I release the button I get the state 1.2

Does anybody know what it is going wrong?

This is strange. When you press the button once you get 1.0

When you press longer you get the scene 1.2 and when you release it you get 1.1

Do a ‘tail -f’ on the events.log to see what happens in real time

Regards,
Christos