Page 1 of 1

Lua Parsers Script - global tables

Posted: Tuesday 08 May 2018 15:28
by boe666
Hi. I have a problem, becouse i can't read actual sesnor's value in Json lua_parsers
My local modules invoke special URL on every 5 seconds with parameters (state of sensors) and my lua scripts parse it and if the values changed - make a domoticz_updateDevice procedure.
Now the otherdevices_svalues return nothing so i have a touhsand same values in log on each sensors - i can't check this in domoticz becouse web side hang up.
Example:
tem = tonumber(uri['sensor1'])
if (tem == 0 and otherdevices_svalues['sesnsor_name'] ~= 'Off') then domoticz_updateDevice(11,0,'Off') else end
if (tem == 1 and otherdevices_svalues['sensor_name'] ~= 'On') then domoticz_updateDevice(11,1,'On') else end

I don't know when, but i think - 3 months ago it worked perfect.
I tried on stable version and newest unstable.

For Now - Global tables like otherdevice_svalue and other - are EMPTY.
Is it error or normal situation ?
Please help.

Re: Lua Parsers Script - global tables

Posted: Thursday 10 May 2018 20:27
by boe666
Somebody can say about my problem. Is it normal sytuation when I can't get access to global tables in lua_parsers scripts ?
I have to make choice - wait for fix error or change method to read status of my sensors.
For now - I have thousands logs on each sesnsor so I can't read the logs (domoticz hung up).
Please for respond.

Re: Lua Parsers Script - global tables

Posted: Sunday 02 February 2020 13:35
by ajay100
This is an old thread, but for those searching for the answer, it appears from what I have found that global tables (i.e. uservariables, etc.) are not available to LUA Parser scripts. I am experimenting with/learning about dzVents now to see if this will help. Corrections welcome.