Global dimmer level, is it even possible


#1

1) Give a description of the problem

Hello everyone. I would like to know if what I am after is even possible before I go down the road of trying to make it.
2) What is the expected behavior?

I would like to make (what I think should be) a global variable called “global dimmer level” that all the dimmer switches in the house can reference, so at any point in the day pressing a light switch will bring those lights to the current level set by the global dimmer level and they would then follow whatever the global dimmer level does. This would also ensure that all the lights I turn on and are currently on will be the same level. That part I think is possible, here’s the part I’m not sure about. I want the global dimmer level to change throughout the day. For example at 10 pm I want the lights to fade from 100% to 50% over 1 hour. So all the lights referencing it will fade together and if a light is turned on during the fade it will turn on to the level of the other lights and then continue to fade with the rest of them. Anybody know if that can be done?
3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

REMOVE BELOW AFTER READING


#2

I like your objective, but there are a few things to keep in mind…

Some bulbs (manufacturers) can do this, but most bulbs cannot have the brightness level set without the bulbs being on at the time. (IE: Setting a level will usually turn on the bulbs in the process)

As far as I know, lights fading over a long duration cannot be cancelled. You can manually change the level at anytime, but within a minute, it will jump back to the previous level and continue the original fade command.


As far as having “One switch to rule them all”, I use a Simulated Dimmer Switch, and whenever that level changes, webCoRE will set a group of lights to the same levels. It works great to have one switch control many, but it works instantly, not with the delay you are seeking.


#3

This is true (and somewhat annoying), and why I never use the Fade Level command anymore and instead use a simple While Loop

While [device : level ] > target level
with device
wait {time}
set level [device : level ] - 1%
end with
end while

If there’s a target time (or time period), the wait times and level adjustment increments can be calculated accordingly in the piston. Adding a restriction on the ‘with’ can halt further execution under specified conditions. It’s easy enough after that to have the other switches mirror the level of the master (or simulated switch)

As you note, he would most likely have to adjust the level of any dimmer that is turned on during the fade period after the light has been turned on.


#4

I would do what you’re trying to do with a simple global integer variable, @dimmer. Any lights turned on, or on when @dimmer changes set to the level stored in the variable. Every so often have the piston that controls the global variable wake up and set the value to what you want. Pretty easy to do something based off sunset so you don’t have to change it throughout the year.

On my phone now but can throw something together Sunday if you’d like.


#5

Thanks WCmore! My hope in referencing the global dimmer level not contained in the piston would mean that pressing the switch would not need to cancel the fade, just reference a different fade level and the original fade would continue on. I think the simulated dimmer might be the best way but when I tried to create one earlier today in the hub it gave me an access denied error. After a bit of research it looks like tha’ts due to no group being assigned. I’m still pretty new at this so I don’t yet understand what that means.


#6

I think the GROUP is left blank in the IDE.
Also, I often have to use an incognito window to be able to create new devices.
It won’t work in my standard browser window for some reason…


EDIT :
Here is the areas to fill out when creating a simulated device:

(Make sure you zoom in this pic, since the bottom is cut off in the thumbnail)


#7

Thank you michicago Some of that is over my head so I sure would not mind seeing what you are talking about. I’m sure seeing it in a piston will help me learn it.


#8

Interesting I will give that a shot right now.


#9

Yes! the incognito window worked. Thanks WCmore. Now I will see if I can make it work lol.