Copy Historical data (rra databases) between Toons

Everything about software tools, new software development and toolchains. For developers, mostly.

Moderators: marcelr, TheHogNL, Toonz

oepi-loepi
Advanced Member
Advanced Member
Posts: 526
Joined: Sat Feb 09, 2019 7:18 pm

Re: Copy Historical data (rra databases) between Toons

Post by oepi-loepi »

Did you enable the zon of toon feature on the new toon ? Setup tsc features zon-op-toon ?

Als do you see solar files in the export folder? If so try again with the solar files only. It should work (has been tested).
hafeez
Starting Member
Starting Member
Posts: 10
Joined: Thu Dec 21, 2017 10:26 am

Re: Copy Historical data (rra databases) between Toons

Post by hafeez »

Never mind. I managed to get it working.
I had to connect my Zon op Toon analog meter first with my new Toon2 and wait for some graph to be generated on the Toon2.
Now I could see all my historical solar panels data after another import
However, on the total page it showed an incorrect value for the solar panel power generated and a date which was close to the date I bought this Toon2.
I had to change the installedDate in /mnt/data/qmf/config/config_happ_pwrusage.xml to a value which represented the date I installed my Zon op Toon

Once changed, the total solar panel power generated was correct.

Thanks for this program. I can finally use my Toon2 after having it laying in the closet for 2 years.
gerlag
Starting Member
Starting Member
Posts: 20
Joined: Wed Dec 27, 2017 1:49 pm

Re: Copy Historical data (rra databases) between Toons

Post by gerlag »

Hi all, just to let you know.
I was experimenting with logging the heat output from my heat pump using the old gas sensor (I'm using p1 now from the slimme meter) , and unexpectedly extremely high volumes appeared in the logging of the gas quantity. (2800 m3 in just a few hours). Tried to figure out how to repair/modify the wrong values as this had huge influence on the statistics.
Quite an issue to dig into the database.
Then I found the easy way, using the windows app of oepi-loepi based on Toonz method in this thread.

This is what I did:
I exported all csv files from Toon, took both gas quantity files apart and put them in a separate directory. Then, using notepad++, I edited both csv files, changed the values behind the timestap to values that fit into the range of the adjacent values. In my case, for the daily file I had to change just one line, for the hourly file it was 17 lines.
After that I pointed the 'ToonConvert' program to the directory with these two modified csv files in it and imported it into my Toon.
Problem solved. No extremely high spikes in the statistics anymore.

A bit off topic: As a side effect I found that it is possible to import heat quantity into Toon using the url

Code: Select all

http://<toon-ip>/hcb_rrd?action=setRrdData&loggerName=heat_quantity&rra=5yrhours&samples={<epoch>:<value>}
I think that I can use this method with some external hard/software.
Arnout2000
Member
Member
Posts: 97
Joined: Sun Oct 04, 2020 8:11 pm

Re: Copy Historical data (rra databases) between Toons

Post by Arnout2000 »

Hi @oepi-loepi,

I used your application to copy my gas/electicity/solar history from my broken Toon to my new one. Fantastic App! Great work!
On the tiles, all my historic data is shown.

The only question is about the Zonnepanelen app. Although the tab Month (Feb) and Year (2023) look good, the Total tab used to display all the data since I started with my solar panels (18 MWh) and now it only seems to shows the data since I ran the copy script. Did I miss a step somewhere?
Toon-zon.jpg
Toon-zon.jpg (113.8 KiB) Viewed 289 times
oepi-loepi
Advanced Member
Advanced Member
Posts: 526
Joined: Sat Feb 09, 2019 7:18 pm

Re: Copy Historical data (rra databases) between Toons

Post by oepi-loepi »

Yes, you first have to make sure you have all sensors set up right (electric, gas and solar). Ik you see some data, then use the tool. You can run the app again with only the solar databases.
Arnout2000
Member
Member
Posts: 97
Joined: Sun Oct 04, 2020 8:11 pm

Re: Copy Historical data (rra databases) between Toons

Post by Arnout2000 »

I know, but all my historical solar data was already succesfully imported. See this information on 2022:
Toon-zon2.jpg
Toon-zon2.jpg (127.08 KiB) Viewed 268 times
It is only the information in the Zonnepanelen app which doesn't seem to take the historical data into account...
oepi-loepi
Advanced Member
Advanced Member
Posts: 526
Joined: Sat Feb 09, 2019 7:18 pm

Re: Copy Historical data (rra databases) between Toons

Post by oepi-loepi »

I do not know where that app takes the data from..
oepi-loepi
Advanced Member
Advanced Member
Posts: 526
Joined: Sat Feb 09, 2019 7:18 pm

Re: Copy Historical data (rra databases) between Toons

Post by oepi-loepi »

Maybe hou can change the start date of the solar panel installation somewhere in the xml files, maybe toon uses that as starting date for the calculations from the databases.

All like mentioned here:

viewtopic.php?p=98175#p98175
Arnout2000
Member
Member
Posts: 97
Joined: Sun Oct 04, 2020 8:11 pm

Re: Copy Historical data (rra databases) between Toons

Post by Arnout2000 »

Yes, manually correcting the InstalledDate in the file: config_happ_pwrusage.xml did the trick so all data is correct now.
Thanks!
Post Reply

Return to “Toon software development”