Hello everyone pls some help

Not sure if you want to retain the floating point format.

If you do, then use this in the Function node.

msg.payload = parseFloat(msg.payload);
return msg;

That would give you, as an example 20.62 rather than 20

You might want to look at the conditions in your Switch node.

e.g. What do you want to happen if the temperature is EXACTLY 15 degress ???
At the moment this specific temperature is IGNORED by your Switch node settings.

What an interesting sharing!

Why your temperature comes in string? All my sensor sends number NR, it is easier on NR side then

I think you should have sent that question to @Sheeen as I've only been trying to help him.

I found i solution for the previous matter and that all thanks to you :heart::heart:. Pls if you just can help me a little bit more in grafana
I installed the influx db and it stored data from the sensor very will but I have an issues grafana show me an error with value configuration and doesn't want to show me the status as a graph



I think it ma bad when I write the Arduino code I send it in topic as a string so that make problems

As I think you have realised, you can only chart numbers, not strings. Which does make sense in fact.

How so ? Cause I used to force the payload by a fonction to come back as an integer but the nod didn't work at all it just keeping saying the same error type when it transfered to influx node something is going wrong

I can't see where you have shown us that error. The error when you write the value to influx that is. Note though, that once you have written a string value to a field in influx then it is a string format field for ever. You cannot write a number to a string field. I think you will have to DROP the Measurement and start again.

So basically if I take off the measurements off that will fix the issues or I need to do something with msg.payload
That I get from my nodered

Difficult to say unless you show is what is in it. Feed it into a debug node and show us.


This the grafana error
Processing: PXL_20220330_145944523.jpg...

We need to see the contents of the message going into the influx node in order to see what is there.

However, You can see that the influx node is complaining because you are trying to write a float variable to a string field, which is what I said would happen, so you have to drop the measurement and try again.

Can't you do a screenshot rather than a photograph?

Yea I dropped the measurements with command
Drop measurements but nothing change




I put all data source that I can give

That is showing the payload is a string, but the error you showed previously showed you were writing a float, so that does not make sense. Are you sure the debug that you have shown above is the one that generated the previous influx error saying that you were trying to write a float to a string field in the database?

You need to adjust the flow to get the payload to be a number, not a string (which has quotes round it in the debug output to show it is a string). Then drop the measurement again and it should be ok.

There is no need to keep showing the grafana errors, you need to get it writing the data correctly first.

Yea I used msg.payload = parseFloat(msg.payload);
return msg; as a fonction and I paired it with influx data base after I put a debug node it shows me the error I don't know how to do something else cause I searched and I tried alot of solutions and nothing works

Are you saying that the debug output that shows
payload: " 65.0"
is coming out of a function node containing
msg.payload = parseFloat(msg.payload);
return msg
I find that difficult to believe as it is showing the payload as a string.

To make it simple the mqtt in brings payload as string and send it to the influx db the database collect the data very well but when I tried to make a graph with grafana it shown me an error
I tried to put a fonction between the mqtt and the data base to change the value to number instead of string by
Msg.payload = Number (msg.payload);
Return msg;
And I tried with parsefloat and parseInt no one work it show me just an error of the value that I put before

Put the parseFloat back in, check the debug shows the value without quotes. Then drop the measurement.