Can gauges be targeted by msg.topic?

Hi,
I am trying to target a specific gauge (flowfuse dashboard) out of many simply by having msg.topic match the gauge nodes defined name, but it seems to be problematic. Instead of one specific gauge, all of them change their value. I have seen some threads where people seem to have done exactly that with the battery gauge.
Any advice what I could be doing wrong here?

Greetings from Germany,
Mario.

Welcome to the forum @locastan

It isn't clear to me exactly what you mean.

I don't understand what you mean by targeting a specific gauge. Are you sending the same message to multiple gauges?

Yes, basically. The same messages just goes to all of them.

Looking at Dashboard2 / Gauge / Label it seems this is what that guy was doing. Ofc. it is possible I just understood it wrong. :smiley:

As i understand it, a gauge just displays the value passed to it in msg.payload.

The normal way to achieve what you want would be with a switch node to route the messages according to msg.topic.

1 Like

If you have multiple values in each message and want different properties in the message to go to different gauges then you can send them all the same message and in the Value field in the gauge you can enter, for example, msg.payload.temperature or msg.payload.humidity to show the property that you want. If, however, you have the value in msg.payload and want it to display on only one of the gauges then do as @jbudd suggests and use a Switch node to send the message to different gauges by testing msg.topic in the switch node.

1 Like