Activate switch when there is solar excess production

Post Reply
sovking
Posts: 2
Joined: Friday 23 December 2016 12:48
Target OS: Linux
Domoticz version:
Contact:

Activate switch when there is solar excess production

Post by sovking » Friday 23 December 2016 13:02

Hi all,
I would like to use event for activate a switch connected to a load (my PDC) when there is solar production.

I'have already:
  • configured a switch that succesfully control PDC;
  • configured an utility sensor where I read when I have an instant solar excess production. Such sensor shows current power watts which is < 0 when I export energy and is > 0 when I import energy.


I have tried to configure an event but I'm not satisfied.

I would like to implement through events such automatic behaviour
  • Switch on the PDC when there is power is < -1000 (I'm exporting energy with instant power of at least 1000 Watt)
  • Keep the PDC on even if instant power is > -1000 for at least 3 hours.
  • Switch off the PDC when the istant power is > 1000 and at least 3 hours have elapsed from last power on.
Second objective:
Set up a virtual selector switch to manage the following behaviour:
  • Force the PDC switch to OFF.
  • Automatic PDC switch as described above.
  • Force the PDC switch to ON

User avatar
jannl
Posts: 955
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Geleen
Contact:

Re: Activate switch when there is solar excess production

Post by jannl » Friday 23 December 2016 14:04

Basically this looks quite easy in lua, so what is your question?

sovking
Posts: 2
Joined: Friday 23 December 2016 12:48
Target OS: Linux
Domoticz version:
Contact:

Re: Activate switch when there is solar excess production

Post by sovking » Friday 23 December 2016 17:11

Lua is necessary or it can be done using just Events/blocky ?

The automatic behaviour implemented with blocky miss the part "run at least for 3 hours".
Then I don't know to implement Automatic/Force switch.

There is any way to use the existing interface to do this ? Or I have to to everything with Lua ?
Is better to use Lua or dzEvents for this task ?

Any suggestion about such Lua scripts ? Or any pointer to similar script already posted in this forum ?

Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests