i've implemented the Domotics Energy view by using P1 data from my 'slimme meter'
Some virtual devives are added by the installation script for a 3phase environment i have the device "kWh Delivery L3 (Calculated)"
Ill gives the Power wich sended back at the grid when there is enough sun on the panels. The value = 0 or positive in watts
So i want to us the script below to switch ON a Tasmota device if Power > 1000 Watt and switch off when it come's below 500 watt
below my script :
Code: Select all
return {
active = true,
on = {
devices = {"kWh Delivery L3 (Calculated)"}
},
execute = function(domoticz, device)
if (domoticz.devices("Tas76-ZonneStroom").state == 'Off' and
domoticz.devices("kWh Delivery L3 (Calculated)").Watt ~= nil and
domoticz.devices("kWh Delivery L3 (Calculated)").Watt > 1000 )
then
domoticz.devices("Tas76-ZonneStroom").switchOn()
end
end
}
Can somebody help me with this script ?
Thanks a lot
Rob