Fibaro FGKF-601 On Click on Double Click Off

Hello,

I’m could get my Fibaro FGKF-601 working with home assistant…

But now I wanted to change de default behavior of the controller from every click sending a scene id and data, to one click send one data another click send another data for the scene id.

Lokking on the manual, i think that would be accomplished by changing the parameter 10. Single button associations - operating mode, I’m trying to change it from 0 to 2 (single click turns on, double click turns off)

I get the following on the log:

2018-04-18 00:18:27.536 Info, Node002, Value::Set - COMMAND_CLASS_CONFIGURATION - Scene activation for Square button - 21 - 1 - 2 2018-04-18 00:18:27.536 Info, Node002, Configuration::Set - Parameter=21, Value=2 Size=1

But the UI revert back after few seconds to “single click switches state to opposite

Any idea what I might be doing wrong?

Sorry, I’m not entirely sure I understand what you wish to achieve; if I recall correctly, normally the keyfob sends the scene id corresponding to the key you press each time you press it, and there’s no way to send something else, it’s always the same scene message each time you press that key. These scene activation messages are sent to the members of association group 1 (“lifeline”), which by default means only the main z-wave controller. The keyfob is also capable of sending “turn on” and “turn off” commands, but these are sent to the association group corresponding to each key: “square” sends to members of association group “2” (which by default is nobody), “circle” sends to members of group “4” (also nobody) and so on, up to “plus” sending to members of group “12” (yup: to nobody).

If you want these on/off messages to reach the main z-wave controller (address=“1”), you have to make “1” a member of each one of these groups. If you want to receive “one press -> on, next press->off, next press->on, next press->off” you should not need to change parameter 10, this is what the keyfob is supposed to do on its own, by default. If you change param 10 to “2”, it will actually start sending always “on” for each keypress, or “off” if you click the key rapidly twice (“double click”). Normally, you should be able to add “1” to any group you wish straight from the HASS z-wave control panel, although I never tried yet so I have no idea how well it works. But… there’s a catch.

See that “unknown” in your screenshot, above the “set wakeup” button? That’s not by accident. As any battery-powered z-wave device, keyfob remote controls sleep (are turned off) most of the time, to conserve battery. Unlike most battery-powered devices however, keyfobs never, ever wake up - except when you press one of their buttons. This obviously makes it a bit difficult to communicate with them since they never, ever listen - which is why your setting was likely bouncing right back; HASS was just telling you it couldn’t reach the keyfob to apply the setting.

The catch is, after you attempt to change anything about a keyfob, you have to explicitly wake it up so it can receive the change (yes, this applies to configuring group memberships too!). As the manual notes in several places (eg. middle of page 6), the way to wake this specific keyfob up is to press “circle” and “plus” simultaneously. Good luck!

Hi!
Thank you for your reply. sorry I was not clear on my initial message, what I wan to accomplish is exactly what you mentioned, one press of the button turns something on and a quick double press turn it off.

I did try to wake the device before setting the configuration, but that also did not help. Double press is better on my scenario to ensure that the device will be at an “know” state after I give it a command.

Let’s say that I’m far away from a lamp, I would not need to know the state of the lamp, a simple double pressing would turn it off.
If I had a simple press -> toggle output, I would need to know the state of the lamp…

Sure, I could use two buttons, to turn on and off, but I would run out of buttons with 3 devices on this case.

Oh, okay, then you do indeed need to change exactly that parameter you intended to. About waking up - the timing of that can be a bit tricky with some devices, but normally you’d wake the keyfob up after you send the message; the main controller knows it failed to send it immediately and when the keyfob announces it woke up, it receives the queued message. Anyway, it’s crucial you add the main controller (address “1”) to the association groups corresponding to all the buttons you want to receive on/off messages from, otherwise the keyfob never sends them no matter what that config parameter is set to.

