Is it possible to change a node property by sending node a message?

#1

Is it possible to change a node property by sending the node a message?
I'd like to be able to set the min, max range of a gauge to values entered by a user.
thanks
gary

#2

If you are talking about the ui_guage node then NO, it isn't currently possible to dynamically change the min/max values (as far as I can see)

#3

Ok, thanks for the quick reply!

#4

In general, no. But it depends on the individual node as to what they allow to be set on a per-message basis.

In the case of the ui_gauge node, you can set the min/max values by passing in msg.ui_control set to {min: 10 , max: 20}.

Here's a full reference of the dashboard node fields you can set using msg.ui_control: https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md

#5

Thank you!
I had been trying something along those lines, but was using the name I had assigned to the gauge
gary

#6

Ok, you learn something new everyday

1 Like