Copy Historical data (rra databases) between Toons

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

Moderators: marcelr, TheHogNL, Toonz

ovdleun
Starting Member
Starting Member
Posts: 19
Joined: Thu Apr 21, 2016 8:28 pm

Re: Copy Historical data (rra databases) between Toons

Post by ovdleun »

Hi Marcelr,

The version from github, is that a working version?
https://github.com/ToonSoftwareCollective/transfer-logs

I'm having a hard time getting it to work ;) I can compile it under linux but it's, of course, not working on arm then:
# ./transfer-logs
./transfer-logs: line 1: syntax error: unexpected "("

I'd like to transfer the files from my old Toon1 to new Toon2, if even possible.
Any hints for me? Before I'm installing a full arm toolchain ;o)

Regards,
Onno.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Copy Historical data (rra databases) between Toons

Post by marcelr »

Hmmm .. apparently it has issues.
The best you can do is just copy the old rra databases + dat files to the new toon, together with the config_hcb_rrd.xml file and config_hcb_pwrusage.xml. These files hold all information regarding your history. And remember: Thou shalt make back-ups!
ovdleun
Starting Member
Starting Member
Posts: 19
Joined: Thu Apr 21, 2016 8:28 pm

Re: Copy Historical data (rra databases) between Toons

Post by ovdleun »

Tnx! Damn .. forgot about the layout files .. did copy the rra's but that doesn't work without the xml's of course. Fixed it.
Pieterraxis
Starting Member
Starting Member
Posts: 21
Joined: Mon Jun 01, 2020 9:24 pm

Re: Copy Historical data (rra databases) between Toons

Post by Pieterraxis »

Maar....

Waar vind ik die bestanden?

Image
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Copy Historical data (rra databases) between Toons

Post by marcelr »

/mnt/data

and this thread is supposed to be English.
Pieterraxis
Starting Member
Starting Member
Posts: 21
Joined: Mon Jun 01, 2020 9:24 pm

Re: Copy Historical data (rra databases) between Toons

Post by Pieterraxis »

Tnx,

And do you guys have a samba server installed on the toon?

Can't get in with sftp

Code: Select all

Status:	Verbinden met 192.168.178.9...
Antwoord:	fzSftp started, protocol_version=9
Opdracht:	open "root@192.168.178.9" 22
Opdracht:	Pass: ****
Status:	Connected to 192.168.178.9
Fout:	FATAL ERROR: Received unexpected end-of-file from SFTP server
Fout:	Kan niet verbinden met server
I called the 2nd toon toon2 in smb.conf just in case.

But windows can't connect


Image
Pieterraxis
Starting Member
Starting Member
Posts: 21
Joined: Mon Jun 01, 2020 9:24 pm

Re: Copy Historical data (rra databases) between Toons

Post by Pieterraxis »

voor sftp access :

Code: Select all

opkg install http://files.domoticaforum.eu/uploads/Toon/ipk/cortexa9hf-vfp-neon/openssh-sftp-server_6.7p1-r0_cortexa9hf-vfp-neon.ipk
Pieterraxis
Starting Member
Starting Member
Posts: 21
Joined: Mon Jun 01, 2020 9:24 pm

Re: Copy Historical data (rra databases) between Toons

Post by Pieterraxis »

I do have the file config_HAPP_pwrusage.xml but not config_HCB_pwrusage.xml

Searched all of "/" without capitals.
Toonz
Forum Moderator
Forum Moderator
Posts: 1868
Joined: Mon Dec 19, 2016 1:58 pm

Re: Copy Historical data (rra databases) between Toons

Post by Toonz »

Hi all,

happy to present a new python script to load historical usage data from an old Toon in to another Toon.
The old Toon doesn't need to be rooted, the target Toon must be rooted.

Usage:
- On the old Toon create the export.zip file via the Toon menu, 'Instellingen', 'Internet', 'Toon Data'.
- Download the newly created export.zip file from the old Toon.
- Extract the file usage.zip from the file export.zip
- Extract all files from usage.zip in a separate folder

- download the attached python script (tested with Python 3.7)
- edit the two variables in the script:
folderPath = "c:\\temp\\usage\\" -- replace this with the folder name where you extracted the files from usage.zip
toonIpAddress = "192.168.2.16" --replace this with the ip adress of the new target Toon

- start the script DataConv.py with python and get a coffee (could run for quite some time, progress bars are shown).

That's all folks.

Known limitations:
the file 'gas_flow_CurrentGasFlow_5min.csv' in the usage.zip file is empty on newer firmwares. This is an error in the Toon firmware.
I will look into a workaround for this but that will require the source Toon to be rooted as well.

Happy to take any feedback.

Kind regards and a happy 2021.

Toonz
Attachments
DataConv.zip
(1.14 KiB) Downloaded 462 times
member of the Toon Software Collective
mogwai
Starting Member
Starting Member
Posts: 43
Joined: Fri Aug 10, 2018 10:36 pm

Re: Copy Historical data (rra databases) between Toons

Post by mogwai »

I see multiple methods described in this thread and I'm not sure what to do. I have an (old) rooted Toon1 and a (new) rooted Toon2. I have gas/electricity/solar panels connected. What is the recommended method to transfer the data from the Toon1 to the Toon2?

Thanks :)
Toonz
Forum Moderator
Forum Moderator
Posts: 1868
Joined: Mon Dec 19, 2016 1:58 pm

Re: Copy Historical data (rra databases) between Toons

Post by Toonz »

the last method works best (above this post) and is replacing the old method which has quite some limitations
member of the Toon Software Collective
mogwai
Starting Member
Starting Member
Posts: 43
Joined: Fri Aug 10, 2018 10:36 pm

Re: Copy Historical data (rra databases) between Toons

Post by mogwai »

Thanks, that worked like a charm :)
Hypermobile
Member
Member
Posts: 76
Joined: Sun Jan 14, 2018 5:12 pm

Re: Copy Historical data (rra databases) between Toons

Post by Hypermobile »

For people like me, without a lot of Pyton knownledge

>on windows, i had to install Python 3.7

Then start command prompt: (windows Key +R) CMD [enter] or in windows explorer. go the the Folder of the Script....and type in the URL bar CMD enter >> command prompt will start from this Directory.
Then you need to:
- pip install pandas [enter]
- pip install request [enter]
- pip install tqdm [enter]

Then adjust the script as descripted,

Then Type:

- Python c:\location\DataConv.py [enter]
oepi-loepi
Advanced Member
Advanced Member
Posts: 619
Joined: Sat Feb 09, 2019 7:18 pm

Re: Copy Historical data (rra databases) between Toons

Post by oepi-loepi »

I have made a Windows version based on Toonz method.

https://github.com/oepi-loepi/toonConvert

Image

Download the files and run the setup.exe
Get the old data from the old toon by clicking the wifi symbol and then toon data at the bottom of the page
Extract the data from the downloaded zip file
Open the converter and point to the extracted data folder (usage)
Fill in the ip of the new toon
Click start and leave your toon for 2 hours untill a message apears that the process is ready

Do not restart, power cycle or reboot your toon during the process.
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 »

Finally a method so I can copy my historical data form my old rooted Toon to my new rooted Toon 2
Followed the procedure and used the Windows program.

Everything is converted to the new Toon 2. I can see my historical power & gas usage but I do not see any data for my Solarpanels.
Am I missing anything or is that not supported?
Do I need to do something on the new Toon 2 first?
Post Reply

Return to “Toon software development”