So I have set up a device type for a virtual dimmer and it works good. I also have webCore installed and it also work. Now what I am trying to do is create a script that allows the virtual dimmer to control the on/off and dim level of the actual light devices.
So I have set the script that if the level of the switch or the on off changes to set 2 variable for level on on off. Thats as far as I have gotten.
I am confused about how I say if the on off was chaged then check to see if the physical lights are equal to the virtual if they are do nothing if not then make them the same. Also I need to say if it was the level that changed then set the level of the physical devices to match.
/**************************************************************/
/* Lighting Office VirtualDimmer All Lights */
/**************************************************************/
/* Author : WhitiG */
/* Created : 7/6/2017, 7:56:18 AM */
/* Modified : 7/6/2017, 8:57:47 AM */
/* Build : 5 */
/* UI version : v0.2.0ce.20170629 */
/**************************************************************/
define
string varTestOnOff; /* on */
integer varTestLevel; /* 65 */
end define;
execute
if
test's level changes
or
test's switch changes
then
with
test
do
Set variable {varTestOnOff} = test's switch;
Set variable {varTestLevel} = test's level;
end with;
end if;
end execute;
One issue: trying to remove a group an I just get an error saying something unexpected happened.
Suggestion: With the dimmer device give the option so when the the switch is turned on you can set the associated light to go to a certain percentage level. With the Hue bulbs they come back on at the dim level they went off at. Being able to set an on level would be great. Thanks!
Oh, not my App! I just use it. However, with all my switches, GE 12K series, all of my lights come back on at the setting they were turned off at. The Virtual Switch should also remember it’s setting when it is turned off…If I wanted to automate levels, I use webCoRE.
You can say, Alexa, Set “blank” to “blank” percent.
Yeah they remeber fine. But I am thinking of ease of family use. When they turn a light on I would like to have it set to the percentage they expect. They can dim it after its on if they want.
Unless your Device can accept a percentage without having to first turn on the light then there will be a brief moment when the lights come on then dim to the correct percentage. Not many do. However, Set to Level blah blah blah works.
I use webCoRE. The following are 3 rule examples:
This one will turn the light on at the level it was last on then dim to the correct level…
If
Light changes to On
Then
Set Level to X%
This one goes straight to the level…
If
Blah Blah Blah happens
Then
Using Light
Set Level to X%
I use this one to set the level for the next time the light turns on…
If
Light Changes to Off
Then
Using Light
Set to X%
Turn Off
Don’t know. Installed way back in Jan and ain’t looked back. I hardly ever update anything if it’s working and TS has worked for me from Day 1. I hope it works as well for you as it does for me.