I am using Triggercmd to connect X10 with smarthings. i have created separate .bat files for turning an x10 switch on and separate one for off. I have put them into triggercmd as separate triggers and imported them over to smarttings as separate switches. So i have 1 switch which turns on the light (let’s call it Piano Light On) and a second switch to turn off the light (Piano Light Off). How do i create a virtual switch (let’s call it VirtualPianoLight) that will behave like a real light switch (can turn toggle on and off as well as turn light on or off regardless of its current state).
Perhaps webcore can accomplish this for you.
I have not used it yet but it has much more granular control.
Hopefully someone with more knowledge will chime in here
Well so i was able to sorta do this with Core (I have both Core and Webcore but I really am not sure what is the difference between the two).
So it works but not exactly consistenly.
I have 2 triggercmd commands imported into ST, Theater Light On (which turns on the theater lights using x10 commander) and Theater Light Off (which turns off theater lights using x10 commander).
I created a virtual switch (using Alexa Virtual Switch Creator) called Theater Light Virtual.
I created 2 Core pistons:
The first is Theater On:
If Theater Light Virtual changes to On, Then Turn on Theater Light On.
Second one is Theater Off:
If Theater Light Virtual changes to off, then Turn on Theater Light Off.
Well it works, but only the first time (or depends on the original state of Theater Light On and Theater Light Off).
If Theater Light On is already on for some reason, and I try to turn Theater Light Virtual on, it won’t work. Same thing goes if Theater Light Off is on and I try to turn Theater Light Virtual off, it won’t work.
I also tried instead of turning on Theater Light On to toggle and still didn’t work.
Any advice would be grateful.
i think the problem is that since this is not a 2 way system, the virtual switch might be off, when i turn on the light manually. So to turn it off with ST, my if statement won’t be true since it is not state is not “changing” to off. It is already off.
Anyway to check if the virtual on or off button has been activated at all, regardless of its present state?