I don’t think that is the decoder you are using as your message clearly contains a number with the additional “mm” and that is not added in this decoder.
To store the distance in a usable format I think you need just a number. That way you can use it for calculations and graphs, if you store it as a string (which would be required to store the mm) you can’t use it without transformation so no way to have the database calculate average, min, max etc. Or use a tool like grafana to create graphs.
Yes I wasn’t using that decoder you are 100% right. but after your tip I changed the decoder. I copied the Dragino Decoder and deleted the “mm” now I’m getting the distance without the “mm”.
Okay, this makes a lot of sense… So it would be dump to store it with that because I want to store it to visualise it in Grafana
I will now have a look if I can get it to work but I also think there is an additional problem with my “Influxdb Node”.
Good morning.
Now im getting my data as a “number” in the "
msg.Distanz"
I used a change node to write the Distance as a number into the msg.Distanz.
I assume this is exactly the data type I need and I can write into the Db, right?
Now I want to write the distant into the databank.
But with the settings in my “influxdb out” node I’m getting an parsing error:
Error: A 400 Bad Request error occurred: {"error":"unable to parse 'distanzquelle
Good morning.
its a basic setting where i just writing the distance into the msg.Distanz.
I assume the “influxdb” Node is still getting the whole string?
Oh yes, you are right…completely forgot… I wanted to send the msg…
I’m sorry for this…
payload.uplink_message.decoded_payload.Distance
I’m very sorry for being that complicated about this and I want to apologise for this and also want to thank you for your time and nerves about this.
But I did my best to give you guys everything you want.
Which information you are referring to right now?
Well as I said before I’m sorry for this but I was trying my best…
Now make sure your change node does it’s job correctly. For the two highlighted fields I will copy and past from the JSON, as typos are easy to be made.
There is a button on the right of the debug window that does this job.
I will wright the EUI and the sensor value to the DB, if I were you.
Now check the JSON form the change node and see if that is correct.
Im saving both of them so I now exactly which device made this measurement?
You mean I need to check what I’m getting after the change node?
As far as I understand what you want me to know I made to debug nodes. One with the “msg.payload” and one with the “msg.dev_eui”.
is this what you meant?
As you can see I’m having some trouble with the change node or to be more precise with the “dev_eui”.
I configured the change node as I posted in the picture before but I’m getting the message that the “msg.dev_eui” is undefined.
Yes, I did and it copied the path I posted before.
I will try to copy the application_id for identification. there’s only one Node in this application and there will be no other Node.
That should be okay to identify the device.