Aeon Multi Sensor 4 in 1 Light Level reading 0

I/m working to get a luup code to get the light variables, but whenever it runs it sending the variable as a zero. In the below code I have it to trigger if its below 20 but its triggering no matter what the level actually is. Any help would be greatly appreciated.
Douglas

local LOW_LEVEL = 20 – the light level threshold for night
local DEVICE_NO = 48 – the light sensor device number
local LS_SID = “urn:schemas-micasaverde-com:device:LightSensor:1” – the LightSensor service ID

local currentLevel = luup.variable_get (LS_SID, “CurrentLevel”, DEVICE_NO) or 0
currentLevel = tonumber(currentLevel)

if currentLevel <= LOW_LEVEL then
luup.call_action(“urn:upnp-org:serviceId:IOSPush1”, “SendPushOverNotification”,{ Title= “Light”, Message=currentLevel, Priority=1, URL=“”, URLTitle=“”, Sound=“Siren”}, 18)
else
return false
end

I think the syntax is local LS_SID = “urn:micasaverde-com:serviceId:LightSensor1” instead of local LS_SID = “urn:schemas-micasaverde-com:device:LightSensor:1”

Correct, you need to use the service id and not the device. So the correct anser as posted both would be:

urn:micasaverde-com:serviceId:LightSensor1

  • Garrett

Thank you the change works perfectly.