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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to show live coming sensor data on collection widgets

DT
12-Amethyst
12-Amethyst

How to show live coming sensor data on collection widgets

Hi Everyone

I want to show live sensor data on the collection widgets when it will come.
use case:

  • I have 10+sensor which having(member_id,heart_rate_device_id) parameter
  • I have created a service which is storing that live data into DB
  • I want to show all member live data on collection on time when it will come it should be a refresh of every member data
  • I have created an info table property which I am inserting live data but it should not update on member id wise it is adding the next row for the same member id 
  • Please check the screenshot that I have attached I want to show the same as this.

Please suggest the way how to overcome this problem in thingworx

5 REPLIES 5
zyuan1
18-Opal
(To:DT)

Don't use infotable property, use DataTable or Stream instead, and then you can use primary key to easily update each row of data, and when you bind it to collection widget, you can use autorefresh to trigger the GetDatatable/Stream entries service.

DT
12-Amethyst
12-Amethyst
(To:zyuan1)

But how to refresh that live data on collection mashups
zyuan1
18-Opal
(To:DT)

We usually use AutoRefresh widget to trigger the Collection input service.

DT
12-Amethyst
12-Amethyst
(To:zyuan1)

But when we used the autorefresh widget it's totally refreshing all data of collection and that does not look nice if we have a large amount of data then it will take time to load all data in the collection.

Is there any way to refresh collection data like we are refreshing property data automatically.

zyuan1
18-Opal
(To:DT)

Here's the options for collection widget

 

1. Put all the requested data in the service result, and then the sub-mashup content is passed by this service through the mashup parameter. And submashup will bind the mashup-properties into its widgets.

2. For each submashup, it calls the services with auto-refresh by itself, and in collection widget, the service in main mashup only returns a list of sub-mashup names/IDs that does not need to change, and let each sub-mashup query and update the content.

 

i.e. the submashup could use service like this: ThingTemplates["GenericThing"].GetImplementingThingsWithData()

Top Tags