GQuack Posted November 4, 2022 Posted November 4, 2022 I've come up with a potential use for the feature to specify a variable for a light device illumination level. I have a Scene with two devices, and within the Scene set both devices to use the variable for the ON level. I have programming that changes that variable based on certain conditions. What I expected to happen was that the Scene would turn on at that ON level at which the variable is currently set. What seems to happen is that the Scene always turns on at the ON level for the variable at the time that the Scene was created even if the variable is different. Is this correct?
Techman Posted November 4, 2022 Posted November 4, 2022 Can you post a copy of your program Is your variable state or integer?
GQuack Posted November 4, 2022 Author Posted November 4, 2022 @Techman Here's the scene. --------------------------------------------------------- $Dark_Ind is a State variable set at Dawn or Dusk $Hall_Illumination_Code is an Integer ---------------------------------------------------------- Set Dawn or Dusk Conditions If $Dark_Ind is 1 Then $Hall_Illumination_Code = 20 $Hall_Illumination_Code Init To 20 Else $Hall_Illumination_Code = 80 $Hall_Illumination_Code Init To 80 Hall_Grp_Motion_ON If 'Hall_Motion-Sensor' is switched On Then Set 'Hall_Lights_GRP' On '$Hall_Illumination_Code %' Else - No Actions - (To add one, press 'Action') Hall_Grp_Motion_OFF If 'Hall_Motion-Sensor' is switched Off Then Set 'Hall_Lights_GRP' Fast Off Else - No Actions - (To add one, press 'Action')
Techman Posted November 4, 2022 Posted November 4, 2022 For my lights, I use several scenes, each with different on levels, and call them up with a program. I've not tried your method, so not sure if it's viable. Under scene on levels, the only variable options I have are dates. 1
GQuack Posted November 5, 2022 Author Posted November 5, 2022 I was using multiple scenes before and thought this variable approach was much more....elegant. 1 scene instead of 3, 20%, 80%, 100%, and less code. If it doesn't work the way I thought it would, feels like a swing and a missed opportunity. The variable is being treated like a static value instead of.......a variable. That's weird that you have dates as an option for on levels, I have only percentages or variables to pick from, no dates. Doesn't make sense. I'm running 5.4.4.
Bumbershoot Posted November 5, 2022 Posted November 5, 2022 @GQuack, I'm not certain that you can do what you're trying to do without using the "adjust scene" functionality (which you'll find in the dropdown menu in the "Action" pane in the AC). I do something similar with the "adjust scene" functionality. Below is some code for a scene (this is for a 4-way setup) using an Insteon motion sensor as a controller (this program sets the on-level to 25% or 50%, based on time): West Hall On-Level - [ID 00B7][Parent 000A] If From Sunset + 1 hour To Sunrise (next day) Then In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallEntrance' To 25% in 0.5 seconds, 1 retry In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallLaundry' To 25% in 0.5 seconds, 1 retry In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallOffice' To 25% in 0.5 seconds, 1 retry Else In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallLaundry' To 50% in 0.5 seconds, 1 retry In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallEntrance' To 50% in 0.5 seconds, 1 retry In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallOffice' To 50% in 0.5 seconds, 1 retry Any time the scene is run, the lights turn on at the correct on-level. If you don't use "adjust scene", then the scene will remain static at the on-level values it was set up with.
MrBill Posted November 5, 2022 Posted November 5, 2022 @GQuack Insteon Scene's don't actually have a DIM value. This is actually a really complicated and confusing topic because some scene controllers can send Dim and Bright commands to scene members. Adding further confusion to the issue, some mobile interfaces have "calculated" values for a scene on percentage. However in raw form there is no such thing as a scene percentage for Insteon scenes. The reason the play button allows you to set a scene dim value is that for other scene types, for example "command" where the ISY is acting a "coordinator" such a setting should work (I haven't tried). Typically this type of scene would be used for z-wave switches, and "the popcorn effect" will be present. What can you do instead with Insteon Scenes? Use "Adjust Scene". Guest Bathroom light level - [ID 018A][Parent 0034] If From Sunset + 4 minutes and 44 seconds To Sunrise - 4 minutes and 44 seconds (next day) Then In 'Door Switches / Guest Bathroom - Door Open / Guest Bathroom - Door Closed' Set 'Guest Bathroom Vanity Light#' To 15% in 0.1 seconds, No retries Else In 'Door Switches / Guest Bathroom - Door Open / Guest Bathroom - Door Closed' Set 'Guest Bathroom Vanity Light#' To 100% in 2.0 seconds, No retries Was writing at the same time as @Bumbershoot , he beat me to the punch... leaving this because it does have additional "why" information. 1
larryllix Posted November 5, 2022 Posted November 5, 2022 Although I use preset scenes for some lighting, for variable lighting I do not use Insteon scenes. I just use ISY commands with the level % option, specified by a variable. To change the setting in an Insteon scene requires about 10-15 seconds and can get you caught in the middle of the process, under certain situations. IMHO that is asking for devices needing factory reset frequently after they get messed up. .
Bumbershoot Posted November 5, 2022 Posted November 5, 2022 11 minutes ago, larryllix said: Although I use preset scenes for some lighting, for variable lighting I do not use Insteon scenes. I just use ISY commands with the level % option, specified by a variable. To change the setting in an Insteon scene requires about 10-15 seconds and can get you caught in the middle of the process, under certain situations. IMHO that is asking for devices needing factory reset frequently after they get messed up. . @larryllix, in the areas where I use "adjust scene" (only in multi-way setups), I've never had an issue with any devices getting messed up, but I understand the concern. It takes a few seconds to write the new values to each device. @GQuack, I do set some light on-levels to a variable, but I set the values individually to each device in a scene. The program below actually contains two 3-way scenes, but the scene members are controlled individually - which I don't think it's strictly necessary to do - you can just set the on-level of the device that carries the load, though your switches will appear out of sync. KitchenLights - [ID 0077][Parent 000A] If $s.KitchenLights is not 1000 Then Set 'Devices / dirKitchen / sldKitchenSink' On '$s.KitchenLights %' Set 'Devices / dirKitchen / sldDining' On '$s.KitchenLights %' Set 'Devices / dirKitchen / sldKitchenIslandSouth' On '$s.KitchenLights %' Set 'Devices / dirKitchen / sldKitchenIslandNorth' On '$s.KitchenLights %' Set 'Devices / dirKitchen / sldTrackLightSouth' On '$s.KitchenLights %' Set 'Devices / dirKitchen / sldTrackLightNorth' On '$s.KitchenLights %' Set 'Devices / dirKitchen / sldUnderCounter' On '$s.KitchenLights %' Else - No Actions - (To add one, press 'Action') This program is used to interface with Alexa, and uses a STATE variable ($s.KitchenLights) to set a brightness value for the lights in the kitchen. "Alexa, set the kitchen lights to 50" will set the STATE variable to 50, which causes this program to run.
hart2hart Posted November 5, 2022 Posted November 5, 2022 I think Command was created to cover protocols/Node server devices other than Insteon but…Instead of Update Insteon, try Update Command and set the On Level to your variable.
GQuack Posted November 5, 2022 Author Posted November 5, 2022 Thanks all for the comments and this has been very helpful for my understanding. I’ve never used the Adjust Scene feature so seems a good time to learn. I would only be doing the adjust twice a day, once when it is dusk, once when it is dawn so hopefully will not experience any issues with the lag time.
larryllix Posted November 5, 2022 Posted November 5, 2022 8 minutes ago, GQuack said: Thanks all for the comments and this has been very helpful for my understanding. I’ve never used the Adjust Scene feature so seems a good time to learn. I would only be doing the adjust twice a day, once when it is dusk, once when it is dawn so hopefully will not experience any issues with the lag time. I have always used adjust scene for bedroom lamps and others that are not wanted at 100% in the middle of the night. It works well and only hits on the LampLincs twice per day. For other multi-bulb scenes, I use command levels % option for each light, especially where it may be a dynamic constantly changing level. eg. I developed a constant compensation for outdoor sunlight levels, where lights inside changed not only brightness levels, but colour temperature (warm to cool white) of the bulbs, based on time of day. The snag there was using lumen detectors (CAO Tags) that updated frequently and yet ran on batteries that would last for more than a few months. It is nice to turn over in bed some nights, triggering the MS and the lamps only illuminate to about 12%, as low as they will go reliably with a LampLinc and LED bulbs. I can still manually command either lamp to go on 90% vocally and it also disables the MS from setting that lamp back for two hours. ISY rocks.
MrBill Posted November 5, 2022 Posted November 5, 2022 13 minutes ago, GQuack said: Thanks all for the comments and this has been very helpful for my understanding. I’ve never used the Adjust Scene feature so seems a good time to learn. I would only be doing the adjust twice a day, once when it is dusk, once when it is dawn so hopefully will not experience any issues with the lag time. That's essentially what my example (and @Bumbershoot's is doing). Mine shows and offset of 4min 44seconds because I break up what happens at Sunset/Sunrise somewhat, there's a different program that runs at sunset and sunrise that generates a lot of Insteon traffic. Be sure if scheduling Sunset to Sunrise, that you set "next day" on the sunrise. Sunset will run THEN, and Sunrise(next day) will run Else.
larryllix Posted November 5, 2022 Posted November 5, 2022 4 minutes ago, MrBill said: That's essentially what my example (and @Bumbershoot's is doing). Mine shows and offset of 4min 44seconds because I break up what happens at Sunset/Sunrise somewhat, there's a different program that runs at sunset and sunrise that generates a lot of Insteon traffic. Be sure if scheduling Sunset to Sunrise, that you set "next day" on the sunrise. Sunset will run THEN, and Sunrise(next day) will run Else. Good advice. However I found for many by logic, I want the bulbs to go dim by time clock, rather than the sun times (I don't go to bed at 5 PM in the winter) so I make sure not too many are being hit on at the same time.
MrBill Posted November 5, 2022 Posted November 5, 2022 @GQuack As an afterthought, it's also important to understand that "Adjust Scene" adjusts the configuration of the scene, it does not adjust the current state of the scene. So if "adjusting" a scene that's currently on, nothing will appear to happen (i.e. the current state doesn't change).... but the next time Scene On is sent then the new configuration will be used.
GQuack Posted November 5, 2022 Author Posted November 5, 2022 Guess my lesson may have to wait for another day. My wife just told me she prefers to control the hall lights…GASP, manually! What is this world coming to??? 1
larryllix Posted November 5, 2022 Posted November 5, 2022 59 minutes ago, GQuack said: Guess my lesson may have to wait for another day. My wife just told me she prefers to control the hall lights…GASP, manually! What is this world coming to??? Some people just prefer to clean finger prints off light switches. Now you have to install a dimmer and who is going preset it it every morning and night to the correct levels? "Honest Daddy! I will feed the puppy every day...I promise!" 1
Recommended Posts