How to download data

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

How to download data

Post 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
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: How to download data

Post 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.
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: How to download data

Post by JuanUil »

Thnx for your reply
but where can I find the table on my raspberry PI?
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: How to download data

Post 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?
User avatar
gizmocuz
Posts: 2546
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: How to download data

Post by gizmocuz »

'SQLite expert personal' on windows is a great program
Quality outlives Quantity!
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: How to download data

Post by JuanUil »

Thnx guys
found it and downloaded it.
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
rjobaan
Posts: 21
Joined: Sunday 06 December 2015 21:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Contact:

Re: How to download data

Post 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?
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: How to download data

Post by Egregius »

In your domoticz installation folder.
On a Pi by default in /home/pi/domoticz
rjobaan
Posts: 21
Joined: Sunday 06 December 2015 21:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Contact:

Re: How to download data

Post by rjobaan »

Does anybody has the datamodel and explanation of the columns in domoticz.db?
JuanUil
Posts: 497
Joined: Friday 22 May 2015 12:21
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11083
Location: Asten NB Nederland
Contact:

Re: How to download data

Post 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
Your mind is like a parachute,
It only works when it is opened!

RPI4 several Fibaro, KaKu, Neocoolcam switches, Z-Wave, Zigbee2Mqtt, Ikea bulbs and remote, Zigbee temp nodes
polomora
Posts: 3
Joined: Monday 26 December 2022 16:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Contact:

Re: How to download data

Post 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
User avatar
waltervl
Posts: 5851
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: How to download data

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest