get all data back from flukso website

Hello,
I' trying to get data back from flukso.net with CURL and the API from Flukso but I have some trouble to get all data back in one time.
I'm using this request : curl -k -v -X GET -H "Accept: application/json" -H "X-Version: 1.0" -H "X-Token: mytoken" "https://api.flukso.net/sensor/mysensorid?start=1419418800&unit=lpermin&resolution=minute"
The timestamp = 24/12/2014 à 12:00:00 but in the JSON data, the first data begin at 1421869380 (now : 21/1/2015 à 20:43:00)
What's wrong ?

Thank you,

Fabrice

bellyf's picture

Perhaps you're simply requesting too much data at a time. Since 24 Dec there have been over 40,000 minutes. Start with specifying no interval and then slowloy expand your interval.

fabricemedol's picture

Hi, I changed the request but it's the same problem, with resolution set to minute I can only get the last 24h.

gebhardm's picture

Simply because there is not more data on minute base stored; it's a round robin database that aggregates and overwrites data to save space; if you want to store more detailed data you have to take care for yourself or look at tmpo: https://www.flukso.net/content/time-series-file-format-fluksometer - which I actually haven't achieved to get running (since I don't want to install half the internet to just get a numeric library working)...

fabricemedol's picture

I try with the tmpo python script, but there is no data... with the sample code it works but with my id and token not.
s.list() return
[[], []]

icarus75's picture

@fabricemedol Your FLM is running the latest official firmware (r232). If you want to experiment with tmpo, we can upgrade your FLM to r24x remotely.
@gebhardm It's not that you have to copy the bits by hand. Just run (a.o.) these commands on your Linux box and go for a coffee break:

  1. sudo apt-get install python-pip
  2. sudo pip install pandas

fabricemedol's picture

@icarus75 thank you for your proposition but I'll stay with the r232 firmware. All is running perfectly.
@gebhardm, I'm using your persist.sh script to get all MQTT message from Flukso and push it to a mysql server on my synology (I changed the adress of the mysql server on your script and it works perfectly !)
Thank you.

There is a way to show water, gaz and electricity on a single graph ?

fabricemedol's picture

@gebhardm unfortunatly my Synology doesn't support nodejs ds213+