Page 1 of 1

Notification if power consumption is too high

Posted: Sunday 17 September 2017 22:14
by Slinkos
Hi all, I am tryting to find a solution for the following:

If the amound of electricity I'm using is above a certain kWh , for more than 10 minutes, I want to be notificated.
How can I do that? I tought to make a dummy switch with a delay. But when the power is above the amound of kwh, the delayed switch will go on, even if after the 10 minutes the kwh is at a normal point again.

I would also like to do a similair thing with my door sensor. If the door is open for more than 5 minutes or so, I want to be notificated.

Re: Notification if power consumption is too high

Posted: Sunday 17 September 2017 22:22
by mrf68
Hi,

create a dummy switch that turns on when using more than x kWh and turns of when using less. Check every minute (script_time) if the switch is on and when it last updated its status. When it's more than 10 minutes, then send a notification.

Same goes for the door contact. Get the difference between current time and last update, if more than 10 minutes and contact is open then send message.

Re: Notification if power consumption is too high

Posted: Sunday 17 September 2017 22:28
by Slinkos
Thanks that's a great solution! Didn't think of that.
Is there by any chance an example of a script_time script? I didn't use that before.

Re: Notification if power consumption is too high

Posted: Sunday 17 September 2017 22:32
by mrf68
Sure, you can find it in the WiKi:

https://www.domoticz.com/wiki/Event_script_examples

Re: Notification if power consumption is too high

Posted: Monday 18 September 2017 15:55
by Slinkos
Thanks I got it working now!