Adding datapoints to custom widgets

I am able to create custom widget using HTML/JavaScript. I am able to deploy the widget successfully. The widget I have created is a dial which has to indicate the value of the measurement data received. The issue I am facing is to connect the measurement data to the widget(i.e. creating datapoints for the widget.)

I have used c8yComponentsProvider for creating the widget as explained in the Guide. If I provide the value to the widget directly in the script, the widget is able to display the value on the widget(dial). But I need to take this value from one of the device.

Any help in this regard is highly appreciated.




I found a similar question on stackoverflow (Cumulocity - Custom widget configuration - Stack Overflow).

Does this help?

best regards

Thank you Michael. I found a solution similar to the one in your link. Now I am able to add and visualize datapoints on the widgets.