Another washing machine
Posted: Friday 20 January 2023 13:55
Hi,
I have searched and found some example scripts but they look way to complex and I have a hard time to follow them.
Example this one viewtopic.php?t=23798
Have a combo machine so both dryer and washer.
I have one plug that also measure consumption.
Name:
"Tvättmaskin: Current Watt Meter" ( Current watt )
"Tvättmaskin" (Status: On or Off)
This is the pattern for my machine is this ( 1515 - 1930 )

0 watt = off
>6 watt = low cycle
2200 watt = High cycle
So I created this, gives me a error "unexpected symbol" }
But will this work?
I have searched and found some example scripts but they look way to complex and I have a hard time to follow them.
Example this one viewtopic.php?t=23798
Have a combo machine so both dryer and washer.
I have one plug that also measure consumption.
Name:
"Tvättmaskin: Current Watt Meter" ( Current watt )
"Tvättmaskin" (Status: On or Off)
This is the pattern for my machine is this ( 1515 - 1930 )

0 watt = off
>6 watt = low cycle
2200 watt = High cycle
So I created this, gives me a error "unexpected symbol" }
But will this work?
Code: Select all
return {
on = {
devices = {
'Tvättmaskin: Current Watt Meter'
}
},
logging = {
level = domoticz.LOG_INFO,
marker = 'Tvättmaskin',
},
data ={
CurrentWatt = { initial = 0 }
},
execute = function(dz, device)
if device.actualWatt > 0 then
dz.data.CurrentWatt = device.actualWatt
else
if dz.data.CurrentWatt > 0 and dz.data.CurrentWatt.lastUpdate.minutesAgo then
dz.notify("Tvätt klar",1,dz.PRIORITY_NORMAL,dz.NSS_HTTP)
dz.data.CurrentWatt = 0
end
end
}