This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to

This forum is now read-only for archive purposes.

Hacking a Fibaro double relay switch (FGS-222) => multiple tapping

EternityEternity Member
edited April 2018 in Questions & Help
Sorry for the weird discussion title, hope my explanation makes my question more clear!

At the entrance of my living room, I have a Fibaro FGS-222 double relay switch installed behind a double momentary switch. 

In Homey I have a flow that responds to the FGS-222; relay ON to switch on my Hue lights (it activates a scene called Dim 1) and press again - relay switches to status OFF - to switch all Hie lights off. 

Here you see these 2 flows:

The FGS-222 relay does not support double tapping or scene selecting... Bummer! But, I am trying to figure out a way to DIY :-)

I would like to add some extra options to this switch; if I press the momentary switch an extra time within a time frame, a new Hue scene can be called. If that time frame expires, the button works the old way; it will switch the lights off.

So, I created a timer called "WK - S2 timer" that runs 30 seconds and a variable called "WK S2".

I have it working, more or less. Problem is that it is slow. The response to the extra tapping of the switch seems delayed. Here you see the flows I created, allowing to switch the lights thru 4 Hue scenes and OFF again:

The first flow, which is activated by pressing the S2 switch once, Hue scene Dim 1 is activated:

Pressing 2x, activates Hue Scene Dim 2:

Pressing 3x, activates Hue Scene Willekeurig 1:

Pressing 4x, activates Hue Scene Willekeurig 2:

And the 5th press, switches the lights off:

What do you guys think? 
Any suggestions on the speed?

I would also like the double press work as a regular OFF command, if the timer is not running. So, when the lights are on, a single press switches the lights off.... How to add that in this setup?


I now see I made an error with the variable. It resets to 0 every time a push the switch, so 0-1-0-2-0-3-0-4-0-
I will start without the timer involved, to simplify things.


  • @Eternity ; A bit more or less similar case: I have an AC fan which I thought I could control it with a dimmer. See this post:

    Since I could not use the dimmer, I went for two Fibaro double relays.

    The fan came with a four way rotary switch and two capacitors. Switching in between the two capacitors and mains power gave me low, med and high speed. And of course stop.

    I got 2 of Fibaro double relays, giving me 4 contacts.
    Relay 1, output Q1 for low speed.
    Relay 1, output Q2 for medium speed.
    Relay 2, output Q1 for high speed.
    Relay 2, output Q2 is wired into a momentary switch in the wall. I planned to use this so I could control the fan manually. Same problem as you, the double relay does not support double or multiple tapping.

    I just need to simulate the legacy 4 way rotary switch now and toggle in between low, med, high speed and stop. This would switch on/off in a sequence the outputs.
    Using your exact procedure from the above post, worked very well! No delay at all.

    I created 4 VD for stop, low, med and high respectively as I need this in my flows where the fan is controlled automatically.

    Maybe your delay is due to the z-wave to zigbee translation? I have no zigbee devices that I could use in my test.
  • EternityEternity Member
    edited November 2017
    Glad my flows were of (a little) help to you, @danone

    I have rebuilt them, and am pleased with the result. The delay is acceptable; the variable needs to be increased and that means some communication to and from Homey. The lights lag a bit behind the actual switching, but I am fine with that.

    The way I made it, makes that the switch now has endless tap long as the linked countdown timer is running. The 'aha' moment to solve the flows was, understanding that - if the variable is not exactly zero - the lights are on. This way I could also make the 'lights off' with a single tap, not having to cycle tru all options of the switch.


    2x (and similar for 3x and 4x):

    5th tap is the last one and functions as OFF again:

    If the light are ON I can switch them off with 1 click, if the timer is not running :-)

  • BTW

    Normally the other relay of the FGS-222 (=S1) controls my blinds, but with the AND condition 'CDT=running', I can give it additional functions :-) That is cool!

    And, the other way around; if the other relay is in 'control the blinds' mode, I can give S2 additional capabilities!

    Great stuff !
  • Eternity said:

    Normally the other relay of the FGS-222 (=S1) controls my blinds, but with the AND condition 'CDT=running', I can give it additional functions :-) That is cool!

    And, the other way around; if the other relay is in 'control the blinds' mode, I can give S2 additional capabilities!

    Great stuff !
    Yes, indeed that’s great! All you need, have enough space in the wall to fit all the devices. Lucky in Oz the interior walls are not bricks and concrete. I can fit a whole hip of stuff behind every power point or light switch.
    also thank you for sharing the flows!!
  • Aha, you are starting your summer... That is something to envy.

    Happy tweaking!

  • Eternity said:
    Aha, you are starting your summer... That is something to envy.

    Happy tweaking!

    @Eternity ; I say the same thing in April-May... and envy you guys up there in Europe for the upcoming summer.
    But yes, now it is my turn  :)

  • ddenoudenddenouden Member
    edited April 2018
    @Eternity this is exactly what i was looking for, 1 question...your normal wall switch is hooked up to the fibaro switch, and your hue lights are in no way connected to that circuit right ? Could you share how you hooked up the fibaro switch to the wall switch.

    Did you use normal on/off wall switches or a pulse switch ?
  • EternityEternity Member
    edited April 2018

    Correct, the HUE's are all directly connected to mains and powered 24/7. Controlling them happens via Homey and a Philips Living Colour remote.

    The wall switch is a JUNG momentary switch. If you press it, the button is pushed in and triggers the Fibaro. When you release it, it pushes out again. Here an example CLICK. You can get models with 1 and with 2 switches.
    I bought 2 of the single types, to match my needs (old picture, now I use Homey Dash):

    From the bottom: switch 1 and 2 are connected to the Fibaro, switch 3 is a normal switch that powers a light (not connected, not smart, not Homey involved.... always works :-) )

    The Jung switches are connected to the FGS-222 and powered thru mains (NL: Bruin en Blauw). The outputs of the Fibaro are not used. The two Jung switches are only used to control Homey and flows.

    When you press the button, the Fibaro sees that as an ON. That is the reason that - in my flows - I switch the Fibaro OFF again. That way, the Fibaro is always in OFF mode, and my flows work correctly.

    Feel free to ask more, if I am not completely clear.
  • ddenoudenddenouden Member
    edited April 2018
    @Eternity ; So okay... i'm dutch also. So for my understanding, the JUNG switch (in my case GIRA) are connected to main power; L & N, the FGS-222 is also powered by main L & N . The switch wire (black) goes from the JUNG (GIRA) to the S1 or S2 of the FGS-222. The Q1 & Q2 are not used, also the IN from the FGS-222 is also not used ?
  • I am not 100% sure, but let's find out thru logical reasoning :-)

    This is the standard way to connect a FGS-222 :

    If we drop the lights, we can erase some lines:

    Which also means that the L input (the 3rd from the right) has no purpose anymore, giving this:

  • ddenoudenddenouden Member
    edited April 2018
    So the JUNG (GIRA) switch only needs to connect to main "fase L"  and have a switch wire (black) to the Fibaro.

    The relay itself is connected to main L and N

    Thanks! @Eternity

Sign In or Register to comment.