Ohh I like that idea.
Just thinking out loud, but I wonder if you could you achieve a similar behavior by using the virtual button device? It includes a switch as well, and has a feature that lets you define an auto-revert with configurable delay.
So you would enable the auto-revert and set it to 15 minutes (900 seconds).
Then your routine would turn on the switch when the washing machine turns off. A second routine would test for the virtual switch being on for 15 minutes, if so send the notification and turn the virtual switch on again. Maybe the timing of the auto-revert expiring and turning the switch on again would get tricky.
But I think the reason the regular virtual switch is not doing what you had working in Groovy is that the Edge platform may be working a bit different. The edge driver still turns on the switch again - even if it is already on - when it receives a request from an automation. But by default I think the platform isn’t internally triggering the state change, which is why your routine isn’t triggering. I believe there is a way to force the state change via a parameter that the driver would use. I would have to make it an optional device setting, however, because this could actually break other routines that may expect different behavior. Now that I write this, I seem to recall we’ve had this discussion before in this topic!..
Let me know what you think about the alternative of using the virtual button device auto-revert. If that isn’t working the way you need it, I can add the forced state change option to the switch device.
@Wajo357 Why don’t you turn off the virtual switch when the washing machine stops and then in the routine that sends you the message, use if off for 15 minutes then send message and then turn on the virtual switch with auto off in 5 or 10 seconds. This will make it keep looping and then you can turn on the virtual switch when the dryer starts. Always leave it in the on state and use the off state as the condition to trigger the message routine. when you turn on a switch in routines it has another option to turn it off again in a certain amount of time you want.
I use this is to trigger a lot of my Alexa routines.
Another use case I have is related to retriggering variables. For instance, I have a variable that turns on and off tbr nests. However, since the nests can be controlled by other means, I have an automation that says "if HouseHeating is On, and something happens, turn on HouseHeating. When HouseHeating turns on, there is another automation which resets everything back to where it should be. This way, I have one routine which specifies a default state of the nests and others which trigger that default state.
How are you going to use variables without webcore?
meaning, your virtual switches are my new ‘variables’.
I do this as well. I use virtual switches as a boolean in a bunch of automations.
I liked your idea. I changed my Notify routines to use your setup. I still need to think about my other use case scenarios.
Yes, I think a momentary button can work.
These were my settings
And I can have the routine just press the button, instead of turning it on.
Thanks!
I use the off state a lot because of the ability to turn it on and then off again in the same routine. Loved your washing machine routine. Gives me a lot of good ideas.
I apologize for intruding on higher-level discussions with a “newbie” issue, but I’ve done reasonably diligent research, and I’m stumped.
I’ve created a “vEdge Contact” that works in both ST and Alexa. For testing purposes, I’m just trying to turn on a Zigbee lightbulb. I can create a ST automation that does it, even when I toggle the contact/switch in Alexa, but I can not get it to trigger an Alexa routine to light the bulb when the c/s “opens” (or closes). I’ve tried a couple of other options (motion sensor, presence sensor), but no joy.
I know I’m going to embarrassed when I learn what I’ve done wrong or failed to do, but thanks in advance for any help.
Stan,
I am not sure what you are asking. But the following are screen shots of the 2 Alexa routines you need for each device you want to control.
Thank you. It looks much the same as mine, I think. But it does not execute. When I open vEdge Contact4, the bulb does not light. Executing an analogous automation in ST works just fine.
The light turns on.
Does the state of the sensor in the Alexa app match the state of the virtual device in the ST app?
If you’re asking “when it’s on (or off) in Alexa, is it the same in ST?” The answer is yes. But the wording of your your question makes me ask — In Alexa, should I be seeing something like “Sensor is closed” instead of “Power is off” ?
It’s in the documentation for the virtual device driver, but as I recall ST On=Alexa Open and ST Off=Alexa Closed. So, if those states are accurately reflected in both apps, the communication is happening properly.
As an example, I have a virtual sensor to track whether someone is home or not so that I can enable Alexa Guard when everyone is gone. When everyone is gone, the virtual sensor is set to On in ST and in Alexa my routine says when the virtual sensor opens, set Guard to Away mode.
I agree open = on, closed = off.
Yes, that’s how I understand it. And I can verify by observation that the switch is on or off, and that it’s the same in ST and Alexa. I can also verify, in ST, that a change in state of the switch properly translates “off” to “closed” and “on” to “open.”
What I don’t see how to do is verify “open” or “closed” in Alexa. The only place I see those words is in a routine, as in the image above.
Possibly an irrelevant aside, but if, in Alexa, I edit the virtual device, I have the option of selecting its “type”. Alexa thinks it” a “Switch” and I could change that to “Light”, but those are my only options.
Thanks very much for taking an interest.