Sorry, I've a problem and need to solve;
I have vera plus UI7 and using fibaro FGMS-001;
I've set up a scene where when sensor detect motion turn light on; I need to play this scene only when room light is under 50 lux...
so, using you expample I add in a scene this lua script (into "add lua code " inside a scene after trigger)
this is a lua code copy/past from scene:
local dID = 94 -- Device ID of your light sensor
local lLow = 0 -- Lowest level of range
local lHigh = 50 -- Highest level of range
local allow = true -- true runs scene when in range, false blocks it
local lCurrent = tonumber((luup.variable_get("urn:micasaverde-com:serviceId:LightSensor1","CurrentLevel",dID)))
return (((lCurrent >= lLow) and (lCurrent <= lHigh)) == allow)
using this link:
http://192.168.1.205:3480/data_request?id=status&output_format=xmlI obtain this:
<device id="94" PendingJobs="0" status="-1">
<states>
<state id="10" service="urn:micasaverde-com:serviceId:LightSensor1" variable="CurrentLevel" value="60"/>
<state id="11" service="urn:micasaverde-com:serviceId:HaDevice1" variable="Configured" value="0"/>
<state id="12" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="SensorMlType" value="3"/>
<state id="13" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="SensorMlScale" value="2"/>
<state id="14" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="VariablesGet" value=""/>
<state id="15" service="urn:micasaverde-com:serviceId:ZWaveDevice1" variable="ManufacturerInfo" value="0,0,0"/>
</states>
this is a sensor I use....
How you can see the sensor light value is 60 for LUX..but the scene is played ignoring the lux value..
PLEASE HELP TO SOLVE