ZwaveJS Fibaro ZWave Keyfob

This blueprint was derived from the one linked below. Many thanks to the original author.

This Blueprint can be used to automate events from the Fibaro Keyfob when used via ZwaveJS. You only need one single automation for the “key pressed” and “key held” events of all keys.

Edit

Updated to the latest version 2021.04.0b0

Get started

Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Or import this Blueprint by using the forum topic URL:

blueprint:
  name: Fibaro Keyfob
  description: This blueprint can be used for creation of a single automatization
    for controlling whole keyfob.
  domain: automation
  input:
    keyfob_device_id:
      name: Device
      selector:
        device:
          integration: zwave_js
    square_press:
      name: Square button press action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Square button pressed
    square_hold:
      name: Square button hold action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Square button held
    circle_press:
      name: Circle button press action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Circle button pressed
    circle_hold:
      name: Circle button hold action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Circle button held
    x_press:
      name: X button press action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: X button pressed
    x_hold:
      name: X button hold action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: X button held
    triangle_press:
      name: Triangle button press action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Triangle button pressed
    triangle_hold:
      name: Triangle button hold action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Triangle button held
    minus_press:
      name: Minus button press action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Minus button held
    minus_hold:
      name: Minus button hold action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Minus button held
    plus_press:
      name: Plus button press action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Plus button pressed
    plus_hold:
      name: Plus button hold action
      selector:
        action: {}
      default:
      - service: logbook.log
        data:
          name: Fibaro keyfob
          message: Plus button held
  source_url: https://community.home-assistant.io/t/zwavejs-fibaro-zwave-keyfob/281459
mode: parallel
trigger:
- platform: event
  event_type: zwave_js_value_notification
  event_data:
    device_id: !input 'keyfob_device_id'
    property_name: scene
action:
- choose:
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "001" and trigger.event.data.value == "KeyPressed" }}'
    sequence: !input 'square_press'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "001" and trigger.event.data.value == "KeyHeldDown" }}'
    sequence: !input 'square_hold'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "002" and trigger.event.data.value == "KeyPressed" }}'
    sequence: !input 'circle_press'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "002" and trigger.event.data.value == "KeyHeldDown" }}'
    sequence: !input 'circle_hold'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "003" and trigger.event.data.value == "KeyPressed" }}'
    sequence: !input 'x_press'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "003" and trigger.event.data.value == "KeyHeldDown" }}'
    sequence: !input 'x_hold'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "004" and trigger.event.data.value == "KeyPressed" }}'
    sequence: !input 'triangle_press'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "004" and trigger.event.data.value == "KeyHeldDown" }}'
    sequence: !input 'triangle_hold'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "005" and trigger.event.data.value == "KeyPressed" }}'
    sequence: !input 'minus_press'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "005" and trigger.event.data.value == "KeyHeldDown" }}'
    sequence: !input 'minus_hold'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "006" and trigger.event.data.value == "KeyPressed" }}'
    sequence: !input 'plus_press'
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "006" and trigger.event.data.value == "KeyHeldDown" }}'
    sequence: !input 'plus_hold'
2 Likes

Ths Blueprinbt doesnt work for me, i configured the + Button pressed with a light but it doesnt toggel the light on/off. if i had to delete the unused buttons?

Please use the latest version of Home-Assistent. There were some breaking changes introduced in the current beta which changed some parameters of event this blueprint is listening to. You don’t have to delete unused buttons.

If you still have issues feel free to ask again :slightly_smiling_face:

thx for answer, i will wait till wednesday when the update is coming and try it again then

1 Like

with the new update it works now!!!
Its a very nice Blueprint!
I hope someone will make this with a aeotec wallmote quad

2 Likes

Thanks. I’m afraid some time in the future this blueprint will break again: https://github.com/home-assistant/core/issues/47331

I’ll fix this blueprint then asap.

When you do, could you please write down what exactly is the fix about? Just to improve my HA education and potentially fix the original blueprint :slight_smile:

The fix is pretty easy to be honest. The property_key_name, which was previously “KeyPressed” or “KeyHeld” is specified by a number right now. So “KeyPressed” = 0, “KeyHeldDown” = 1, and so on. Just edit the following lines for every button.

Right now

...
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "001" and trigger.event.data.value == 0 }}'
    sequence: !input 'square_press'
...

After the fix

...
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.property_key_name == "001" and trigger.event.data.value == "KeyPressed" }}'
    sequence: !input 'square_press'
...
1 Like

Fixed after the release of 2021.3.1

Hi,
I am running HA 2021.12.3 and I imported your blueprint.
I also included the Keyfob 601. If I go to developer and subscribe to zwave_js_value_notification I get this after pushing a button.

Event 1 fired 16:27:
{
    "event_type": "zwave_js_value_notification",
    "data": {
        "domain": "zwave_js",
        "node_id": 7,
        "home_id": 4240672111,
        "endpoint": 0,
        "device_id": "9161efe390082044c4f541ee97fe428c",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 001",
        "property": "scene",
        "property_name": "scene",
        "property_key": "001",
        "property_key_name": "001",
        "value": "KeyPressed",
        "value_raw": 0
    },
    "origin": "LOCAL",
    "time_fired": "2022-01-26T15:27:35.480908+00:00",
    "context": {
        "id": "704586276c74646c9cb02d4248b44f15",
        "parent_id": null,
        "user_id": null
    }
}

now when I try to make an automation from your blueprint the device dropdown box is empty. No matching entities found.
When I look for entities in developer, I get 4 related to the keyfob, 2 for battery levels and 2 for RF state.
So what do I key in as entityID?

Hi. The devices are filtered by integrations, in this case zwave_js:

    keyfob_device_id:
      name: Device
      selector:
        device:
          integration: zwave_js

Therefore all devices from zwave_js should be available in the device dropdown, but at least the keyfob device:

The keyfob_device_id ( 9161efe390082044c4f541ee97fe428c in your case ) is used later on as trigger:

trigger:
- platform: event
  event_type: zwave_js_value_notification
  event_data:
    device_id: !input 'keyfob_device_id'
    property_name: scene

I have 2 blueprints in the class zwave_js. I use the Aeotec Wallmote quad and the Fibaro Keyfob.
when I make an automation based on the Aeotec blueprint I see the 2 included Aeotec wallmotes in the dropdown list but not the Keyfob. If the devices are filtered on the zwave_js integration I would expect to see the keyfob here too.

when I make an automation based on the keyfob blueprint I get an empty devicelist. The same here.If the devices are filtered on the zwave_js integration I would expect to see the 2 wallmotes here too.

I compared the eventdata from the keyfob and one of the wallmotes. the only difference is the deviceID. the rest is litteraly the same. so I don’t get it.

and what is more puzzling: If I build an automation with the keyfob blueprint and I use the deviceID as entityID in the automation and I do NOT change anything else in the automation, I see an entry in the logfile the moment I press a key. As soon as I add an action like
call service >> switch turn on >> entity switch.blabla nothing is happening anymore.
image

Hi, tbh I don’t have a clue. You could debug the blueprint by manipulating the selector I’ve pointed out in the previous post. Maybe this helps to understand your issue

then we are on the same page. Both not having a clue. :wink:
I think I have 3 options

  • not using the blueprint and building the automation from scratch
  • debugging the keyfob blueprint
  • adapting the Wallmote blueprint to the keyfob

I’ll think about what option suits me best.
Thanks anyway for all your help, and if I find something interesting I’ll let you know in this post.

1 Like

I’ve made an interesting discovery about the empty devicelist.
Apparently it is not allowed to trigger the automation for all zwavejs devices. the selection must be specific for manufacturer and device. I borrowed this from the Aeotec blueprint:

  domain: automation
  input:
    zwavejs_device:
      name: ZWaveJS Device
      description: The Aeotec WallMote Quad controller to listen for events on.
      selector:
        device:
          integration: zwave_js
#          manufacturer: AEON Labs
#          model: ZW130
          manufacturer: Fibargroup
          model: FGKF601

Now the automation based on this blueprint displays the keyfob in the devicelist.
After that I remodelled the Aeotec blueprint to a keyfob blueprint.

So to solve the problems I found with the Fibaro Keyfob blueprint I remodelled the Aeotec Wallmote Quad blueprint Aeotec Wallmote Quad
to work with the Fibaro Keyfob FGKF601.

blueprint:
  name: ZWaveJS - Fibaro Keyfob scene controller
  description: 'Perform actions when Fibaro Keyfob FGKF601 buttons are interacted with.


    The release action is equivalent to a long tap.


    A release action is always triggered after a hold action, which makes

    them a bit tricky to use. The hold action is repeated as long as the

    button is held down.

    '
  domain: automation
  input:
    zwavejs_device:
      name: ZWaveJS Device
      description: The Fibaro Keyfob controller to listen for events on.
      selector:
        device:
          integration: zwave_js
