The Node-Red Message Object for Beginners
HTML-код
- Опубликовано: 23 фев 2018
- www.steves-internet-guide.com/node-red-message-object/- The msg object is passed between nodes in a flow.In this video tutorial we will examine the msg object and how we can change the message object properties. I also show you how to quickly copy a flow or parts of a flow.
Related Videos
Introduction to node-red
• Quick Introduction to ...
-------------------------
How to Create a Node-Red MQTT Dashboard
• How to Create a Node-R...
-------------------
MQTT Publish and Subscribe Using Node Red
• MQTT Publish and Subsc...
Have a question Use the comments or if you want help then use
www.steves-internet-guide.com/...
If you find these videos useful then you might want to consider buying me a coffee
www.paypal.me/StepenCope - Хобби
Thank you for making these. Some of the online instruction is harder to follow when it's just in a text form - seeing a walkthrough of it in real time makes things very clear.
Great video...got to learn something new. Thanks!!
perfect stuff. Watching your videos help me to get more and more familiar with rednode. Hope we get much more of these.
Thank you. Manipulating the msg within a function node was interesting to me
many thanks - clear and concise, very useful
finally a proper tutorial thankyou very much
thank you..very helpful for a beginner like me
Very good explanation , thank you.
Great video.. Thanks a lot for publishing these, very useful... I tinker with Python, so I'm looking to use Node-RED as a dashboard / controller for different bits around the house.
very good .. thanks a lot
Thank you.
Nice one Steve!
I was hoping you would continue from there and perhaps write the (or specific) values in a .txt or .csv file or even more interesting into a mySQL database )-:
(Ideally combine say the date and timestamp value with the home sensor value when you write the combined value in a file)
Hi
That's the next video on the list and hopefully in a few weeks as I'm trying to finish off another project
#noderedtutorials for more videos nodered
Thanks! Is there any logic behind the msg id or is it just a random number?
The idea is that you can use it to track a message even if it branches.
it is possible to split one string like this "18.3;82.0;3" for a 3 topics ?
You can split on the ; using
s="18.3;82.0;3";
res=s.split(",");
you should get an arryay
[18.3,82.0,3]
@@stevecope thanks
Hi Steve, this is great. I am a novice at this. What example videos do you have to extract(getData) data from a "Text" File using flows or objects?
Hi
Are you looking to extract words from text.? do you have a little example
Yes I do. This is from a log file: I am looking to extract the connect-id: , sco-id: , and the asset-id:
3 rows retrieved, max rows: 10; local time: Tue Mar 03 18:59:09 UTC 2020
execution start: 2020-03-03 18:30:22.153 UTC
{"compile-ms":"9","exec-ms":"94","server-rec'd":"1583260222134","statusDetail":"","status":"DEFAULT","host":"python-85fb5dbf54-t8tbs","total-ms":"107"}
2020-03-03 18:30:22.153 INFO 451: starting: api replaySession, level: TRACE
2020-03-03 18:30:22.165 DEBUG starting execution
2020-03-03 18:30:22.165 DEBUG replaySession
2020-03-03 18:30:22.166 DEBUG connect-id : r6GJIPvyVflqXpJd
2020-03-03 18:30:22.166 DEBUG sco-id : 11692
2020-03-03 18:30:22.166 DEBUG asset-id : 58754
2020-03-03 18:30:22.235 TRACE PS: SELECT date_start, date_end, attendees_list, transcripts, sco_info, meeting_permissions_list, server FROM session_log WHERE connect_id = ? AND sco_id = ? AND asset_id = ? /* ec81aa30-5d7c-11ea-8ee0-53b4772b249d replaySession */
-> args: ('r6GJIPvyVflqXpJd', 11692, 58754)
-> consistency: ONE
2020-03-03 18:30:22.258 DEBUG Failed to find meeting [r6GJIPvyVflqXpJd / 11692 / 58754] in session log
2020-03-03 18:30:22.259 DEBUG 1 datalake keyspace queries
2020-03-03 18:30:22.259 DEBUG executed without exceptions
"meeting.log" 67L, 3976C
@@gilquinones6652 I'll take a look
@@gilquinones6652 Hi
I found a node that might be useful
flows.nodered.org/node/node-red-contrib-string
I will try it myself to see how it works
Contact me on the ask steve page on the site as it is easier to send you a flow.
www.steves-internet-guide.com/ask-steve/
rgds
steve
Steve , I will take a look and let me know what you find. Thank you
Dear Steve, i have little problem converting message objects. I mailed regarding the issue. Kindly check