Page 1 of 1

How to download data

Posted: Saturday 14 November 2015 16:30
by JuanUil
Hi All,

I would like to downlaod data from my energyconsumption to an excel sheet.
Is there a how to available?
Or could somebody tell me how to do this?

thnx for your help

Re: How to download data

Posted: Saturday 14 November 2015 16:32
by Egregius
You could use a tool like Adminer and export the desired table as CSV.

Or, the graphs have an option to save as CSV.

Re: How to download data

Posted: Saturday 14 November 2015 16:46
by JuanUil
Thnx for your reply
but where can I find the table on my raspberry PI?

Re: How to download data

Posted: Saturday 14 November 2015 17:01
by Egregius
You have to install Adminer or another SQLite tool and open the domoticz.db database.
Isn't the export of the graph enough?

Re: How to download data

Posted: Saturday 14 November 2015 17:38
by gizmocuz
'SQLite expert personal' on windows is a great program

Re: How to download data

Posted: Tuesday 17 November 2015 8:23
by JuanUil
Thnx guys
found it and downloaded it.

Re: How to download data

Posted: Thursday 10 December 2015 12:55
by rjobaan
Is it not possible to save it in domotticz it self. I see the option csv but that is not showing everything?
Where can I find domotics.db?

Re: How to download data

Posted: Thursday 10 December 2015 13:39
by Egregius
In your domoticz installation folder.
On a Pi by default in /home/pi/domoticz

Re: How to download data

Posted: Saturday 12 December 2015 10:58
by rjobaan
Does anybody has the datamodel and explanation of the columns in domoticz.db?

Re: How to download data

Posted: Sunday 02 February 2020 16:54
by JuanUil
so a small howto:
in Domoticz go to settings tab backup/restore
- backup your dbase
- open it in sqlite
- open the older dbase also in sqlite
- export the desired table of the latest dbase to csv
- copy the new data from the older database
- paste them in the csv
- save it
- delete the table in the latest dbase
- import the csv file in the latest dbase
- restore the newest dbase in domoticz

Maybe a point of attention:
Don't delete the header data
Sometimes the csv file has a format for the date as 03-02-2020
Most time the dateformat in the dbase is as 2020-03-02
So change the format in the csv accordanly to the format in your database.

finished! :D

succes!!
Jan

Re: How to download data

Posted: Friday 08 March 2024 11:34
by polomora
Hello All,

I just found this thread while searching for the same: how to export the DB data to CSV/Excel.
Regarding the previous replies above in this thread:

Regarding the in-graph export of the DB data reply. The CSV export of the graph relates to the timeframe of the graph. Thus on the daily chart, the export is done using 5-minute data, but only the data for the latest 24-hours is exported. For other timeframes, the export is done using daily data. The export the entire DB with a resolution of 5-minutes is impossible.

Regarding the "small howto" reply. I think this is a copy/paste from another post. What do these steps mean?
- open the older dbase also in sqlite
- export the desired table of the latest dbase to csv
- copy the new data from the older database
- paste them in the csv

Re: How to download data

Posted: Friday 08 March 2024 11:58
by waltervl
You are digging up a really old topic.
Better read this if you want to export data for reporting to Excel: https://www.domoticz.com/forum/viewtopic.php?t=30725

The amount of days data of the daily graph is depending of your log settings in menu setup settings.