Fibaro S2 "virtual switch" to switch "on when off" and "off when on"

Hi All,

ok…

I have 2 Fibaro devices:
1x3KW

  • With ONE physical connection for lamp and S1 switching it. Also S2 is available.
    2x1.5KW
  • With TWO physical connections for lamps and S1 & S2 switching them.

What I want to acheive is to have the S2 switchport of the 1x3KW device to control one (or more) devices via my Vera2.
According to Fibaro this is what it was meant to work like: Interview with Fibaro : Past, present and future • iHomeAutomate
At the beginning our goal was to create micro modules with distinctive feature different from competitors. That’s why, among others, we decided to introduce possibility to assign associations to 2 buttons. Moreover our switch 1x3kW, as the only device, in the world has an additional feature: virtual switch. When you install the 1x3kW it appears as 3 devices (1 root, 2 switch, 3 virtual switch). You can use this virtual switch with your second button in a wall switch to control any other zwave device or run the scene. For example if you connect it to wall switch responsible for light control, the second button while connected to S2 can control e.g. blinds. It’s extremely good functionality for our customers.

Currently I have got it working in a way… I have added 2 scenes:

  1. to turn a light on when a “on” trigger is coming from that S2 virtual switch
  2. to turn that light off when a “off” trigger is coming from that S2 virtual switch

This works… BUT

When all lights are OFF. And I turn the light on via the PHYSICAL directly connected switch (this offcourse works), and I want to turn the light OFF with the virtual switch it won’t work the first click. Though is does work on second click. Due to the fact that the scene is triggered to trun the light “on” on triger of S2… but the light is already ON ::).

Thus, maybe I am looking far too complicated, but I can’t find it… What I want is to switch the lamp with the S2 virtual switch to “on when it is off” and “off when it is on”…

Seems quite logically…

Anybody any hints, tips, suggestions?

If Vera shows the correct state of the light after you change the state with the physical switch, then you could try a [tt]ToggleState[/tt] action (on the [tt]Advanced[/tt] tab), triggered by either event from the virtual switch. Thus, for each push of the virtual switch, Vera will toggle the state of the light.

(Also, alternatively, looking at the manual for the FGD211 that was posted earlier today, it appears that if you had the light directly associated with the virtual switch, you could set parameter 7 to 1, so the virtual switch will learn the state of the physical switch.)

Edit: link added.

Hi. How can i associate the light with the virtual switch the?

That’s the focus of that topic, to which I now linked (in the previous post).

(Perhaps Fibaro intended the device to be used that way, and therefore implemented parameter 7, so S2 has the correct status of the associated light. When using S2 with scenes in Vera, S2 may not know the state, and thus it takes a double click. Which is the behavior you are observing, IIUC.)

There is not a solution in That link.

I do not understand what you mean with parameter 7.

In my humble opinion I would like to “couple” the virtual switch (state?) to the physical switch state. So that when physical is on, also virtual is and vice versa. I That way when changing Rae physical, the virtual also does.

Any advice on how to achieve this? Anyone?

Well, it’s an ongoing event. But we can skip that for now; I meant it as an explanation of what (I believe) you are seeing.

Any advice on how to achieve this? Anyone?
How about the suggestion to use the [tt]ToggleState[/tt] action?

[quote author=oTi@ link=topic=12504.msg91777#msg91777 date=1352844291]
If Vera shows the correct state of the light after you change the state with the physical switch, then you could try a [tt]ToggleState[/tt] action (on the [tt]Advanced[/tt] tab), triggered by either event from the virtual switch. Thus, for each push of the virtual switch, Vera will toggle the state of the light.

Thanks for all you quick replies. I do not understand togglestate. its not in the advaced tab of the S2 switch of the Fibaro. And if it was I would not know “what” to do with it.

[quote=“slelieveld, post:1, topic:173268”]Currently I have got it working in a way… I have added 2 scenes:

  1. to turn a light on when a “on” trigger is coming from that S2 virtual switch
  2. to turn that light off when a “off” trigger is coming from that S2 virtual switch[/quote]
    I would delete both scenes, then create a new one, with both the “on” and “off” trigger that you mentioned, and then under [tt]Advanced[/tt] (in the scene creator) pick the light you wish to control and select [tt]ToggleState[/tt] as the action; see here and the pic in this post.

Yes! That works! thank you!

What a way to achieve this…

Nice; thanks for the feedback!

What a way to achieve this...
Well, MCV could consider adding the [i]toggle[/i] action as something clickable on the [tt]Devices[/tt] tab, like [i]return to previous[/i] to make things a little easier. Vera is not the issue though; at the root of this, is the device not knowing the correct state of the controlled device, and thus pushing S2 may send the 'wrong' command[sup]1[/sup].

([sup]1[/sup] Parameter 7 may be there for just that reason. So, if I had this device, I would actually try associating S2 with the light directly, set parameter 7 to 1, and create a scene on Vera to do a poll after 5 seconds or so.)

Hmm… abacadabra again… this might be the reason this is not ready for a big audience though…

I find myself very technical, but this…