cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

live data in timeseries chart

Ujwal17
7-Bedrock

live data in timeseries chart

I have three properties in my Thing and it is continuously updating for every second. I want to show these updated values in Time series chart every second. which service should I use? I used query property history but it takes lot of time to get the result since the data is updating every second.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Ujwal17,

 

Just in case you're still looking for ideas -- try to cache N of your recent updates in an INFOTABLE property (not persistent and not logged), and use GetProperties service in your mashup instead of QueryPropertyHistory. Set "Automatically update" property on this service, so that it uses WebSockets to push data into the mashup instead of using Auto Refresh widget.

 

This way you should be able to display updates to a few dozen readings in your mashup every second without much performance overhead on the server side.

 

/ Constantine

View solution in original post

8 REPLIES 8

Hi,

 

The only idea I have in this situation is to keep QueryPropertyHistory and in your mashup you can use Auto Refresh widget to execute the service every x sec. Don't know if this will work if you want to get data every 1 sec.

 

Hope it helps,

Raluca Edu

PaiChung
22-Sapphire I
(To:raluca_edu)

the big question you need to look at is, does it make sense to get data every second yes or no?

Even if the data is updating once a second, to respond to that, you can automate that server side.

Is there a need to see the data updated every second on a screen, is that a requirement because a user is always looking at the screen and must react instantaneous.

Else you can still do as described, but I recommend slower updates on screen.

Data in every second on mashup is what our client wants .

Can you help me to understand about how to automate server side?? 

Actually, I tried the solution you said. But am not getting the graph. HTTP request is pending continuously

PaiChung
22-Sapphire I
(To:Ujwal17)

This could mean it goes into the next refresh cycle before it is able to render the graph.

Does the graph render if you have no refresh?

How many points are you retrieving to plot?

And again do you need to do it every second?

 

You are asking about doing this server side, unfortunately since the data is coming into the server every second, there isn't any 'server side' construct that would help client side, because it would still trigger every second.

 

What is the use case, what are the requirements, is this something that is going to be commercial or you are just trying things out?

slangley
23-Emerald II
(To:Ujwal17)

Hi @Ujwal17.

 

If you have found a solution to your issue, please post it here for the benefit of others on the community.  If you are still searching for a solution, please provide answers to the questions from the previous post.

 

Regards.

 

--Sharon

slangley
23-Emerald II
(To:slangley)

Hi @Ujwal17.

 

If the previous response allowed you to find a solution, please mark it as the Accepted Solution for the benefit of others on the community.

 

Regards.

 

--Sharon

Hello @Ujwal17,

 

Just in case you're still looking for ideas -- try to cache N of your recent updates in an INFOTABLE property (not persistent and not logged), and use GetProperties service in your mashup instead of QueryPropertyHistory. Set "Automatically update" property on this service, so that it uses WebSockets to push data into the mashup instead of using Auto Refresh widget.

 

This way you should be able to display updates to a few dozen readings in your mashup every second without much performance overhead on the server side.

 

/ Constantine

Top Tags