where are ms1, msg2 etc coming from? As far as I can see they dont exsit!
Read working with messages - its worth the 10 minutes & in particular, how to copy the path of a variable from the debug pane
pay attention to this - "msg.payload : Object"
its telling you msg.payload is an Object
therefore you can access msg.payload.this & msg.payload.that
e.g. msg.payload.Time
Again, cant stress enough - read "working with messages" and you'll fix this in no time.
And yes, I know how to get the path to these objects
ex. payload.Gas.Count
But I am not able to pass this info to the influxdb.
It works with the function node?!?
But how?
I got two values into my database, but the wrong ones, wrong naming etc....
I am really no lazy guy, I have HA, homebridge etc. easy fully working. But here I am fully stressed
Can't you give me an example with one value or two values, please?
Should I use influxdb out Node or influxdb batch node?
Rather than splitting the message, have you thought about accessing the parts directly? Once split, each of those is a different message, and if you insert those parts into influx, they get inserted as different measurements, rather than one single measurement. Again, go back to the link Steve gave you, working with messages. From the original message you get out of MQTT, you have an object with the following payload:
From a function node directly behind that mqtt-in node, you can access the values as msg.payload.gas_day, msg.payload.gas_month, and so on. To get the object you have described in msg7.payload in your original post, you can try the following:
What's going wrong in the above image is that once you've split the object, the keys turn into topics, and the payload differs per type. For the Time key, your payload is a string. For Gas, it's an object, gas_year for example, is a number. If you did split it, then pass all those messages to a function node and have it operate on msg.payload.???, the contents of msg.payload, and especially the type of each payload, is different.
Can you explain what the format is that you need?
What is for your use case the format of your messages that you need? See the influx node's builtin documentation for a description, and work it out for your use case. If you pass us back that information, we can give more detailed information on how to continue.
THANKS afelix!!!
That was excactly what I wanted!!!
I knew that it was easy, but so easy... Great
With the function code I was able to get all data into influxDB and than to Grafana.
This is how it looks now.
Also many thanks to @Steve-Mcl for explaining me a different my and pointing in the correct direction.
I will read and learn more the next weeks to make all better and better.