Announcement

Collapse
No announcement yet.

Default Lighting State Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Default Lighting State Script

    I have a number of outside lights, etc. that need to be on at various levels during the day/evening/night. When I manually change them, I need them to go back to where they were. I could either go to the trouble of creating a reset event that I could fire X minutes after every manual change (assuming I it) or....

    Create a single lighting script with a config file that determines the light settings at any given time and sets them.

    I just fire it every 10 minutes. And I know my lights are always back where they are supposed to be.

    I've been asked to share it, so here it is.

    Put both files in the scripts directory. Edit the lights.xml to define your own lights and groups. And create a recurring event to fire it every so often.

    I left in a bunch of remarked debugging log statements. And the XML is pretty simple. (Both in structure and use...)

    Let me know if this proves useful to anyone.

    -Scott

    (Reminder: You will need to add a scripting reference for System.XML in your config.ini file for this script to work. See the HS docs about VB.Net Scripting Namespaces.)

    -----------------------

    Note to self: Never upload code at midnight. You'll grab an old version.

    Note to everyone else: Lights.zip updated with a version of lights.vb that will set the lights to something other than default.

    This new version also has To/From display which makes it much easier to figure out why your DIM commands keep resending. (I was setting DIM 20 which isn't a 'real' state for my modules. They go to the nearest value which is 24. ) Seeing the values is a big help... Updated Sample XML as well.
    Attached Files
    Last edited by MrSkippy; May 27, 2008, 03:53 AM. Reason: Upload correct version of script...
Working...
X