Page 1 of 1
Combining solar panel systems
Posted: Thursday 13 April 2023 10:17
by bldewit
Hello,
Within the next few weeks we will be installing a second set of solar panels with it's own inverter. I can add this system to my Domoticz as a seperate unit, with it's own sensors, no problems there.
Additionally however, I would like to have a set of sensors that represent the total yield of both systems added together.
What would be the way to achieve this?
Many thanks!
Verstuurd vanaf mijn SM-T590 met Tapatalk
Re: Combining solar panel systems
Posted: Thursday 13 April 2023 11:25
by willemd
Create some dummy sensors and use a dzvents script, triggered by change in your solar panel sensors, to add the values together and store it on the dummy sensors.
Re: Combining solar panel systems
Posted: Tuesday 13 February 2024 12:17
by bldewit
Would you suggest singular dummy sensors for each value i wish to monitor or add a dummy Solar sensor? In the last case, how can i find out the variable names for the values i need to add?
Re: Combining solar panel systems
Posted: Tuesday 13 February 2024 13:21
by waltervl
This is the Dzvents script I use to combine my 3 inverters and put the value in a dummy custom sensor. You could make it fancier by using an energy counter but that makes more calculations needed that I did not want to do.
Code: Select all
return {
on = {
timer = {
'every 10 minutes'
},
},
execute = function(domoticz, device, timer)
-- Replace between () the idx or 'name' of your solar panel devices or put -- in front of it if you don't use it
local vandaagKwhzon = domoticz.devices(141).counterToday -
local vandaagKwhzon2 = domoticz.devices(184).counterToday
local vandaagKwhzon3 = domoticz.devices(478).counterToday
-- Create a customsensor with Kwh as variable and replace the idx or 'name' with your device name or idx
local zonTotaal = domoticz.devices(367)
-- calculate total kWh
local kwhOpbrengst = tonumber(domoticz.utils.round((vandaagKwhzon + vandaagKwhzon2 + vandaagKwhzon3),2))
-- update total custom sensor
zonTotaal.updateCustomSensor(kwhOpbrengst)
end
}
Re: Combining solar panel systems
Posted: Tuesday 13 February 2024 19:14
by bldewit
Looks superb, thx!
Re: Combining solar panel systems
Posted: Wednesday 28 February 2024 18:36
by bldewit
I added a custom sensor type Usage Electric. With the script above i get following message:
"2024-02-28 18:30:00.473 Error: dzVents: Error: (3.1.8) Method updateCustomSensor is not available for device "Solar Total Yield" (deviceType=Usage, deviceSubType=Electric). If you believe this is not correct, please report"
Have i done something wrong?
Re: Combining solar panel systems
Posted: Wednesday 28 February 2024 19:13
by waltervl
Re: Combining solar panel systems
Posted: Wednesday 28 February 2024 19:23
by bldewit
Created a new sensor type Counter, same error message...
Re: Combining solar panel systems
Posted: Wednesday 28 February 2024 19:40
by waltervl
Create a sensor type "Custom Sensor" as shown in the wiki link.
Re: Combining solar panel systems
Posted: Thursday 29 February 2024 10:58
by bldewit
waltervl wrote: ↑Wednesday 28 February 2024 19:40
Create a sensor type "Custom Sensor" as shown in the wiki link.
Right, got it now, that did the trick!