Niko friends of hue switch integration

Hello, I myself have only been using Deconz for a short time and two days ago I bought a Friends of Hue Switch from SENIC.

The connection with Deconz/Phoscon worked without problems and the switch entity is displayed in Home Assistant too.
The deconz events can be found in the developer tools under the events tab. Just enter “deconz_event” into the “Listen to events” field and start listening. Afterwards the events should be displayed when you press a key.

Thats my automations I made so far with it:

#########################################################
#                                                       #
#         FRIENDS OF HUE SWITCH OVER deCONZ             #
#                                                       #
#########################################################

- id: 'a_sw_1_1'
  alias: 'Schalter - Büro - Deckenlampe toggle'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: buro_schalter
      event: 3002
  action:
    service: light.toggle
    entity_id: light.buro_deckenlampe
- id: 'a_sw_1_2'
  alias: 'Schalter - Büro - Deckenlampe start dimming up'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: buro_schalter
      event: 3001
  action:
    - service: script.buero_schalter_deckenlampe_dimm_up
- id: 'a_sw_1_3'
  alias: 'Schalter - Büro - Deckenlampe stop dimming up'
  initial_state: 'on'
  trigger:
    - platform: event
      event_type: deconz_event
      event_data:
        id: buro_schalter
        event: 3003
    - platform: event
      event_type: deconz_event
      event_data:
        id: buro_schalter
        event: 3002
  action:
    - service: script.turn_off
      data:
        entity_id: script.buero_schalter_deckenlampe_dimm_up
    - service: script.turn_off
      data:
        entity_id: script.buero_schalter_deckenlampe_dimm_up_loop
- id: 'a_sw_1_4'
  alias: 'Schalter - Büro - Deckenlampe start dimming down'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: buro_schalter
      event: 4001
  action:
    - service: script.buero_schalter_deckenlampe_dimm_down
- id: 'a_sw_1_5'
  alias: 'Schalter - Büro - Deckenlampe stop dimming down'
  initial_state: 'on'
  trigger:
    - platform: event
      event_type: deconz_event
      event_data:
        id: buro_schalter
        event: 4003
    - platform: event
      event_type: deconz_event
      event_data:
        id: buro_schalter
        event: 3002
  action:
    - service: script.turn_off
      data:
        entity_id: script.buero_schalter_deckenlampe_dimm_down
    - service: script.turn_off
      data:
        entity_id: script.buero_schalter_deckenlampe_dimm_down_loop
- id: 'a_sw_1_6'
  alias: 'Schalter - Büro - Deckenlampe Lichtstimmung wechseln'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: buro_schalter
      event: 4002
  action:
    - service: input_select.select_next
      data:
        entity_id: input_select.buero_deckenlampe_lichtstimmung



- id: 'a_sw_2_1'
  alias: 'Schalter - Büro - Schreibtischlampe toggle'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: buro_schalter
      event: 1002
  action:
    service: light.toggle
    entity_id: light.buro_schreibtisch
- id: 'a_sw_2_2'
  alias: 'Schalter - Büro - Schreibtischlampe start dimming up'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: buro_schalter
      event: 1001
  action:
    - service: script.buero_schalter_schreibtischlampe_dimm_up
- id: 'a_sw_2_3'
  alias: 'Schalter - Büro - Schreibtischlampe stop dimming up'
  initial_state: 'on'
  trigger:
    - platform: event
      event_type: deconz_event
      event_data:
        id: buro_schalter
        event: 1003
    - platform: event
      event_type: deconz_event
      event_data:
        id: buro_schalter
        event: 1002
  action:
    - service: script.turn_off
      data:
        entity_id: script.buero_schalter_schreibtischlampe_dimm_up
    - service: script.turn_off
      data:
        entity_id: script.buero_schalter_schreibtischlampe_dimm_up_loop
- id: 'a_sw_2_4'
  alias: 'Schalter - Büro - Schreibtischlampe start dimming down'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: buro_schalter
      event: 2001
  action:
    - service: script.buero_schalter_schreibtischlampe_dimm_down
- id: 'a_sw_2_5'
  alias: 'Schalter - Büro - Schreibtischlampe stop dimming down'
  initial_state: 'on'
  trigger:
    - platform: event
      event_type: deconz_event
      event_data:
        id: buro_schalter
        event: 2003
    - platform: event
      event_type: deconz_event
      event_data:
        id: buro_schalter
        event: 1002
  action:
    - service: script.turn_off
      data:
        entity_id: script.buero_schalter_schreibtischlampe_dimm_down
    - service: script.turn_off
      data:
        entity_id: script.buero_schalter_schreibtischlampe_dimm_down_loop
- id: 'a_sw_2_6'
  alias: 'Schalter - Büro - Schreibtischlampe Lichtstimmung wechseln'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: buro_schalter
      event: 2002
  action:
    - service: input_select.select_next
      data:
        entity_id: input_select.buero_schreibtischlampe_lichtstimmung


########################################################
#                                                       #
#            END OF CONFIGURATION FILE                  #
#                                                       #
#########################################################

Maybe this helps you a little bit with your configuration @Snex33 ?
It should be the same procedure whether the switch is from Niko or SENIC.

