I have again a Question and can´t find my Problem.
I try to send an email if the Temp of the Raspberry Pi is too high
and I like to add the Temperature to the Mail.
This is what I use:
Code: Select all
return {
on = {
devices = {'Raspi Internal Temperature'},
timer = { 'every Minute' } },
execute = function(domoticz, timer)
local temp = domoticz.devices('Raspi Internal Temperature').temperature
print(temp)
if domoticz.devices('Raspi Internal Temperature').temperature > 50 then
domoticz.email('Achtung Zentrale läuft heiß', 'Achtung Zentrale läuft heiß, Raspi überhitzt <br> Raspi Temperatur ist ' ..temp '°C', '[email protected]')
end
end
}
Code: Select all
2021-12-21 11:51:00.566 Error: dzVents: Error: (3.1.7) An error occurred when calling event handler Zentrale Temperatur >70
2021-12-21 11:51:00.566 Error: dzVents: Error: (3.1.7) ...ts/dzVents/generated_scripts/Zentrale Temperatur >70.lua:9: attempt to call a number value (local 'temp')
I think is is something small that I don´t see