How to create button toggle with Mirror virtual Driver-Mc

I have a Fibaro keyfob. Currently programmed with routines, so that when a button is pressed, a light group is turned on, or when button is held, the light group is turned off.

Would it be possible to use the Mc virtual mirror to use a single button click to “toggle” the on/off state of the light group?

I’ve set up two routines, one in each direction but the one click executes both routines each time so I always end up with the final state (off)

I don’t know if I understand your question correctly.

If you want to change the state of the light group every time you press a button on the fibaro remote, you don’t need any mirror device.

You can perform a quick action with any button and choose the turn off/on action.

This example with pressing button 3 and changing the status on or off of the group of lights:


I am wanting to “toggle” a light group on or off. i,.e. if they lights are on, pressing the button will turn them off. If the lights are off, the button will turn them on.

I find the “Turn on or turn off” option only works one way. i.e. it will turn off, but never back on again

You’re right, the light group turns off when it’s on but doesn’t turn on when it’s off.

for individual lights it works fine and should work for groups as well.

You should open a report to smartthings

1 Like

Ah cool, I thought I was going mad!

I’ve never raised an issue with smart things. How do I do that?

In the mean-time, how would you suggest I work around this? (hence why I was trying to make a virtual switch work.)

Maybe @nayelyz can help to do this issue report.

You can do two quick actions in your fibaro app detaill view:

  • one to turn On with push one button and other push two times same button to turn Off.

  • or use push one button to turn On and push other button to turn Off

ok, I see. This is what I currently have.

I am a software developer. I wonder if I could develop some kind of toggle switch virtual device? I know nothing about developing for smartthings. Are there any good tutorials you recommend?

you can create a virtual switch that receives the switch on/off command of the button.

Then you have to do two routines one to turn on the group when the switch is turned On and another to turn it Off.

You can create a mirror switch with Aplicaciones Virtuales Mc driver
or others with community drivers

Hi @Mark_McGee if you want to inform about an issue on SmartThings, you can send a mail to build@smartthings.com with the description and the evidence. or you can send me a message with that information and I will create the report :saluting_face:

1 Like

If you could send that would be great. Might be taken more seriously if it comes from you @AlejandroPadilla

So this is what happens;
Fibaro keyfob button press configured to set “turn on or turn off” on a lighting group.

Start with lighting group on

press the button once, the routine executes and turns the lighting group off

press the button again, nothing happens - the lighting group stays off

I can confirm that I’ve noticed some time back that a routine with button ‘on or off’ when pressed, only ever switched on->off, but not off->on, a virtual switch I have, that depending if ‘open’ or ‘closed’ triggers a different Alexa routine.
I imagined that was an inherent characteristic and so set up 2 rules with IF on, THEN switch off, and vice versa.
Reading your post, and @Mariano_Colmenarejo 's reply - this is bug maybe?

2 Likes

The issue I’ve had with assigning two routines to the same action is that the first executes and turns the lights off, then the second one executes and flips them back off again!