Greetings

1 Like

Hi @Snex33,

The following mistake is easy to make and causes the pairing to fail: if the switch is upside down when performing the pairing process. Please open the cover of your FOH switch and look for the 0 and 1 (hard to find) and make sure that the 0 is at the top. Repeat the pairing process and check if this helps.
Image: Check correct orientation of 0 and 1 on enocean module

I’ve succesfully paired a Niko FOH switch with Deconz, but I seem to have another issue that it won’t connect to any other routers.
When I go outside of the range of my conbee stick, it just stops working although I’m in range of several tradfri bulbs.
Anyone have an idea how I might fix this? I’ve already tried pairing it out of range of the conbee but from within range of the bulbs, but then it’s not picked up.

As far as I know, currently only Hue bulbs can act as routers (green power proxy) for FOH switches.
I recently saw a comment on this in the z2m repo. But for deconz the same applies.:

Your Tradfri lamps will probably not pass the signal to the Zigbee coordinator.

That fully explains the issue, thanks! Seems I’ll be getting at least one hue bulb soon.

Hello SarumaN and Simon,
It’s works now ! Thank you so much… The solution was just Listen to event . Thx

Alex

1 Like

from a technical point of view.
the friends of hue switch doesn’t use batteries and is not wired.
where does it get its power from?

It uses kinetic energy

1 Like

This is an interesting document with all the technical details of the module which is used in all these Friends of Hue switches.

Hi, I was able create an automation for my Feller FoH switch based on the Hue integration, which is working as expected. I tried the same approach for a deCONZ integration, so fare without success. Pushing the corresponding button on FoH switch does not result in any action, i.e. either automation nor my input Boolean is triggered. Any idea what I missed for the deCONZ integration?

I created both automations initially with the UI.

# Hue
- id: '1607100344599'
  alias: Switch Kitchen Hue
  description: ''
  trigger:
  - device_id: 1e34eea808404de3bf7f531108115d62
    domain: hue
    platform: device
    type: remote_button_short_press
    subtype: button_1
  condition: []
  action:
  - service: input_boolean.turn_on
    data: {}
    entity_id: input_boolean.switch_kitchen1
  - delay: '30'
  - service: input_boolean.turn_off
    data: {}
    entity_id: input_boolean.switch_kitchen1
  mode: single

# deCONZ
- id: '1607162867469'
  alias: deCONZ
  description: ''
  trigger:
  - device_id: 6814ecf9c38ba4f1fe0d29d2d9d3a313
    domain: deconz
    platform: device
    type: remote_button_short_press
    subtype: button_1
  condition: []
  action:
  - service: input_boolean.turn_on
    data: {}
    entity_id: input_boolean.switch_kitchen1
  - delay: '30'
  - service: input_boolean.turn_off
    data: {}
    entity_id: input_boolean.switch_kitchen1
  mode: single

In hassio go to developer tools then events now type deconz_event and click start listening. If you now push one of your FOH buttons you should be able to see the event pass by on the screen. Let me know if this works. No events = No automation.

Hi SarumaN, I listed to events as described by you. No event appears if I push the button on the corresponding FoH switch. I’m only able to fire an event in hassio. Then I get the following response:


{
    "event_type": "deconz_event",
    "data": {},
    "origin": "REMOTE",
    "time_fired": "2020-12-06T12:42:13.304843+00:00",
    "context": {
        "id": "97e5d7da108b6afb713bc16bcb44e3fa",
        "parent_id": null,
        "user_id": "5358fa1d7c9d4a808b21a0d1124e406f"
    }
}

Not 100% that friend of hue switches work in deConz? Do you need to see the button press in deconz? Seeing it in HA is enough surely?

Hi @lindi,
Please check my previous posts about pairing and switch orientation.
Post 22: switch orientation
And
Post 19: pairing
Let me know when you are able to catch the FOH deconz_event in HA.

FOH only work if you have hue lights GreenPower GreenPower_On_Off_Switch control via MQTT | zigbee2mqtt.io

Nope, FOH works perfectly fine with Conbee / deCONZ, I have several of them and you definitely do not need to have HUE lights.

Then you probably have a different kind of greenpower device in your network:

This is a Zigbee Green Power device which allows it to be very energy efficient. Messages from Green Power devices cannot be “understood” by normal Zigbee devices, therefore they need to be “translated” first. Not all Zigbee devices can do this translation, currently the only devices known to do this are Philips Hue devices. This means that the Green Power device has to be in range of a Philips Hue device in order to use it.

I assume it’s directy supported by the Conbee as the FOH are on the compatibility list without any comments.

Hi @SarumaN, pairing with the deCONZ worked perfect. I pushed the button that matches to my Zigbee channel and after a few seconds the FoH Switch was connected to the Phoscon App via ConBee II.

I was finally able to connect the FoH switch with Phoscon. Receiving event and triggering automation with the switch is now working. I missed basically two things:

  • I did not complete commissioning in Phoscon by pressing buttons 2 and 3 simultaneously
  • I tried to integrate the FoH switch in parallel in hue and deCONZ to use the advantages of both world, that obviously does not work

@SarumaN Thank you for your patience and support! :+1: