read tmpo sqlite data correct / export

Hi,

I am running the tmpo python script to retrive some older flukso data.
The plan is to have that older "day" data in my mysql database again.

I was able to sync the tmpo data into that .sqlite3 tables, but then i am a bit stuck.
The .series commands don't return me the data i was hoping to get as a response. The console only shows a snippet of the data, and i did not find a way to export the data to an json, csv or something else.

Hope someone can help me a bit.
Thx!

gebhardm's picture

The comment about the series command states "Convert the time series data contained in the tmpo blocks to a Pandas TimeSeries data structure." - did you install Pandas? https://pandas.pydata.org/

hero's picture

I installed pandas using the "pip install" cmd.
When do a series command, i get some output, but not de values i expected.

I want a number per day, and if possible in a csv or other format.

Thx for your help

gebhardm's picture

As can be seen from the tmpo definition, it stores a counter value to a corresponding timestamp in a very efficient way (actually the deltas between two sequential values with respect to a well-defined "beginning"). Counter value on current means a Wh value - as such, to calculate time interval values, you have to take two series entries into account and calculate the deltas of time and value to get the respective wanted value.
I use this to chart on tmpo values; see https://github.com/gebhardm/flmlocal/blob/master/www/scripts/controllers...
See also the tmpo definition for intent: https://www.flukso.net/files/presentations/flukso.20140425.pdf

hero's picture

Thx Gebhardm,
I have a look at the info, but i guess that's not gona work for me to create the scripts i need for that.
It would be handy if flukso supports to export the data from tmpo in a "readable" format. Like a value per day.

gebhardm's picture

As written. All a matter of conversion. It‘s like at school, being „bad at math“ is no excuse...

icarus75's picture

Have a look at this github.io page. It allows you to export per sensor data at the resolution you select.

gebhardm's picture

Wow!