Control / Dim all lights….

I’m trying to create a Trigger that will dim all the lights that are currently ON. Anyone have any ideas how I can implement this?

Home Automation is more than just wanting things to happen, sometimes it takes some work, to get it to work the way you expect.  After all, computers are just really really fast idiots….  Take this case in point…  We simply want to dim any light that is on, to 50%…  Well, currently you would setup an Time/Date Action in Indigo, that would run an Applescript when you want to dim the lights…

tell application "IndigoServer"
  with timeout of 60 seconds
    try
      repeat with curDevice in devices
        status request (curDevice)
        set currentBright to brightness of curDevice
        if currentBright > 10 then brighten curDevice to 50
        if currentBright < 10 then brighten curDevice to 0
        delay 0.25
      end repeat
    end try
  end timeout
end tell

This script was originally written for Indigo 3, I believe…  And I ended up adding a small delay (which should be reduced if you are running an 2413 or 2412)…  Along with that, I ended up adding the less then 10 conditional, simply because for some reason some lights were being seen at 1 or 2%, even though as far as we knew they were off… So it would appear that an off lamp would suddenly brighten to 50%…  The conditional ensures that the light is off…  And now that I think about it, I think this script was originally written for X10 devices…  So I can’t recall if we ever saw the issue with Insteon units…?

Either way, this solves the issue…