Server API question

Dear, again I need a carification fo someting very simple
I grab last month of data from the server with the function.

"https://api.flukso.net/sensor/" + SENSOR_KEY + "?version=1.0&token=" + SENSOR_TOKEN + "&interval=month"&unit=watt"

And today on the 30th of December I get a array where te last 4 values are:

[1325030400, 8, 1325116800, 23]

Converting the time stamps those are:

GMT: Wed, 28 Dec 2011 00:00:00 GMT, 8 watts
GMT: Thu, 29 Dec 2011 00:00:00 GMT, 23 watts

I'm sure that yesterday average was more then 23 wats as the I moved the setup from the Christmas lights to the apartment mains at 3pm and it instantly went over 1Kw

Now I'm confused as I would be expecting that that query will return the value for the last month INCLUDING the last day that completed and that is 29th. And what i get under the 29 Dec 00:00 record is looking like a average use for a day before that is 28th Dec.

How do I query the server for yesterday average power?

sherlock's picture

Wow it gets really weird, if I query same sensor with different method

&start=1324944000&resolution=day&unit=watt

I then get following results
[1325030400, 3, 1325116800, 8 ,1325203200, 90]

They seem to include last day, but what I noticed is that value for yesterday has changed on a way 1325116800, 8 it is now the same if I querry for it with the interval=month, but it is diffrent that it was before?

Why?