# Node Red newbie - first question

**URL:** <https://discourse.nodered.org/t/node-red-newbie-first-question/46098>\
**Category:** General\
**Created:** [22 May 2021 16:21 UTC](https://discourse.nodered.org/t/node-red-newbie-first-question/46098 "2021-05-22T16:21:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pw44](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@pw44](https://discourse.nodered.org/u/pw44)\
**Post date:** [22 May 2021 16:21 UTC](https://discourse.nodered.org/t/node-red-newbie-first-question/46098/1 "2021-05-22T16:21:50Z")

</div>

Dear @ll,

as a complete newbie in node red, but willing to learn, i instaleld it and some add ons, like mqtt.

I also have mosquitto broker installed, and would like to start the first flow, as sending an mqtt message to the broker, process it by node-red, sending a reply to the broker.

Any tutorial or example, where i can start to look at?

Thank you all for any support.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [22 May 2021 16:33 UTC](https://discourse.nodered.org/t/node-red-newbie-first-question/46098/2 "2021-05-22T16:33:46Z")

</div>

Here is an example (use CTRL I to import to editor)  
You will need to add you mosquitto settings to the mqtt config node, click the pencil in any of the mqtt nodes, and add your mqtt server

```auto
[{"id":"78724214.647b3c","type":"mqtt in","z":"c74669a0.6a34f8","name":"","topic":"test/data","qos":"0","datatype":"auto","broker":"e8ba3ef5.22f4a8","x":190,"y":2680,"wires":[["27ca0938.dbaa9e"]]},{"id":"27ca0938.dbaa9e","type":"function","z":"c74669a0.6a34f8","name":"","func":"msg.payload = msg.payload * 10;\nmsg.topic = \"test/result\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":350,"y":2680,"wires":[["6de20b58.5c9a24"]]},{"id":"ce48dc83.c4d5e8","type":"comment","z":"c74669a0.6a34f8","name":"receive data and return result ","info":"this returns result to a different topic","x":390,"y":2640,"wires":[]},{"id":"6de20b58.5c9a24","type":"mqtt out","z":"c74669a0.6a34f8","name":"","topic":"","qos":"0","retain":"false","broker":"e8ba3ef5.22f4a8","x":530,"y":2680,"wires":[]},{"id":"b239b6f3.fb7dc","type":"comment","z":"c74669a0.6a34f8","name":"subscribe and publish","info":"these can be any where they are just here to see example . you counld publish from command line to test/data\nand subscribe to test/result","x":430,"y":2760,"wires":[]},{"id":"18e4381a.81bb2","type":"mqtt in","z":"c74669a0.6a34f8","name":"subscribe to result","topic":"test/result","qos":"0","datatype":"json","broker":"e8ba3ef5.22f4a8","x":340,"y":2800,"wires":[["eb4b7ab6.ac7fa"]]},{"id":"940a9a16.f74ee8","type":"inject","z":"c74669a0.6a34f8","name":"publish mqtt data","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"test/data","payload":"10","payloadType":"num","x":210,"y":2860,"wires":[["f02fa7d4.a1ef6"]]},{"id":"f02fa7d4.a1ef6","type":"mqtt out","z":"c74669a0.6a34f8","name":"","topic":"","qos":"0","retain":"false","broker":"e8ba3ef5.22f4a8","x":410,"y":2860,"wires":[]},{"id":"eb4b7ab6.ac7fa","type":"debug","z":"c74669a0.6a34f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":550,"y":2800,"wires":[]},{"id":"e8ba3ef5.22f4a8","type":"mqtt-broker","name":"testb","broker":"192.168.1.25","port":"1883","clientid":"node-red","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

```

it takes any number and times it by 10 so the payload must be a number

P.S. Welcome

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 May 2021 16:34 UTC](https://discourse.nodered.org/t/node-red-newbie-first-question/46098/3 "2021-05-22T16:34:47Z")

</div>

Welcome to the forum @pw44

Also I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

<div class="post-metadata">

**Author:** ![pw44](https://avatars.discourse-cdn.com/v4/letter/p/90ced4/32.png) [@pw44](https://discourse.nodered.org/u/pw44)\
**Post date:** [26 May 2021 13:17 UTC](https://discourse.nodered.org/t/node-red-newbie-first-question/46098/4 "2021-05-26T13:17:47Z")

</div>

@E1cid [quote="E1cid, post:2, topic:46098"]  
Here is an example (use CTRL I to import to editor)  
[/quote]

Thank you so much. WIll try and see.

@Colin  
thank you so much for the hint.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 July 2021 13:18 UTC](https://discourse.nodered.org/t/node-red-newbie-first-question/46098/5 "2021-07-25T13:18:40Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
