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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Service to convert input Boolean(isConnect) in output infotable for Time Series Chart

Antony2611
6-Contributor

Service to convert input Boolean(isConnect) in output infotable for Time Series Chart

Hi, I should create a service that converts the Boolean value of the isConnect parameter, into an infotable value to feed to a time Series chart, someone would know how to do it? In the code in the picture I have to create a new Infotable? thank you

2 REPLIES 2

Hello!

 

The question here is how do you want to push this parameter value to the infotable.

I can propose 3 possible solutions:

1. Subscription with 'On Trigger' - It means that you need to create Subscription, and subscribe to this property. Next you need to pick up an event option which can be, DataChange. (In property metadata you can also specify how it should behave). Now add a code, which will save this value in Stream. Then use Query service from this Stream in mashup to get time-based values of this property.

 

2. Subscription with Timer Trigger - Same story like above, but instead of DataChange you can create a Time Thing, which will save isConnect param value for example every 30 sec.

 

3. ValueStream - Create value stream, assign it to the target Thing. Now mark isConnect property as a 'logged'. Value will be pushed to the ValueStream on every change. Then use GetPropertiesHistory on this Thing to get Historical values in mashup.

 

In all cases you will recieve InfoTable as an output.

 

Best,

Adam

thank you very much Adam, I'll try with the third solution you wrote to me, it seems the simplest one. thank you
Announcements


Top Tags