thingsboard / thingsboard

Open-source IoT Platform - Device management, data collection, processing and visualization.
https://thingsboard.io
Apache License 2.0
15.8k stars 4.85k forks source link

Thingsboard - Rule chain for exceuting a expression and store its output under a device as telemetry #10722

Closed mubashirp closed 4 days ago

mubashirp commented 1 week ago

I have a widget in my thingsboard dashboard where i input two values. I need to divide these two dashboard inputs and display it in another widget in the same dashboard. How can i achieve this. Is there any specific rule chain for such applications. Or else is it possible to do it directly in the dashboard.

ashaforost commented 1 week ago

Hi @mubashirp

In the rule chain, you can catch the 'Attributes Updated' event and perform the calculation based on the two updated attributes. See the screenshots: image

image image image

Make sure to change the msgType to "POST_ATTRIBUTES_REQUEST"