Page 1 of 1
Node-Red, writing Function nodes
Posted: Sat 04 Jan 2025 12:06 am
by rbuxton
I'm looking for help from anyone who is using Node-Red and MQTT. I do not know how to write the code for the Function node in order to separate out the different variables (e.g. Temp, Wind, Humidity, etc.) from the Interval and Data Update messages.
Some specific examples would help me a lot.
Thanks.
Re: Node-Red, writing Function nodes
Posted: Mon 06 Jan 2025 2:57 pm
by rbuxton
I got 'er figured out. Now I can help someone else if they run in to the same mental roadblock as I did.
Re: Node-Red, writing Function nodes
Posted: Mon 06 Jan 2025 4:15 pm
by AndyO2
I'm expecting to look at this 'soon' - likely over the next couple of weeks. Moral support would be appreciated given previous experience of similar challenges in Node-Red. Main lesson so far is that it's best to get Node-Red to recognise the variables as natively as possible (e.g. dates as dates, rather than strings, values as such, rather than strings...)
For me it will be MQTT > Node-Red > MySQL DB.