I have got it working!
Now I have one device with the most recent solarpower output and a device with the total today.
Tomorrow I am gonna try to get this in the Energy dashboard.
Thanks for putting me in the right direction Walter.
need help dzevets script solar Toon
Moderator: leecollings
- waltervl
- Posts: 5775
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: need help dzevets script solar Toon
Probably not working like this but you never know...
You probably need the Electric (Instant and counter) for connecting Solar to the Energy Dashboard.
You probably need the Electric (Instant and counter) for connecting Solar to the Energy Dashboard.
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
-
- Posts: 20
- Joined: Tuesday 29 October 2024 12:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: need help dzevets script solar Toon
You are right.
But I made this from another piece of coding and adapted that to my needs. So the solarpower plus a zero device is now totalpower which shows up in the energy dashboard.
And I have total today also.
But I have 2 same scripts now, one with "current and one with "today"
I think this coud be running in one script but I have to figure that out.
But I made this from another piece of coding and adapted that to my needs. So the solarpower plus a zero device is now totalpower which shows up in the energy dashboard.
And I have total today also.
But I have 2 same scripts now, one with "current and one with "today"
I think this coud be running in one script but I have to figure that out.
- Attachments
-
- Schermafbeelding 2025-05-31 om 14.16.15.png (40.55 KiB) Viewed 98 times
- madpatrick
- Posts: 664
- Joined: Monday 26 December 2016 12:17
- Target OS: Linux
- Domoticz version: 2025.1
- Location: Netherlands
- Contact:
Re: need help dzevets script solar Toon
if you post your scripts we can have a look for you.
Post it as CODE (text in brackets) and not as a picture
Post it as CODE (text in brackets) and not as a picture
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2025.1 -=- Dashticz v3.14b on Tab8" =-
- waltervl
- Posts: 5775
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: need help dzevets script solar Toon
If you are filling the right data to the general kWh device totalPower you can delete the other 2.
It will also calculate the daily production for you but it needs a running total counter and not a daily (resetting to 0) counter.
You probably have to add JSON value "total". Please check if that total counter is increasing the same as the "today" value. It will help you a lot if you do this.
It will also calculate the daily production for you but it needs a running total counter and not a daily (resetting to 0) counter.
You probably have to add JSON value "total". Please check if that total counter is increasing the same as the "today" value. It will help you a lot if you do this.
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
-
- Posts: 20
- Joined: Tuesday 29 October 2024 12:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: need help dzevets script solar Toon
This is the "solar" script.
return {
on = {
timer = { 'every 1 minutes' },
httpResponses = { 'solar' }
},
execute = function(domoticz, item)
if (item.isTimer) then
domoticz.openURL({
url = 'http://192.168.1.56/solar.html',
method = 'GET',
callback = 'solar'
})
elseif (item.isHTTPResponse) then
if (item.ok) then -- statusCode == 2xx
local current = item.json.solar.current
domoticz.devices('solar').updateEnergy(current)
domoticz.log(' current = ' .. current, domoticz.LOG_INFO )
end
end
end
}
And this is the "today" script.
return {
on = {
timer = { 'every 1 minutes' },
httpResponses = { 'solar' }
},
execute = function(domoticz, item)
if (item.isTimer) then
domoticz.openURL({
url = 'http://192.168.1.56/solar.html',
method = 'GET',
callback = 'solar'
})
elseif (item.isHTTPResponse) then
if (item.ok) then -- statusCode == 2xx
local today = item.json.solar.today
domoticz.devices('PanelsToday').updateEnergy(today)
domoticz.log(' today = ' .. today, domoticz.LOG_INFO )
end
end
end
}
return {
on = {
timer = { 'every 1 minutes' },
httpResponses = { 'solar' }
},
execute = function(domoticz, item)
if (item.isTimer) then
domoticz.openURL({
url = 'http://192.168.1.56/solar.html',
method = 'GET',
callback = 'solar'
})
elseif (item.isHTTPResponse) then
if (item.ok) then -- statusCode == 2xx
local current = item.json.solar.current
domoticz.devices('solar').updateEnergy(current)
domoticz.log(' current = ' .. current, domoticz.LOG_INFO )
end
end
end
}
And this is the "today" script.
return {
on = {
timer = { 'every 1 minutes' },
httpResponses = { 'solar' }
},
execute = function(domoticz, item)
if (item.isTimer) then
domoticz.openURL({
url = 'http://192.168.1.56/solar.html',
method = 'GET',
callback = 'solar'
})
elseif (item.isHTTPResponse) then
if (item.ok) then -- statusCode == 2xx
local today = item.json.solar.today
domoticz.devices('PanelsToday').updateEnergy(today)
domoticz.log(' today = ' .. today, domoticz.LOG_INFO )
end
end
end
}
-
- Posts: 20
- Joined: Tuesday 29 October 2024 12:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: need help dzevets script solar Toon
I do not really need a total counter because I already have that on my Apsystems app.
Same as the lifetime calculator.
Most important for me is the "current" value to be used in the Energy Dashboard.
Same as the lifetime calculator.
Most important for me is the "current" value to be used in the Energy Dashboard.
- waltervl
- Posts: 5775
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: need help dzevets script solar Toon
The totalPower device can be used in the energy dashboard as it is now so what is the problem?
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
-
- Posts: 20
- Joined: Tuesday 29 October 2024 12:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: need help dzevets script solar Toon
There is no problem anymore.
You helped me in the right direction.
Only madpatrick asked me to show my 2 scripts so maybe we can combine them.
You helped me in the right direction.
Only madpatrick asked me to show my 2 scripts so maybe we can combine them.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest