Advanced scene with aeon labs multi sensor

Hello,

I want to make a scene with the aeon loabs multi sensor the sensor should turn the light on in the stairways.
But the light should only set on if it’s dark and if it’s after 20:00 the light should dim to 40% and it should turn off after 10 min. of the last motion detection.
Does somebody know if it’s possible with the vera lite?

Greetings Johan

ps sorry for my poor englisch

Please see see this thread for starters:

http://forum.micasaverde.com/index.php?topic=18679.0

  • Garrett

Thank you

I will try to make the scene by luup code :smiley:

But one question before i start ;D
Must i make two scene’s one for daytime and one for the night?

Greetings Johan

I made the follow code but i get a startup failure can somebody see what i’m doing wrong?
local pStart = “21:00” – Start of time period
local pEnd = “21:45” – End of time period
local dID = 34 – Device ID of your light sensor
local lLow = 0 – Lowest level of range
local lHigh = 100 – Highest level of range
local allow = true – true runs scene when in range, false blocks it
local hS, mS = string.match(pStart,“(%d+)%:(%d+)”)
local mStart = (hS * 60) + mS
local hE, mE = string.match(pEnd,“(%d+)%:(%d+)”)
local mEnd = (hE * 60) + mE
local tNow = os.date(“*t”)
local mNow = (tNow.hour * 60) + tNow.min
if mEnd >= mStart then
return (((mNow >= mStart) and (mNow <= mEnd)) == allow)
else
return (((mNow >= mStart) or (mNow <= mEnd)) == allow)

local lCurrent = tonumber((luup.variable_get(“urn:micasaverde-com:serviceId:LightSensor1”,“CurrentLevel”,dID)))
return (((lCurrent >= lLow) and (lCurrent <= lHigh)) == allow)