How can I automate the switching on/off of Fibaro Dual Relay switches

Hi,

Last night I got my Fibaro FGS-222 Dual Relay switch working with Smartthings. I followed some instructions provided on here to successfully include the device and installed the Device Handle (Pukkahq : Fibaro FGS-222 Dual Relay) which has given me independent control of the two switches…great.

This is useful for when I want to manually (via smartphone) switch the lights on/off together or independently. However, my intentions with buying the Fibaro were to automate the switches coming on and going off at times such as sunrise/sunset.

How can I do this in the Smartthings app? I’ve tried using SmartLighting and the switches aren’t visible. I’ve also tried creating a IFTTT recipe and only my outlet plugs are visible (I’ve reconnected the account too).

Surely this is possible?

Additionally, it would be nice to be able to control both switches with one virtual switch.

Any ideas/help greatly appreciated - thanks.

The only solution I can think of is to have a SmartApp that creates child virtual switches for each switch in the relay, which when switched, control the individual relays. The SmartApp is needed as a bridge between the virtual switch and the dual relay device.

Hi Chris, this is what the DeviceHandler by Pukkahq offers. Control of each light relay via a virtual switch by the looks of it.

But what I want to do is automate the switching on and off of those switches in accordance with sunset and sunrise for example. This is important for me for when I’m away from the house as we might not always have remote access via phones.

Oh I see, you should probably use Smart Lighting then

Already tried SmartLighting. The switches don’t appear in the list. I’m either doing something wrong or have misunderstood the instructions.

Ah I see the problem, I looked at the device handler you’re using and the capability it’s using is “Relay Switch” not just “Switch” it is an easy fix if you’re willing to edit the device handler code and add:

capability "Switch"

With the rest of the capabilities. The attributes and commands are the same as Relay Switch so it should just work.

Once done, they should show up :slight_smile:

1 Like

That works! Meaning it shows for but nothing happens. They remain on or off depending on what your instructing on.

So for instance I’ve added it to the Good Night routine so that both relays are switched off (they appear as one option). Nothing happens. I’m at a loss and out if my depth with this.

I changed the relevant bit in the device handler and published it

Apologies, I understand the issue now. I was on my phone when responding previously so it made it difficult to see everything.

The modification I suggested isn’t required. I thought that the device handler being used represented a device for each of the relays on the Dual Relay. But it doesn’t it represents the device as a whole.

What Pukkahq does provide is a SmartApp for associating 2 other switch devices (probably virtual ones) to each relay on the Dual Relay device.

If you haven’t you need to go to the IDE and My Devices -> New Device - Fill in the details naming them how you see fit, the Device Network ID can be whatever you like as long as it’s unique. Then select the Simulated Switch device type. Do this for both relays, then in the SmartApp provided by Pukkahq, select the two simulated switches.

Those simulated switches should show up in Smart Lighting and control the two relays.

Hope that makes sense.

I see, I have installed the SmartApp as can be seen from the screenshot. But I didn’t do any of the additional things you mentioned regarding creating simulated switches. How will these simulated switches affect what is already there (in the screenshot)?

The screenshot you’ve shown me is the Device Handler, not the SmartApp - If you installed the SmartApp in the IDE then you’ll find it under Marketplace -> SmartApps -> My Apps

It will be called “Fibaro FGS-222 App” in there you should be able to assign the 2 simulated switches to each individual relay.

The simulated switches won’t affect what’s in the screenshot at all, they’ll be listed as two separate devices. The SmartApp will send commands from the simulated switches to the appropriate switch/relay on the Dual Relay device (in your case “Outdoor Lights”) and send state reflect state information back to the simulated switch.

[quote=“mattih52002, post:1, topic:46518”]
Last night I got my Fibaro FGS-222 Dual Relay switch working with Smartthings. I followed some instructions provided on here to successfully include the device and installed the Device Handle (Pukkahq : Fibaro FGS-222 Dual Relay) which has given me independent control of the two switches…great
[/quote]Mat, go back and review ALL the steps that were outlined in the FAQ by @shcc [quote=“shcc, post:1, topic:46090”]
Step-by-step guide for the integration of Fibaro “FGS-222 Relay Switch”:

As I was a little bit lost at my first time integrating a non supported device to my ST hub, I hope this guide will help you with the Fibaro Relay.
[/quote] It appears you missed a step he gives it to you in step 4 that you need to add a smartapp of your choosing to go along with the device handler. If you used Pukkahq device handler he lists the link for the appropriate smartapp to expose the virtual switches you need to add that will allow you to use the Smart Lighting sunset control which is what @Kriskit is pointing out to you.

Hi Dale, KrisKit,

So I’ve re-read those instructions and done the following.

  1. In the IDE I’ve created two now devices called Outdoor Relay 1 and Outdoor Relay 2, both with unique Device Network Id’s. I’ve assigned them both to the type Simulated Switch. See image.

  1. I’ve then re-installed the SmartApp provided by Pukkahq via the SmartApps section in the IDE.

  2. In the Smartthings app I’ve installed Pukkahq SmartApp via Marketplace > SmartApps > MyApps > Fibaro FGS-222 App.

  3. I’ve assigned the RSM2 module to “Outdoor Lights” as per the the screenshot in an earlier post. The First Relay in the SmartApp is assigned to Outdoor Relay 1. The second assigned to Outdoor Relay 2.

  4. Both appear as “Things”

Am I missing a step because Outdoor Relay 2 appears to do nothing. Outdoor Relay 1 is sporadic. If I look under the “recently” tab in Outdoor Lights I can see events happening when I click either of simulated switches, they appear as “Fibaro FGS 222 App”.

In the example above the simulated switches are reporting on but only the first relay is truely switched on. Switch 2 never comes on unless I use the Outdoor Lights thing.

So an update. The automation side of things through SmartLighting has been working. The two relays successfully switched on and off when they should have.

However, manually controlling them through the Simulated Switch apps is touch and go.

I might set up a few automation routines to validate it further. But in terms of automation it’s looking promising.

A further update.

I moved the Smartthings hub closer to the z-wave switch and did a z-wave repair. So far the switches have automated perfectly and I’ve been able to manually control them through the simulated switches.

Thank you all for your help with this. I believe that if I’d have had the hub closer from the outset I may not have had the problems I’ve had as they worked sporadically originally.

I purchased a Aeotec Z-wave repeater yesterday which has enabled me to move the hub further away.

1 Like