Combining solar panel systems
Moderator: leecollings
-
bldewit
- Posts: 61
- Joined: Tuesday 09 May 2017 23:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: NL
- Contact:
Combining solar panel systems
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
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
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
-
willemd
- Posts: 790
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2026.3
- Location: The Netherlands
- Contact:
Re: Combining solar panel systems
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.
-
bldewit
- Posts: 61
- Joined: Tuesday 09 May 2017 23:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: NL
- Contact:
Re: Combining solar panel systems
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?
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
- waltervl
- Posts: 7008
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: Combining solar panel systems
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
}
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
bldewit
- Posts: 61
- Joined: Tuesday 09 May 2017 23:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: NL
- Contact:
Re: Combining solar panel systems
Looks superb, thx!
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
-
bldewit
- Posts: 61
- Joined: Tuesday 09 May 2017 23:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: NL
- Contact:
Re: Combining solar panel systems
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?
"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?
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
- waltervl
- Posts: 7008
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: Combining solar panel systems
I made a custom sensor. So nothing electric.
https://www.domoticz.com/wiki/Dummy_for ... tom_Sensor
https://www.domoticz.com/wiki/Dummy_for ... tom_Sensor
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
bldewit
- Posts: 61
- Joined: Tuesday 09 May 2017 23:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: NL
- Contact:
Re: Combining solar panel systems
Created a new sensor type Counter, same error message... 
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
- waltervl
- Posts: 7008
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2026.3
- Location: NL
- Contact:
Re: Combining solar panel systems
Create a sensor type "Custom Sensor" as shown in the wiki link.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
bldewit
- Posts: 61
- Joined: Tuesday 09 May 2017 23:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: NL
- Contact:
Re: Combining solar panel systems
Right, got it now, that did the trick!waltervl wrote: Wednesday 28 February 2024 19:40 Create a sensor type "Custom Sensor" as shown in the wiki link.
-‐----------------------------------------------------------
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU
Running on rPi 3b (main) and rPi 2b (somfy), both RFLink
IthoRemote, Xiaomi Gateway, KAKU