2023-11-09

How to dynamically/programmatically subscribe to a datasource from a ThingsBoard widget?

I'm working with a ThingsBoard widget and I'm looking for a way to programmatically subscribe to a data source where the field/attribute or timeseries key is not predetermined.

Currently, I can utilize the dashboard state to subscribe to entities (assets, devices) or clients dynamically. However, this approach requires prior knowledge of the attribute name, which in my case is dynamic.

Is there a method or API within ThingsBoard that allows for such dynamic attribute subscriptions within a widget? Any examples or documentation pointers would be highly appreciated.



No comments:

Post a Comment