Data Time Series Node

losant-api
dashboard

#1

I’m trying to use the time series node to collect data from a device over a custom time range. I have the aggregation set to ‘sum’ and the resolution set to 24 hours. From what I can tell using this resolution defaults the 24 hour summation period from midnight to midnight GMT. Is there any way to manipulate this query such that the summation of data for a 24 hour period is aligned with the local timezone? I had tried setting the ‘range end’ to midnight local time but didn’t seem to work either.


#2

There is currently not a way to change the bucket windows. As you noticed, they are currently based on GMT. I’ve added a ticket for us to investigate ways to support more custom bucket times.


#3

Thanks for the update Brandon, essentially we build reports for our users by exporting the data to a TP api which builds the reports. We have a clunky workaround at the moment which isn’t ideal. Being able to apply custom bucket times before we export the data would be a huge help. I guess the workaround for the time being would be to loop over a 24 hour period with n= number of days? Any other suggestions would be much appreciated.


#4

Hi! I need your help please… … how can I graph the current value and the average of the last 10 readings at the same time? Tks a lot!


#5

Hi @Hugo_Hernan_Ruiz,

One way to accomplish this is to use the Losant API node within a workflow, and add an attribute to a device to store the average.

First, add an attribute to your device to hold the average value. Then within your workflow you can use the Losant API node to get the last ten state values of a device.

Loop through those values and average them, then set that averaged value to your new device attribute.

You will then be able to compare and graph the two values simultaneously.

Hopefully this helps!
Julia


#6

Thanks for your support Julia!, the proposed solution works perfectly.


#7

Hi Julia, I have a question: what is the limit of the Losant API? Can I include 1000 as a parameter?


#8

Hi @Hugo_Hernan_Ruiz,

There is not a number limit on past states for Device: Get State in the Losant API node; you can set the limit to 1000. Note that as the limit value gets larger, you may run into some runtime issues with your workflows.

Thanks!
Julia