Gas staat aan

Gepubliceerd door Robot One op

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- Domotica voor ouderen
-- Waarschuw als het gas aan staat
--
return {
on = {
devices = {
'Gas'
}
},
execute = function(domoticz, trigger)
local gasnu = domoticz.devices('Gas').counterToday
local gaswas = domoticz.variables('gasdata').value
if (gasnu > gaswas) then
bericht1 = 'Gasverbruik: ' .. (gasnu - gaswas)*1000 .. 'l in 5 min = ' .. (gasnu-gaswas)*200 .. 'l/min'
-- check hoe lang geleden cv-ketel heeft aangestaan
verwarming = domoticz.devices('Verwarming brandt').lastUpdate.minutesAgo
if (verwarming > 15) then
bericht2 = 'Is het fornuis uit?'
domoticz.notify(bericht1,bericht2,PRIORITY_HIGH, nil, nil, domoticz.NSS_PUSHOVER)
else
bericht2 = 'Verwarmingsketel: ' .. verwarming .. ' min geleden laatste activiteit. Is het fornuis uit?'
domoticz.notify(bericht1,bericht2,PRIORITY_LOW, nil, nil, domoticz.NSS_PUSHOVER)
end
end
domoticz.variables('gasdata').set(gasnu)
end
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Categorieën: