[Resolved] What happened to virtual switches?

I am sure I am overlooking something, and will feel like a jerk once someone gives me what is likely a very simple answer.

The Situation: I want a rule that, when a virtual switch is turned on, it will cause a pair of lamps to slowly gain brightness from 0 to 100 over a 55 second time interval. I have a "virtual switch" already made.

The Problem: Rule Machine used to have Virtual Switch as a choice when building a rule. Now, it is gone.

The Question: Where did it go?

One More Question: When I get a problem solved from answers on here, I know there is a way to close the topic, or at least I think there is. I want to be courteous so, can someone please tell me how to close a topic? Thanks!

???

I don't recall RM having separate triggers for switch v/s virtual switch.

Because a virtual switch is a switch, pick switch for your trigger and then select the virtual switch of your choice.

7 Likes

Yup, what he said. :slightly_smiling_face: :point_up:

Virtual switch

Rule

So I discovered right after I sent this inquiry. Now, I just can't get it to work.

It is impossible to debug the situation you describe without logs. Can you turn on logging for Events, Triggers, and Actions? Then post a screenshot of the logs after turning your virtual switch on.

1 Like

Let me see if I can even figure out how that is done.

I will describe what I had in the past: I had the virtual switch come on for just one second to get the fade-up rule to run. It worked then, but in moving from my C-7 to C-8 I bungled the transfer and had to rebuild all of my rules, which, fortunately, was not many. I went from memory. This is the ONLY rule not cooperating.

Let me work on getting those logs...

PS: If this helps. I clicked on "Run Actions" within the Rule Machine rule, and it works like a charm. I just have to figure out why I can't get it to trigger with the virtual switch. -shrug- Back to the log issue...

How does the virtual switch Lamp Fade Up get turned on? You have it as the trigger for the rule - but you have to turn on the virtual switch for the rule to get triggered.

DO you have a separate rule that turns the virtual switch on?

Every rule has the option to turn on "Logging". It is visible in your screenshot. Click on "Logging", and then select "Events", "Triggers", and "Actions".

Then keep Live Logs open (Log tab on the main menu), and turn on the virtual switch.

1 Like

I turn on the virtual switch with a command through Alexa. Note: the rule works fine if I "Run Actions". But if I go to the virtual switch and turn it on, from there, it does not run the rule.

Do as @aaiyar says and turn on the logging and then run the rule by turning on the virtual switch w/Alexa.

My best guess is that Alexa is not be turning on the switch. You can check that by opening the Device page for the virtual switch and then telling Alexa to turn on the virtual switch. If you don't see the switch turn on briefly and then turn off (I'm assuming you have a 1s auto off setting in the virtual switch) then the problem is w/Alexa not having access to the virtual switch. Since you re-did everything manually that's the first place I'd check.

Just saw your post about the rule not running if you turn on the virtual switch on its Device page. We need logs...

1 Like

You may also want to show the setup for your virtual switch. For this type of thing to work you will need the switch to automatically turn off after a relatively short period.

1 Like

I rebuilt the fade-up rule, and now it is working as intended.

To all who helped out I thank you, and now just need to know how to show this as a solved topic.

3 Likes

To answer your other question, I don't believe we can technically close the topic, but we can mark it as solved using the check box below the solution post.

That is what I meant and thanks very much.

1 Like

It would be nice if you posted the re-built rule, just for posterity sake. Others seeing this post later could profit from your experience. :slight_smile:

Click this check box at the bottom of the post you want to note as the solution, can even be your own post.

image

2 Likes