Persistent data error
Posted: Monday 18 September 2017 20:14
I'm trying to make a dzVents Lua script with persistent data in it. I have read the documentation on the wiki, but can't find what I'm doing wrong. I'm on version 8394.
Simple script:
Can someone help me?
I see the following error in the log:
Simple script:
Code: Select all
return {
active = true,
logging = {
level = domoticz.LOG_INFO
marker = 'TEST '
},
on = {
devices = {
'Wasmachine2'
},
data = {
temperatures = {history = true, maxItems = 10}
},
},
-- actual event code
-- in case of a timer event or security event, device == nil
execute = function(domoticz, device)
domoticz.data.temperatures.add(device.state)
end
}I see the following error in the log:
2017-09-18 20:07:37.765 Error: dzVents: Error: 0-Watt : An error occured when calling event handler dzVentsTest
2017-09-18 20:07:37.765 Error: dzVents: Error: 0-Watt : ...moticz/scripts/dzVents/generated_scripts/dzVentsTest.lua:20: attempt to index field 'data' (a nil value)