After that you should be able to see the commands arriving if you look at the OZW_log.txt - sorry, no idea what else might be needed for them to show up under hass. You could of course also just send your commands to the devices you intend to control directly (by adding their address to the relevant group instead of “1”), but then the controller (and hass) wouldn’t know about the switching happening unless the switched device itself reported it…

update: not quite working, but getting close?

Frist thing you need to do (after you add the nodes of course) is to change the parameters “Scene activation for NAME OF THE BUTTON button” from 9 to whatever you want.

1 - Key Pressed 1 time. 2 - Key Pressed 2 times. 4 - Key Pressed 3 times. 8 - Key Held Down and Released. Default setting: 9, 1x and hold.

So if you want to enable one time press and double press, you need to config it to 1+ 2 = 3.

Only after you change this parameter you will be able to change the parameter 10 “Single button associations - operating mode”, if you don’t change the previous configuration, the controller will ignore this setting.

After that I could get my automations working:

- alias: 'Square Button 1 click'
  id: '3253425325342523'
  trigger:
    platform: event
    event_type: zwave.node_event
    event_data:
      scene_id: 1
      basic_level: 0
  action:
    service: alarm_control_panel.alarm_arm_home
    entity_id: alarm_control_panel.alarmcom
    data:
      code: !secret alarm_pin


- alias: 'Square Button 2 clicks'
  id: '52345234523523'
  trigger:
    platform: event
    event_type: zwave.node_event
    event_data:
      scene_id: 1
      basic_level: 255
  action:
    service: alarm_control_panel.alarm_disarm
    entity_id: alarm_control_panel.alarmcom
    data:
      code: !secret alarm_pin

You need to manually wake the controller to get the configuration, that is done by pressing circle + plus.

Almos giving up…

I could enable two buttons, but I can’t get automations to work… When pressing or double pressing the buttons now I get node event, not a scene activation, even If I try to filter the event I can not distinguish two different button presses from two different buttons, I think it’s basically only setting different “level”…

2018-04-30 13:03:38.766 Info, Node002, Received Central Scene set from node 2: scene id=2 in 7680 seconds. Sending event notification.
2018-04-30 13:03:38.767 Warning, Node002, No ValueID created for Scene 2
2018-04-30 13:03:38.830 Detail, Node002,   Received: 0x01, 0x09, 0x00, 0x04, 0x08, 0x02, 0x03, 0x20, 0x01, 0xff, 0x25
2018-04-30 13:03:38.830 Detail, 
2018-04-30 13:03:38.830 Info, Node002, Received Basic set from node 2: level=255.  Sending event notification.
2018-04-30 13:03:38.831 Detail, Node002, Notification: NodeEvent
2018-04-30 13:03:38.845 Detail, Node002,   Received: 0x01, 0x09, 0x00, 0x04, 0x00, 0x02, 0x03, 0x20, 0x01, 0xff, 0x2d
2018-04-30 13:03:38.846 Detail, 
2018-04-30 13:03:38.846 Info, Node002, Received Basic set from node 2: level=255.  Sending event notification.
2018-04-30 13:03:38.846 Detail, Node002, Notification: NodeEvent
2018-04-30 13:03:49.457 Detail, Node002,   Received: 0x01, 0x0b, 0x00, 0x04, 0x00, 0x02, 0x05, 0x5b, 0x03, 0x6b, 0x80, 0x02, 0x46

Ah, yes, you can’t really tell which button sends the “on” or “off” because they are all coming from the keyfob and go to the controller… You could set an individual level that each button sends so maybe you could tell them apart that way, but then you still can’t have the “single click / double click” distinction, “off” is always “0”.

So I suppose the Scene Activation messages are still the best chance if you want to detect double clicks, except my understanding is Central Scene support is still NOT built into the default version of OpenZwave that HASS uses (which is why you get that “no ValueID created”). You could try compiling your own OpenZwave / python-openzwave package with the Central Scene supported, but I have no idea what exactly you need to do to get that to work…