i am trying to make a script that should monitor the powerconsumption in domoticz (on raspberry). I know I cannot make this with the block events (well, I cannot find how to manage this), but also the lua script isnt working as expected (i know that i am doing something wrong).
what i want to establish is the following:
when powerconsuming is more then 2000watt for X minutes, i want a prowl message
when power after an hour is still >2000 watt, i again want a message that consumption is still more then 2000watt.
Also a message when power is < 2000 watt is what i want to have
I created a simple test script to start and test the (if more then 2000watt for 1 minute script) but it isnt working.
The Power2000 is a dummy switch, which in want to turn on when power is >2000 watt (thats working with blocks). For now i am turning it on manually.
i am really a new user, can someone help pointing me into the right direction?
Code: Select all
commandArray = {}
if (devicechanged['Power2000'] == 'On FOR 1' then
commandArray['SendNotification']='subject#body#extraData#0#bike'
end
return commandArray