#          manufacturer: AEON Labs
#          model: ZW130
          manufacturer: Fibargroup
          model: FGKF601
    tap_top_left_actions:
      name: Press Square \# button Actions
      selector:
        action:
      default: []
    tap_top_right_actions:
      name: Press Circle O button Actions
      selector:
        action:
      default: []
    tap_middle_left_actions:
      name: Press Cross X button Actions
      selector:
        action:
      default: []
    tap_middle_right_actions:
      name: Press Triangle ^ button  Actions
      selector:
        action:
      default: []
    tap_bottom_left_actions:
      name: Press Minus \- button Actions
      selector:
        action:
      default: []
    tap_bottom_right_actions:
      name: Press Plus + button  Actions
      selector:
        action:
      default: []
    release_top_left_actions:
      name: Release Square \# button Actions
      selector:
        action:
      default: []
    release_top_right_actions:
      name: Release Circle O button Actions
      selector:
        action:
      default: []
    release_middle_left_actions:
      name: Release Cross X button Actions
      selector:
        action:
      default: []
    release_middle_right_actions:
      name: Release Triangle ^ button  Actions
      selector:
        action:
      default: []
    release_bottom_left_actions:
      name: Release Minus \- button Actions
      selector:
        action:
      default: []
    release_bottom_right_actions:
      name: Release Plus + button  Actions
      selector:
        action:
      default: []
    hold_top_left_actions:
      name: Hold Square \# button Actions
      selector:
        action:
      default: []
    hold_top_right_actions:
      name: Hold Circle O button Actions
      selector:
        action:
      default: []
    hold_middle_left_actions:
      name: Hold Cross X button Actions
      selector:
        action:
      default: []
    hold_middle_right_actions:
      name: Hold Triangle ^ button  Actions
      selector:
        action:
      default: []
    hold_bottom_left_actions:
      name: Hold Minus \- button Actions
      selector:
        action:
      default: []
    hold_bottom_right_actions:
      name: Hold Plus + button  Actions
      selector:
        action:
      default: []
  source_url: https://community.home-assistant.io/t/zwavejs-fibaro-zwave-keyfob/281459/16
mode: single
trigger:
- platform: event
  event_type: zwave_js_value_notification
variables:
  logger: blueprint.zwavejs_scene_activation
  zwavejs_device: !input 'zwavejs_device'
action:
- choose:
  - conditions:
    - condition: template
      value_template: '{{ trigger.event.data.device_id == zwavejs_device }}'
    - condition: template
      value_template: '{{ trigger.event.data.command_class_name == ''Central Scene''
        }}'
    sequence:
    - choose:
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 001'' and trigger.event.data.value
            == ''KeyPressed'' }}'
        sequence: !input 'tap_top_left_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 002'' and trigger.event.data.value
            == ''KeyPressed'' }}'
        sequence: !input 'tap_top_right_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 003'' and trigger.event.data.value
            == ''KeyPressed'' }}'
        sequence: !input 'tap_middle_left_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 004'' and trigger.event.data.value
            == ''KeyPressed'' }}'
        sequence: !input 'tap_middle_right_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 005'' and trigger.event.data.value
            == ''KeyPressed'' }}'
        sequence: !input 'tap_bottom_left_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 006'' and trigger.event.data.value
            == ''KeyPressed'' }}'
        sequence: !input 'tap_bottom_right_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 001'' and trigger.event.data.value
            == ''KeyReleased'' }}'
        sequence: !input 'release_top_left_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 002'' and trigger.event.data.value
            == ''KeyReleased'' }}'
        sequence: !input 'release_top_right_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 003'' and trigger.event.data.value
            == ''KeyReleased'' }}'
        sequence: !input 'release_middle_left_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 004'' and trigger.event.data.value
            == ''KeyReleased'' }}'
        sequence: !input 'release_middle_right_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 005'' and trigger.event.data.value
            == ''KeyReleased'' }}'
        sequence: !input 'release_bottom_left_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 005'' and trigger.event.data.value
            == ''KeyReleased'' }}'
        sequence: !input 'release_bottom_right_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 001'' and trigger.event.data.value
            == ''KeyHeldDown'' }}'
        sequence: !input 'hold_top_left_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 002'' and trigger.event.data.value
            == ''KeyHeldDown'' }}'
        sequence: !input 'hold_top_right_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 003'' and trigger.event.data.value
            == ''KeyHeldDown'' }}'
        sequence: !input 'hold_middle_left_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 004'' and trigger.event.data.value
            == ''KeyHeldDown'' }}'
        sequence: !input 'hold_middle_right_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 005'' and trigger.event.data.value
            == ''KeyHeldDown'' }}'
        sequence: !input 'hold_bottom_left_actions'
      - conditions:
        - condition: template
          value_template: '{{ trigger.event.data.label == ''Scene 006'' and trigger.event.data.value
            == ''KeyHeldDown'' }}'
        sequence: !input 'hold_bottom_right_actions'
      default:
      - service: system_log.write
        data:
          level: debug
          logger: '{{ logger }}'
          message: Activated scene '{{ trigger.event.data.label }}' with value '{{
            trigger.event.data.value }}' for node '{{ zwavejs_device }}' ({{ trigger.event.data.node_id
            }})
  default: []
1 Like

So the only differences are the following lines that were missing in the original blueprint?

      manufacturer: Fibargroup
      model: FGKF601

That seems weird to me. More than that, on my system everything works as expected. Anyways, I’m happy you found a solution :slightly_smiling_face:

Sitting here with an new Fibaro KeyFob. Before diving into this rabbit hole…

  1. How to I use the key held events with the “-" and "+” button with a light (dimmer) switch so the light can be regulates holding the button?
  2. How do I set up the “-" and “+” button, working for the first 4 buttons. Like first press square-button (light dimmer nr 1) then “-” or “+” button works the for dimmer nr 1. Press circle-button then “-” or"+” button for light dimmer 2 etc?