Many ways seem available to upload data to Sonnenertrag.eu
Before the 'big shift' at Sonnenertrag.eu in 2018 I had (historically developed) 3 PV-subsystems running based on the importlink with PVOutp.org, and those 3 subsystems happily restarted after 'revival' of Sonnenertrag.eu
For my latest addition to the PV-configuration I tried to link also the subject PVOutput-sid to Sonnenertrag.eu, but unfortunately the setup for id+sid was refused by Sonnenertrag.eu for reason which basically translates to 'Sonnenertrag cannot read the pvo-account: power-setting not matching'.
Surprising, because no problem for the 3 earlier PVO-sids.
Looking at the example-info would not be surprised if Sonnenertrag.eu also 'stumbles' at my latest PVO-addition having an sid of 5 digits, and (according to example-text) Sonnenertrag only assuming an input of 4 digits.
Annoying that for 1 PV-subsystem no compatible automatic companion upload from PVOutput.org of info to Sonnenertrag.eu
In the setup-menu for upload of PV-inverter info to Sonnenertrag.eu is an Option for 'Self-made' datalogger.
Implicitly it means that then a protocol must be applied compatible with Sonnenertrag's data-entry portal.
Should be in the WiKi of Sonnenertrag, but calling wiki-url = 'no response' = blank screen and waiting forever .......
Access to Sonnenertrag by GoogleChrome is generally slightly quicker/better than with Firefox, but not in this case.
19July2021:
First section from next message shifted into this message.
'No response' probably is an aspect related to the O.S in combination with Browsertype.
Above comment is applicable for Windows@PC, but not for iOS@iPad: see next message.
Protocol for Upload to Sonnenertrag.eu
Moderator: leecollings
-
Toulon7559
- Posts: 859
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: <2025
- Location: Hengelo(Ov)/NL
- Contact:
Protocol for Upload to Sonnenertrag.eu
Last edited by Toulon7559 on Sunday 01 August 2021 11:21, edited 8 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
-
Toulon7559
- Posts: 859
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: <2025
- Location: Hengelo(Ov)/NL
- Contact:
Re: Protocol for Upload to Sonnenertrag.eu
As indicated, need to find an alternative solution for data-upload.
Recently revisiting this question, and with some different Google-searchkeywords, now seem to have found access to the wiki of Sonnenertrag.eu and to some related forum-messages.
Do not ask why, but not on my PC&Windows, but on my iPad I can reach the wiki of Sonnenertrag.eu (through a direct call to lower level of the wiki):
e.g. https://wiki.sonnenertrag.eu/datenimport:json and https://wiki.sonnenertrag.eu/datenimport:selfmade and https://wiki.sonnenertrag.eu/datenimpor ... g:solarlog
The required general setup is best summarized in wiki-section https://wiki.sonnenertrag.eu/datenimpor ... aussetzung and it's subsections
On file-handling some practical example-info from users at https://www.photovoltaikforum.com/threa ... -erzeugen/
The description below is resulting from my experiments using bits & pieces of info to get (with try & error) a working implementation of 'Selfmade' upload.
A rather long story, but no reason that 'successors' in this forum meet the same pitfalls and/or need to reinvent the wheel:
summary below with the bloody details to be found in the spoiler .....
1. Manual filling of data-gaps
Manual filling of the gaps is applicable if you already have some registration of values before you try to start automatic upload towards Sonnenertrag.eu, and would like to include historic data into that registration. Useful to get acquainted with Sonnenertrag.eu
Is basic setup if you just want manual data entry per completed month (considering automatic upload a luxury)
2 Possible layouts for data-processing:
either highly detailed by insertion of value-per-day, or by value-per-month with min. & max.
Can be selected in bottom rows of upper right corner of UserMenu, and
then manually enter the required data for the (incomplete) month(s) in the database of Sonnenertrag.eu
2. Filling of data-gaps by Upload of Month-infotable
For automated upload of month-data, goto setup-window for your installation [= top rows of upper right corner of UserMenu]
For 'Selfmade'-import it is required that in the 3rd setup-window you insert the hosting-url = http://<hosting-folder>/months.js
<hosting-folder> is your privately selected designated folder at a server at internet to which your system uploads the file, to be grabbed by Sonnenertrag.eu at a later time [= next morning].
2 Files are needed as inputs, to be placed at <hosting-folder>:
- File base_vars.js is required for the configuration setup of the 'Selfmade' data-import.
- File months.js contains data per month: from months.js each morning only latest 3 months in the file are being read by Sonnenertrag.eu
3. Filling of data-gaps by Upload of Day-infotable
For this mode of operation it is required that in the setup-window for 'Selfmade'-import you keep the hosting-url http://<hosting-folder>/months.js
- File base_vars.js is required same as in 2.
- File days_hist.js contains data per day: from days_hist.js each morning only latest day is being read by Sonnenertrag.eu
For subsequent automatic upload starting 'today' then 'only' the development is required of a small script [using lua or Python or dzVents or ...] generating the required js-files and daily uploading them to the tested <hosting-folder> for pick-up by Sonnenertrag.eu in the next morning of upload-files:
- months.js (to be generated/uploaded at the end of each day)
- days_hist.js (also to be generated/uploaded at end of each day)
- base_vars.js (once-only effort to make and upload this file, as configuration-reference)
You have choice for implementation using either months.js (with daily update for production of running month), or days.hist.js (reporting daily production)
Just wondering whether & why to generate & upload the other file min_day.js as mentioned in wiki and forum-messages:
- min_day.js only seems required if you like to join the competition to be the daily topstation at Sonnenertrag.eu
[it also keeps your system busy with an upload desired every 5 minutes]
July 15th till July 20th, 2021:
Editing to include some more explanation, for own experience with automated month-input, for alignment with previous & next messages, shifting experimental details to the spoiler
Recently revisiting this question, and with some different Google-searchkeywords, now seem to have found access to the wiki of Sonnenertrag.eu and to some related forum-messages.
Do not ask why, but not on my PC&Windows, but on my iPad I can reach the wiki of Sonnenertrag.eu (through a direct call to lower level of the wiki):
e.g. https://wiki.sonnenertrag.eu/datenimport:json and https://wiki.sonnenertrag.eu/datenimport:selfmade and https://wiki.sonnenertrag.eu/datenimpor ... g:solarlog
The required general setup is best summarized in wiki-section https://wiki.sonnenertrag.eu/datenimpor ... aussetzung and it's subsections
On file-handling some practical example-info from users at https://www.photovoltaikforum.com/threa ... -erzeugen/
The description below is resulting from my experiments using bits & pieces of info to get (with try & error) a working implementation of 'Selfmade' upload.
A rather long story, but no reason that 'successors' in this forum meet the same pitfalls and/or need to reinvent the wheel:
summary below with the bloody details to be found in the spoiler .....
1. Manual filling of data-gaps
Manual filling of the gaps is applicable if you already have some registration of values before you try to start automatic upload towards Sonnenertrag.eu, and would like to include historic data into that registration. Useful to get acquainted with Sonnenertrag.eu
Is basic setup if you just want manual data entry per completed month (considering automatic upload a luxury)
2 Possible layouts for data-processing:
either highly detailed by insertion of value-per-day, or by value-per-month with min. & max.
Can be selected in bottom rows of upper right corner of UserMenu, and
then manually enter the required data for the (incomplete) month(s) in the database of Sonnenertrag.eu
2. Filling of data-gaps by Upload of Month-infotable
For automated upload of month-data, goto setup-window for your installation [= top rows of upper right corner of UserMenu]
For 'Selfmade'-import it is required that in the 3rd setup-window you insert the hosting-url = http://<hosting-folder>/months.js
<hosting-folder> is your privately selected designated folder at a server at internet to which your system uploads the file, to be grabbed by Sonnenertrag.eu at a later time [= next morning].
2 Files are needed as inputs, to be placed at <hosting-folder>:
- File base_vars.js is required for the configuration setup of the 'Selfmade' data-import.
- File months.js contains data per month: from months.js each morning only latest 3 months in the file are being read by Sonnenertrag.eu
3. Filling of data-gaps by Upload of Day-infotable
For this mode of operation it is required that in the setup-window for 'Selfmade'-import you keep the hosting-url http://<hosting-folder>/months.js
- File base_vars.js is required same as in 2.
- File days_hist.js contains data per day: from days_hist.js each morning only latest day is being read by Sonnenertrag.eu
- Spoiler: show
For subsequent automatic upload starting 'today' then 'only' the development is required of a small script [using lua or Python or dzVents or ...] generating the required js-files and daily uploading them to the tested <hosting-folder> for pick-up by Sonnenertrag.eu in the next morning of upload-files:
- months.js (to be generated/uploaded at the end of each day)
- days_hist.js (also to be generated/uploaded at end of each day)
- base_vars.js (once-only effort to make and upload this file, as configuration-reference)
You have choice for implementation using either months.js (with daily update for production of running month), or days.hist.js (reporting daily production)
Just wondering whether & why to generate & upload the other file min_day.js as mentioned in wiki and forum-messages:
- min_day.js only seems required if you like to join the competition to be the daily topstation at Sonnenertrag.eu
[it also keeps your system busy with an upload desired every 5 minutes]
July 15th till July 20th, 2021:
Editing to include some more explanation, for own experience with automated month-input, for alignment with previous & next messages, shifting experimental details to the spoiler
Last edited by Toulon7559 on Friday 13 August 2021 15:50, edited 23 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
-
Toulon7559
- Posts: 859
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: <2025
- Location: Hengelo(Ov)/NL
- Contact:
Re: Protocol for Upload to Sonnenertrag.eu
Devil is in details
The startup-section of a lua-script for setting, reading & compilation of Time & PV-values is 'as usual', and therefore not described in this message.
Input/upload of day-values being the simplest approach, next segment of script is intended to generate the required outputfile days_hist.js
But that causes an error-report
Obviously 3* " in row is not acceptable for lua-script.
Have tried a trick working for upload to WUnderground, by insertion of the ASCII-code for "
=> no problems generating the output-file, but the resulting file is not accepted at Sonnenertrag.eu
Anybody knowing a method to generate that " as part of the outputstring?
23July2021:
Top 2 lines edited, and next info added as explanation.
At PVOutput.org we are accustomed that an upload results in refresh of data in tables and graphs with short delay, enabling display of 'Live' data.
Be aware that the server(s) of Sonnenertrag.eu grab(s) data from the uploaded files only once a day for values of the previous day (or further back in history).
Detected impact of that aspect, because now using 2 different protocols for upload to Sonnenertrag.eu.
The wiki explains and tells at which grabbing-times for which upload-configuration [ROM = somewhere between midnight and noon].
Also to bear in mind that Sonnenertrag.eu at 14:30 each day has another, general grabbing-run to include any upload missed in the first grabbing-run!!!
Implication: generate & upload the day's value at the end of the day and keep unchanged until next evening.
= Only update & upload the actual values after sunset!!!!!
The startup-section of a lua-script for setting, reading & compilation of Time & PV-values is 'as usual', and therefore not described in this message.
Input/upload of day-values being the simplest approach, next segment of script is intended to generate the required outputfile days_hist.js
Code: Select all
-- Line099 = Generate the upload-file in the period between 23:45 till 00:00
-- Upload-file days_hist.js must have contents/line like da[dx++]="01.07.21|210;81" [for info: ASCII-code for " is B2]
if ((hourvalue > 22) and (minutes > 45)) then
file = io.open("/home/pi/days_hist.js", "w+")
-- Opens a working file named day_hist.js (stored under the designated sub-folder of Domoticz)
-- not (yet) in append mode for growing list, but as rewrite [= 1 line with latest, actual info]
-- Line105 = write line to opened file
file:write("da[dx++]=" .. """ .. day .. "." .. month .. "." .. year_short .. "|" .. actldayenergy0580 .. ";".. maxdaypower0580 .. """ .. "\n")
file:close() -- closes the open file
-- Line 108 = Next line is required to set permissions for open©&shift of the file
os.execute("chmod a+rw /home/pi/days_hist.js")
end
Code: Select all
2021-07-06 10:29:00.482 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_SE0580_Ginlong_upload_energy00_RPI3B4.lua: ...ua/script_time_SE0580_Ginlong_upload_energy00_RPI3B4.lua:104: ')' expected near '" .. day .. "'Have tried a trick working for upload to WUnderground, by insertion of the ASCII-code for "
Code: Select all
file:write("da[dx++]=" .. "%B2" .. day .. "." .. month .. "." .. year_short .. "|" .. actldayenergy0580 .. ";".. maxdaypower0580 .. "%B2" .. "\n")Anybody knowing a method to generate that " as part of the outputstring?
23July2021:
Top 2 lines edited, and next info added as explanation.
At PVOutput.org we are accustomed that an upload results in refresh of data in tables and graphs with short delay, enabling display of 'Live' data.
Be aware that the server(s) of Sonnenertrag.eu grab(s) data from the uploaded files only once a day for values of the previous day (or further back in history).
Detected impact of that aspect, because now using 2 different protocols for upload to Sonnenertrag.eu.
The wiki explains and tells at which grabbing-times for which upload-configuration [ROM = somewhere between midnight and noon].
Also to bear in mind that Sonnenertrag.eu at 14:30 each day has another, general grabbing-run to include any upload missed in the first grabbing-run!!!
Implication: generate & upload the day's value at the end of the day and keep unchanged until next evening.
= Only update & upload the actual values after sunset!!!!!
Last edited by Toulon7559 on Friday 23 July 2021 17:53, edited 12 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Re: Protocol for Upload to Sonnenertrag.eu
Normally this could done by ""' (single double single).
Sometimes it also works with an extra (fourth) " (double).
I looked at that site, lot of the things on the website don't even work properly, that does not promise anything good for the data part.
I upload to pvoutput and that works fine.
Sometimes it also works with an extra (fourth) " (double).
I looked at that site, lot of the things on the website don't even work properly, that does not promise anything good for the data part.
I upload to pvoutput and that works fine.
-
Toulon7559
- Posts: 859
- Joined: Sunday 23 February 2014 17:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: <2025
- Location: Hengelo(Ov)/NL
- Contact:
Re: Protocol for Upload to Sonnenertrag.eu
@EddyG
Like you, using PVOutput.org as main collector, register & presenter for my PV-data.
Indeed at Sonnenertrag.eu quite a few functions seem inactive since custodianship of the organisation shifted to other hands.
Surprising that some functions don't work via Windows@PC, but on other hand can be used via iOS@iPad.
Things also do not always work according to the available descriptions, or not at all ......
Observations during first month of operation:
Manually inserted missing month-values [if without any supporting day-values in the background] for unclear reasons sometimes disappear from the database
=> Important to keep your notes, enabling a quick re-insertion of values!
=> more permanent solution is the (laboursome) manual insertion of missing background day-values.
Also the automatically online-inserted day-values do not seem to cumulate inside the database to the related, expected actual month-value.
=> Requires constant watch on progress etc.
Lacking & lagging maintenance and instability of the website??
However, 3 subsystems for more than 10 years running (without problems) towards that database (in fact by reading through link from PVOut.org) is a reason to still try to add the 4th subsystem to that configuration: 'more of the same' and keeping the long history at one place.
Essential is that the registration of values for the own PV-system is OK, even if 'some' doubt about the values for country & province.
Functional argument to stay:
- their graphs expressing in kW/Wp are a nice way for relative comparison over the life-cycle and to other systems.
Some message in the Photovoltaik Forum (which is labelled to be the forum supporting Sonnenertrag.eu) seems to hint that other 'separators' than "(=double) are allowed.
Tried 2 variations towards Sonnenertrag.eu:
Unfortunately in this aspect Sonnenertrag.eu is very stubborn, and only accepts "(=double) as 'separator'.
Your hint to '"" (single-double-single) did the trick in the lua-script, now producing the acceptable string.
Therefore the subject scriptline to be changed into
The examples in their wiki show integer values, but real values are accepted as well:
output of integer values requires insertion of some script-lines with a rounding function for those values.
The end-result counts:
basic form is a working script for automated upload of daily values by means of 'Selfmade' datalogger in Domoticz' lua-script
[you just need to add 'head&tail' to the segment mentioned in the previous messasage, as amended in this message]
Based on experience, seems required that monthly value is checked at end of the finished month:
each month a manual action for end-of-month value is quick & easy, while a scripting solution to automatically generate the end-of-month-value is much more effort.
August01, 2021:
inserted redmarked and italic text
August11, 2021:
added bottom line
Like you, using PVOutput.org as main collector, register & presenter for my PV-data.
Indeed at Sonnenertrag.eu quite a few functions seem inactive since custodianship of the organisation shifted to other hands.
Surprising that some functions don't work via Windows@PC, but on other hand can be used via iOS@iPad.
Things also do not always work according to the available descriptions, or not at all ......
Observations during first month of operation:
Manually inserted missing month-values [if without any supporting day-values in the background] for unclear reasons sometimes disappear from the database
=> Important to keep your notes, enabling a quick re-insertion of values!
=> more permanent solution is the (laboursome) manual insertion of missing background day-values.
Also the automatically online-inserted day-values do not seem to cumulate inside the database to the related, expected actual month-value.
=> Requires constant watch on progress etc.
However, 3 subsystems for more than 10 years running (without problems) towards that database (in fact by reading through link from PVOut.org) is a reason to still try to add the 4th subsystem to that configuration: 'more of the same' and keeping the long history at one place.
Essential is that the registration of values for the own PV-system is OK, even if 'some' doubt about the values for country & province.
Functional argument to stay:
- their graphs expressing in kW/Wp are a nice way for relative comparison over the life-cycle and to other systems.
Some message in the Photovoltaik Forum (which is labelled to be the forum supporting Sonnenertrag.eu) seems to hint that other 'separators' than "(=double) are allowed.
Tried 2 variations towards Sonnenertrag.eu:
Code: Select all
da[dx++]=01.07.21|210;81Code: Select all
da[dx++]='01.07.21|210;81'Your hint to '"" (single-double-single) did the trick in the lua-script, now producing the acceptable string.
Therefore the subject scriptline to be changed into
Code: Select all
file:write("da[dx++]=" .. '"' .. day .. "." .. month .. "." .. year_short .. "|" .. actldayenergy0580 .. ";".. maxdaypower0580 .. '"' .. "\n")
output of integer values requires insertion of some script-lines with a rounding function for those values.
The end-result counts:
basic form is a working script for automated upload of daily values by means of 'Selfmade' datalogger in Domoticz' lua-script
[you just need to add 'head&tail' to the segment mentioned in the previous messasage, as amended in this message]
Based on experience, seems required that monthly value is checked at end of the finished month:
each month a manual action for end-of-month value is quick & easy, while a scripting solution to automatically generate the end-of-month-value is much more effort.
August01, 2021:
inserted redmarked and italic text
August11, 2021:
added bottom line
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Who is online
Users browsing this forum: No registered users and 1 guest