Reputation: 1
I’m currently working on an alarm system proof of concept in ThingsBoard where each device sends telemetry data (metrics) like temperature, humidity in the following Sparkplug like format:
{"timestamp": 1676118000000,"metrics": [{"name": "temperature","value": 23.5,"timestamp": 1676118000000,"dataType": "FLOAT",},{"name": "humidity","value": 60.3,"timestamp": 1676118000000,"dataType": "FLOAT",}]}
Users must be able to dynamically create per device alarms on any metric and be able to specify a threshold (all actions will be performed by an external React based app which communicates with Thingsboard REST API). From my understanding the only way is to create shared attributes for each metric's alarm, like "shared_temperature", "shared_humidity", etc. These shared attributes store the threshold value for triggering alarms and ThingsBoard evaluates the incoming telemetry data against these thresholds and triggers alarms if the conditions are met.
The current rule chain to do the above is as follows:
Now the question:
Upvotes: 0
Views: 25