Hello,
I want to make a script that sends me a push notification at the end of the day when the sun is down.
The script must send me information about the solar produce of my solar system.
In my dashboard i can see the produce of the day, unfortunately i don's see that information by "show current states". Can anybody help me to get the day produce from the Domoticz database so i can use it in LUA?
Greets Richard,
Pushnotification of Solarproduce at sunset
Moderator: leecollings
Re: Pushnotification of Solarproduce at sunset
Hi Richard,
Your question got me interested in wanting the same functionality. Otherdevices_svalues show the current production and the overall production but, as you mentioned, not the daily production. Maybe you could store the value of the overall production as a variable. Then the next day you do the same in a different variable and then calculate: var2 - var1. Then copy var2 to var1 and so on. I havent looked into the way how to scrap the right value off the otherdevices_svalues.
I am using node-red and found it easier to create a flow there which gets some info from the SolarEdge website, isolates the total day production and sends this information to my phone.
Regards,
Martin
Your question got me interested in wanting the same functionality. Otherdevices_svalues show the current production and the overall production but, as you mentioned, not the daily production. Maybe you could store the value of the overall production as a variable. Then the next day you do the same in a different variable and then calculate: var2 - var1. Then copy var2 to var1 and so on. I havent looked into the way how to scrap the right value off the otherdevices_svalues.
I am using node-red and found it easier to create a flow there which gets some info from the SolarEdge website, isolates the total day production and sends this information to my phone.
Regards,
Martin
-
- Posts: 118
- Joined: Saturday 31 August 2013 14:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Eindhoven (NL)
- Contact:
Re: Pushnotification of Solarproduce at sunset
I use this. and works for me
Code: Select all
commandArray = {}
CurrentWattSolar,sTotalKWhSolar = otherdevices_svalues['Kostal']:match("([^;]+);([^;]+)")
CurrentWattSolar=tonumber(CurrentWattSolar)
if (os.date("%H:%M") == '22:10' )then
CurrentWattSolar,sTotalKWhSolar = otherdevices_svalues['Kostal']:match("([^;]+);([^;]+)")
commandArray['Variable:TodayKWhSolar'] = tostring(sTotalKWhSolar/1000)
commandArray['Variable:YesterdayKWhSolar'] = tostring((sTotalKWhSolar/1000) + (uservariables["YesterdayKWhSolar"]))
commandArray['SendNotification']=(string.format("1Opbrengst zonnepanelen#De opbrengst van vandaag is %s KWh", tostring(sTotalKWhSolar/1000)))
end
Who is online
Users browsing this forum: Google [Bot] and 1 guest