I would like to get data via MQTT to Node-Red.
I use the Node 'mqtt in' with the topic 'Speicher/t_day_min/#'.
Via debug node I get 15.7.2022, 10:36:04node: DB Speicher/t_day_min/Wert : msg.payload : string[6] " 30.7"
and
same for date/time.
Now I don't know how to get the 2 values splited so that I can "Insert ... into ..."
How do I get for e. g.
let temp = variable1;
let datetime_var = variable2;
If you have control of the mqtt messages, and the timestamp is not the current time, then, if possible, put the time and value in one mqtt message. If it is the current time then you don't need to get it via MQTT.
I use now the measured value from BME280-Esp8266 via MQTT to a function-node in Node-Red.
In Node-Red I store the coresponding datetime.
I have also a trigger, when day changes. When day changes I write the min. and max. values of the temperature and datetime into MYSQL.
It works fine so far.
Thank you both for your ideas / input.