I tried dumping data from my device.
Whatever I try, there is an error about a nil value.
Code: Select all
local myDevice = 'YR weer'
return {
on = {
devices = {'YR weer'},
timer = {'every minute'},
},
logging = {
level = domoticz.LOG_DEBUG,
marker = 'Outside temperature',
},
execute = function(domoticz, triggeredItem)
-- myDevice.dump()
-- dumpDeviceStatus(item.data, myDevice)
-- dumpAttributes(myDevice)
local outside_temperature = domoticz.devices('YR weer').temperature
domoticz.log('temp = '.. outside_temperature, domoticz.LOG_DEBUG)
domoticz.notify('notifyer', YR .. ' outside temperature : '.. outside_temperature..'º',domoticz.PRIORITY_HIGH)
end
}
Code: Select all
2023-01-19 00:01:00.413 Error: dzVents: Error: (3.1.8) Outside temperature: An error occurred when calling event handler Temperatuur buiten
2023-01-19 00:01:00.413 Error: dzVents: Error: (3.1.8) Outside temperature: ...scripts/dzVents/generated_scripts/Temperatuur buiten.lua:16: bad argument #1 to 'dump' (function expected, got no value)