Page 1 of 1
How to Import data from Domoticz to Domoticz[solved]
Posted: Friday 01 July 2016 13:48
by Flopp
I have an old Domoticz running on a Windows.
I started a new Domoticz on a RPi, few days ago.
Now I want to import data from Old to New.
I exported the data to CSV, change the IDx and then tried to import with Sqlite Browser but it doesnt work to import to an existing database(Temperature_Controller).
If I create a new database with a different name, e.g. Temp, i works.
Is there any other way to import from old to new with same database?
Re: How to Import data from Domoticz to Domoticz
Posted: Friday 01 July 2016 20:48
by georgesattali
hello,
you may try to import the whole database at once : select "Setup / Backup/Restore" and choose "Restore", select your previous db and upload.
Beware, that will destroy the new db - so either make a backup of the new db or be prepared to rewrite the sd card image ...
I must say I never tried this between Windows and RPI (but only from RPI to RPI). It would be interesting to know if it works fine.
See you,
GD
Re: How to Import data from Domoticz to Domoticz
Posted: Friday 01 July 2016 20:51
by Flopp
Thanks.
I don't want to destroy the whole DB in RPi, I have a lot of data already.
I think the DB looks the same from Windows.
I only want the data but it looks like I have to put them in one by one

Re: How to Import data from Domoticz to Domoticz
Posted: Friday 01 July 2016 21:45
by gcoupe
I've backed up the DB on RPi and restored it on Windows - and vice versa - a couple of times. It works pretty well. However, I only have a Z-wave controller (USB stick) and a Smartmeter P1 interface.
You'll probably have to adjust some of the hardware settings (COM ports), because they're likely to be different, but other than that, the DBs seem to be compatible.
Merging DBs, however, is a whole other ball game, and not something that I've tried...
Re: How to Import data from Domoticz to Domoticz
Posted: Saturday 02 July 2016 15:02
by dervogt
I am not a database expert, but I can imagine that if you download both database files from the respective machines and manually merge the two db's, this should work out. I believe the domoticZ internal db is a sqlite db, so you can attach various opensource db managers to it and then merge the two.
Re: How to Import data from Domoticz to Domoticz
Posted: Saturday 02 July 2016 22:09
by Flopp
I was stupid and just tried with ONE editor, Sqlite Browser.
I google and found Sqlite Maestro and it worked. I used Sqlite Browser to export as CSV, edit all IDx so it fits the new DB then imported with Sqlite Maestro
https://www.sqlmaestro.com/products/sqlite/maestro/
It is a 30 day Trial so I will use i today so it is enough for me.
Thank you all for telling me your thoughts.