Page 1 of 1

PVOutput (input)

Posted: Friday 12 July 2019 12:55
by florisi
I have SolarEdge solarpanels.
Last february they were broken.
Now I want a dzVents that checks if the panels still produce power.

It has to check between 11 AM en 1 PM if they are working, if not I want to have a Pushover alert.
My script now is this:

Code: Select all

return {
   on = {
       timer = {"every 10 Minutes between 11:00 and 13:00"}},
   execute = function(domoticz, timer)
      if domoticz.devices('PVOutput') = 0 then
         domoticz.notify('Zonnepanelen!','De zonnepanelen leveren GEEN stroom',SOUND_MAGIC,domoticz.PRIORITY_LOW,domoticz.NSS_PUSHOVER)
      end
   end
}
But that gives me an error in the log. What is wrong?

Code: Select all

2019-07-12 12:50:00.475 Status: dzVents: Info: ------ Start internal script: Zonnepanelen:, trigger: every 10 minutes between 08:30 and 19:30
2019-07-12 12:50:00.494 Status: dzVents: Error (2.4.19): An error occured when calling event handler Zonnepanelen
2019-07-12 12:50:00.495 Status: dzVents: Error (2.4.19): ...oticz/scripts/dzVents/generated_scripts/Zonnepanelen.lua:5: attempt to compare number with table
2019-07-12 12:50:00.495 Status: dzVents: Info: ------ Finished Zonnepanelen

Re: PVOutput (input)

Posted: Friday 12 July 2019 16:17
by knielen
try:

Code: Select all

return {
   on = {
       timer = {"every 10 Minutes between 11:00 and 13:00"}},
   execute = function(domoticz, timer)
      if domoticz.devices('PVOutput').usage == 0 then
         domoticz.notify('Zonnepanelen!','De zonnepanelen leveren GEEN stroom',SOUND_MAGIC,domoticz.PRIORITY_LOW,domoticz.NSS_PUSHOVER)
      end
   end
}

Re: PVOutput (input)  [Solved]

Posted: Friday 12 July 2019 17:24
by florisi
Thanks, it works.