Page 1 of 1

Cannot get Lux value...

Posted: Friday 16 June 2017 15:19
by dennusb
Hi all,

I have a nice Lux sensor in my Domoticz :
Image

I made a Lua script to get that Lux value and do things with it, i made a debug script to check why it's not working that contains :

Code: Select all

print('LUA Custom : Device changed, not triggered the donker scene')
print(' ####lux debug: ')
print(tonumber(otherdevices_svalues['Slaapkamer Lux_Utility']))
print(otherdevices_lastupdate['Slaapkamer Lux'])
But for whatever reason it's not printing the Lux value of the sensor... console output says :
2017-06-16 15:18:19.291 LUA: LUA Custom : Device changed, not triggered the donker scene
2017-06-16 15:18:19.291 LUA: ####lux debug:
Any idea on what i'm doing wrong?

Re: Cannot get Lux value...

Posted: Sunday 18 June 2017 8:23
by mrf68
Hi,

You're checking the values of sensor ['Slaapkamer Lux_Utility'], but the name of the sensor is ['Slaapkamer Lux'] ?