Extract data from an MQTT payload

I guess you want the fields in payload_fieds to be in the fields in the database, so the questions that need answering are

  1. What (if any) are the tags to go to the db?
  2. Is it a fixed measurement or is the measurement in the message somewhere?

Thank you for your patience. Whole picture is not yet clear to me so sometimes i asking stupid questions.

In db should be:


So I have to extract this data from the payload:


I can inject this data to db. I guess nest or final step is to extract this data from the payload.

Did you read and understand the guide https://nodered.org/docs/user-guide/messages posted earlier in the thread? That should help you to see how to extract the data. The fields you want are currently (think) in msg.payload.payload_fields and appear to already be in the correct format for influx except that they should be in msg.payload. So to move them into the payload you can use a Change node configured to Move msg.payload.payload_fields into msg.payload. Before you feed that to the influx node feed it into a debug node and make sure it looks right.

I've read but i didn't understand well enough, so i've read again. Thank you for your question.

Actually, it is simpler than looks like. I have used "change" node together with adding new property and it is really useful.

And I have to correct myself: TTN decoder in TTN console is still in use.

Thank You