Visual Flow Creator Gauge Will Not Output Correct Value (MindSphere)

Hi,

I hope everyone is good!

So, for the past week or two I have been working on a small project where I have connected a DHT11 sensor to my Raspberry Pi and it is feeding information into Node-Red and I have then onboarded it to Mindsphere. Therefore, the data is being sent into Mindsphere and is being visualized into graphical formats, charts etc. The charts and everything is working however, the gauges do not work :sleepy:. I have tried everything in my knowledge to make it work so as a last resort I have come on here to ask for your support!! if you need any other information, just let me know and thanks in advance!

Here is a screenshot of the output.. thank you.

Welcome to the forum @GaugeHelp

Whenever a node is not doing what you want then there are two things to do. One is to look at what you are passing into the node, and the other is check how you have configured the node. So connect a Debug node showing what is going into one of the gauges and see what it shows. If that is not correct then fix it. Then look at the configuration of the gauge to work out what you need to put there to show the correct data. If you can't see what is wrong then show us the data and the config.

Before that though, if you have not already done so, then I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Thank you for your response. Everything in my Node red is working and the data for my temperature and humidity is being passed onto Mindsphere where I am trying to create a dashboard. The data is able to be passed into charts but just not gauges..

image

If that is a node-red dashboard node and it is not doing what you want then the same request as before. Show us the message going into the gauge and how you have configured the gauge. Without that we are only guessing at your problem.

As Colin says you need to put in a debug node to see what is going into the gauge.

At a guess it looks like you are using a ui_gauge which is very simple and just requires a number in msg.payload (or something that can be interpreted as a number i.e. "2") For example msg.payload = 23 As per the Help info you can format the data with, for eaxmple {{value | number:1}}% which will display 23.0% if used with the above payload value.

From the image you posted it would appear that you have an Object in msg.payload

Not quite true you can tell the gauge to use any property. i.e. {{payload.another_object_property}}

Apologies, I am not very experienced this. But I believe this is a MindSphere dashboard, specifically the Visual Flow Creator which I am currently using.

MindSphere Dashboard Screenshot Below

Node-Red Dashboard Screenshot Below

As you can see in the Node-Red Dashboard screenshot I have onboarded it to MindSphere therefore, all of the data is going to Mindsphere. Then from there I am trying to visualize this data into charts and gauges.

The charts work but, the gauges don't. Here is the output I am getting from the MindSphere Dashboard:

You might need someone who knows about mindsphere on this one. they look like standard node-red dashboard gauges, but if you can't show us what is going into the gauge and maybe don't have direct control of the gauge configuration then it isn't really a node-red question. Is there a mindsphere forum you can ask on?

I tried to find a Mindsphere forum but could not find one. Therefore, I thought perhaps someone from here would have the knowledge and chime in.. but mindsphere is a simple drag and drop all I had to do was connect the nodes and from the time series select the data variable.. that's it and the charts worked but the gauges are outputting the following:

[{"temperature_sensor":23,"_time":"2021-10-19T14:15:06.773Z"}]

the value of the temp sensor is 23 that is all it should be outputting, i don't understand why it outputs all this information

For the gauge you should just send a single value, not an array containing an object. So for the gauge send it through a Change node set to Move msg.payload.temperature_sensor To msg.payload.
In fact that may work for the chart node too, so as a first test insert the change node after the temperature function node. Or, in fact, modify the temperature function node to just return the temperature in the payload

If there isn't anywhere you can ask for help with mindsphere then you have to ask yourself whether that is a route you should be following.

1 Like

Thank you so much Colling and everyone else for your responses. I truly appreciate it.

That node is the standard gauge node also in MindSphere, so @Colin's response applies.

Btw, the MindSphere community forum is here:

https://community.sw.siemens.com/s/topic/0TO4O000000MihsWAC/mindsphere

There is also a link to the mindsphere community and support at your mindsphere dashboard:

1 Like

The solution was to add an 'Extract Parameter' node between the Read Timeseries and Gauge Nodes within MindSphere Visual Flow Creator and the Gauge began to output the correct readings.

Thanks again to those who responded to my thread.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.