# Esp8266 and multiple ds18b20's with mqtt

**URL:** <https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556>\
**Category:** General\
**Tags:** http-request, mqtt\
**Created:** [30 March 2022 17:47 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556 "2022-03-30T17:47:18Z")\
**Posts on this page:** 20\
**Page:** 11

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [16 April 2022 21:34 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/201 "2022-04-16T21:34:48Z")

</div>

well something happened today  
all my sensors stopped working.  
but one.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [17 April 2022 04:53 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/202 "2022-04-17T04:53:56Z")

</div>

Just re-read your question... _what do you guys use to plot out your electronics for wiring?_  
If you want to draw **schematics** , then EasyEDA is a brilliant tool. There is a FREE version.

> **[EasyEDA - Online PCB design & circuit simulator](https://easyeda.com/)**
>
> EasyEDA is a free and easy to use circuit design, circuit simulator and pcb design that runs in your web browser.

Here's an example.

 ![Screen Shot 04-17-22 at 05.58 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/3044b3010af1df56ae0d0e19913cc2755b385d3e.png)

EasyEDA also supports **PCB layouts** and links to JLCpcb if you wanted to get a PCB manufactured.

---

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [17 April 2022 15:44 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/203 "2022-04-17T15:44:36Z")

</div>

i downloaded the fritzing.  
but something more for plotting actual wire in building. a simple cad or something i guess.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [17 April 2022 16:56 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/204 "2022-04-17T16:56:47Z")

</div>

Sorry can't help on that one.  
It might be worth posting your question on the 'Industrial' category of this forum.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [17 April 2022 18:34 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/205 "2022-04-17T18:34:44Z")

</div>

@9toejack I don't know if it will help your particular case... but I was also concerned that I would lose connectivity, or node-RED would throw a strop, etc, and therefore my sonoff relay would then remain on (and my greenhouse flooded!!).

I found a Tasmota feature that can queue commands in what Tasmota call **BACKLOG** , and each command is then executed sequentially by the device.  
To use the backlog, set your MQTT topic to **cmnd/deviceID/Backlog**  
...and the MQTT payload to **Power ON; Delay 3000; Power OFF** (each command is separated by a semicolon).

So in the above example, I pre-determine how long I want the sonoff to activate (300 = 30 seconds), string the commands together, and once sent, the sonoff will work through the sequence regardless if the network fails, and de-activate the sonoff after the time specified.

You can also add other commands to the MQTT payload, such as **Status 1** which will send a MQTT msg to confirm that the command has been executed;  
**Power ON; Status 1; Delay 3000; Status 1; Power OFF; Status 1**  
(The status reports are on the MQTT topic **stat/deviceID/RESULT** )

---

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [17 April 2022 20:31 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/206 "2022-04-17T20:31:06Z")

</div>

So I think biggest deal is to make sure the desired temperature and trigger temp must be logged and ran from the TAS, but I, when there is wifi cab change those parameters via node red. That way if wifi goes out, it will still be ok till wifi is back. I just won't be able to change targets while network is down.  
Further more, the only tank that I will fill remotely has a float switch that will disrupt the flow if it gets to max, I leave fill to on to compensate for evaporation.

---

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [20 April 2022 22:16 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/207 "2022-04-20T22:16:20Z")

</div>

Ok checking back in.  
something isn't clicking in my head with mqtt, Tasmota, and Node red.  
here is my command screen.

 ![tasmota command screen](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/7/37cb179057d2f73cf73c517cbc5a0cdaf5ee8e9d.png)

here is my flow that i have been slowly tweaking from this video from Steve C.

[![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2e0ed34d1719ea542887f53d79990f05257cb047.jpeg "Tasmota Device Network Monitor And Control MQTT and node-red Project") ](https://www.youtube.com/watch?v=jVf2s87ClVo)

flow here

```auto
[{"id":"74b8a7cc2ec7d068","type":"tab","label":"tasmota control 1","disabled":false,"info":""},{"id":"1815959b3c3196ba","type":"ui_switch","z":"74b8a7cc2ec7d068","name":"Water Pump","label":"Water Pump","tooltip":"","group":"7dc3530e.8f07a4","order":4,"width":"3","height":"1","passthru":false,"decouple":"true","topic":"Railtemp5/cmnd/POWER","style":"","onvalue":"1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"0","offvalueType":"str","officon":"","offcolor":"","x":691.4286193847656,"y":251.25000762939453,"wires":[["dc31eaf2325ec446","9dafc775d0e68f32"]]},{"id":"17e574f0a211ef15","type":"ui_button","z":"74b8a7cc2ec7d068","name":"Water Pump Toggle","group":"7dc3530e.8f07a4","order":5,"width":"3","height":"1","passthru":false,"label":"Water Pump toggle","tooltip":"","color":"","bgcolor":"","icon":"","payload":"2","payloadType":"str","topic":"Railtemp5/POWER/cmnd/POWER1","x":731.5715637207031,"y":341.1071472167969,"wires":[["dc31eaf2325ec446"]]},{"id":"dc31eaf2325ec446","type":"mqtt out","z":"74b8a7cc2ec7d068","name":"","topic":"Railtemp5/RESULT","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8db3fac0.99dd48","x":1082.4000244140625,"y":423.88331604003906,"wires":[]},{"id":"51dede4a148f86a4","type":"function","z":"74b8a7cc2ec7d068","name":"","func":"msg.topic=\"house/water-pump/cmnd/POWER1\";\n//msg.topic=\"cmnd/tasmota_1/POWER1\";\n//msg.payload=\"\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":702.2666931152344,"y":105.98333740234375,"wires":[["dc31eaf2325ec446"]]},{"id":"3bc9ad4cf489694e","type":"inject","z":"74b8a7cc2ec7d068","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":478.26666259765625,"y":57,"wires":[["51dede4a148f86a4"]]},{"id":"b2b0feced5587e54","type":"mqtt in","z":"74b8a7cc2ec7d068","name":"","topic":"Railtemp5/RESULT","qos":"0","datatype":"auto","broker":"8db3fac0.99dd48","nl":false,"rap":false,"inputs":0,"x":315.3999786376953,"y":390.88334465026855,"wires":[["85e7ab40f16cff45"]]},{"id":"85e7ab40f16cff45","type":"switch","z":"74b8a7cc2ec7d068","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"Railtemp5/RESULT","vt":"str"},{"t":"eq","v":"Railtemp5/RESULt","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":556.2667541503906,"y":430.2166442871094,"wires":[["1815959b3c3196ba","f6799709b16a864a"],["f405886d87c0dae2"]]},{"id":"f6799709b16a864a","type":"debug","z":"74b8a7cc2ec7d068","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730.2665710449219,"y":417.23333740234375,"wires":[]},{"id":"9dafc775d0e68f32","type":"debug","z":"74b8a7cc2ec7d068","name":"out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":956.2666015625,"y":270.23333740234375,"wires":[]},{"id":"f405886d87c0dae2","type":"ui_switch","z":"74b8a7cc2ec7d068","name":"Main Light","label":"Main Light","tooltip":"","group":"7dc3530e.8f07a4","order":6,"width":"3","height":"1","passthru":false,"decouple":"true","topic":"house/main-light/cmnd/POWER1","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","x":650.86669921875,"y":541.683349609375,"wires":[["dc31eaf2325ec446"]]},{"id":"c528e8b809253275","type":"ui_button","z":"74b8a7cc2ec7d068","name":"Main light toggle","group":"7dc3530e.8f07a4","order":7,"width":"3","height":"1","passthru":false,"label":"Main light toggle","tooltip":"","color":"","bgcolor":"","icon":"","payload":"2","payloadType":"str","topic":"house/main-light/cmnd/POWER1","x":733.0095825195312,"y":612.5404968261719,"wires":[["dc31eaf2325ec446"]]},{"id":"662b8eca72fb82a7","type":"ui_button","z":"74b8a7cc2ec7d068","name":"Toggle All","group":"7dc3530e.8f07a4","order":7,"width":"3","height":"1","passthru":false,"label":"Toggle All","tooltip":"","color":"","bgcolor":"","icon":"","payload":"2","payloadType":"str","topic":"house/housesonoffs/cmnd/POWER1","x":730.7666625976562,"y":720.2833251953125,"wires":[["dc31eaf2325ec446"]]},{"id":"7dc3530e.8f07a4","type":"ui_group","name":"control","tab":"6b25e5f4.b44ecc","order":1,"disp":true,"width":"24","collapse":false},{"id":"8db3fac0.99dd48","type":"mqtt-broker","name":"","broker":"localhost","port":"1883","clientid":"RailPI","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"1","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"6b25e5f4.b44ecc","type":"ui_tab","name":"Tasmota Control","icon":"dashboard","disabled":false,"hidden":false}]

```

im really confused on the MQTT file structure and how to send or receive . where do i pick the names of each unit.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [21 April 2022 02:00 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/208 "2022-04-21T02:00:13Z")

</div>

You dont pick the names of the units you send to your broker and send it a topic

here is an example of one of mine - ths is an in node

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/f/2fb4c73f61711f1395e5f2f845bc3f46db57a108.png)

And here is one i am sending out to a Tasmota water pump

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6b740641be6c625eb43bd3c3113611fc206ced13.png)

So on the Tasmota device you do the following

1. Give it an MQTT Broker to point to
2. Give it a MQTT Topic to listen to and send on

If you use MQTT Explorer and point it to the Broker it will show you the structure of the messages and their frequency etc coming in and going out

You can also use Julians (@TotallyInformation ) excellent project which provides the same functionality within Node Red itself.

As i said earlier in the thread - you are far better off leaving the laptop in the office for a while and use Teamviewer etc to take remote control of it from home so you can get a better feel for what is going on

Craig

Craig

---

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [21 April 2022 02:51 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/209 "2022-04-21T02:51:12Z")

</div>

What im confused on is the topic being sent out this is screan shot of your example.  
How did you know that's the topic. Name for the out

 ![Screenshot_20220420-194833_Gmail.jpg](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/8190c54cbf99f38c31230c69c7c46ccce5829e36.jpeg)

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [21 April 2022 03:22 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/210 "2022-04-21T03:22:24Z")

</div>

You make it up - cmnd is a standard Tasmota command - telling it is it a command to do something

The Topic is the same name as the Topic you setup in the MQTT screen on the Tasmota device

Power is then telling Tasmota that this is a POWER command.

Whatever i inject into that MQTT out node will be sent to the broker where the Tasmota device will retrieve it and act accordingly.

Craig

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [21 April 2022 03:28 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/211 "2022-04-21T03:28:53Z")

</div>

Here is a better example

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/e/3e0fbdf64a874871042ba75893c2e9c4a6e614f3.png)

This is the Tasmota device (Sonoff POWr2) that controls my pool pump)

Here is the MQTT in node on NR

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1d0ad6edfa6eecca56b7dfd11623f9f4aa265498.png)

Craig

---

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [21 April 2022 04:49 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/212 "2022-04-21T04:49:51Z")

</div>

Ok, I got the Teamviewer installed on both , laptop at brewery and computer at house.  
im logged in.  
if i plan on powering a relay.  
do i select relay in gpio setup as well or toggle?

 ![mqttsettingsscreen](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/7705dde121e5a5b23f9155d5892447142f4d5aa3.png)

 ![gpiosetup](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/30f4e27ecd936e93a8ea0bd47c4f252ce33000c1.png)

---

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [21 April 2022 05:48 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/213 "2022-04-21T05:48:20Z")

</div>

ok here is simplified flow.  
but still not getting to act correctly

```auto
[{"id":"74b8a7cc2ec7d068","type":"tab","label":"tasmota control 1","disabled":false,"info":""},{"id":"1815959b3c3196ba","type":"ui_switch","z":"74b8a7cc2ec7d068","name":"Wferm","label":"Wferm","tooltip":"","group":"7dc3530e.8f07a4","order":4,"width":"3","height":"1","passthru":false,"decouple":"true","topic":"Wferm","style":"","onvalue":"1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"0","offvalueType":"str","officon":"","offcolor":"","x":674.4286499023438,"y":255.25001668930054,"wires":[["dc31eaf2325ec446","9dafc775d0e68f32"]]},{"id":"dc31eaf2325ec446","type":"mqtt out","z":"74b8a7cc2ec7d068","name":"","topic":"cmnd/Wferm/POWER","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"8db3fac0.99dd48","x":1092.4000244140625,"y":423.88331604003906,"wires":[]},{"id":"b2b0feced5587e54","type":"mqtt in","z":"74b8a7cc2ec7d068","name":"","topic":"stat/Wferm/RESULT","qos":"1","datatype":"json","broker":"8db3fac0.99dd48","nl":false,"rap":false,"inputs":0,"x":315.3999786376953,"y":390.88334465026855,"wires":[["1815959b3c3196ba","29e740c8c29caed1"]]},{"id":"9dafc775d0e68f32","type":"debug","z":"74b8a7cc2ec7d068","name":"out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":956.2666015625,"y":270.23333740234375,"wires":[]},{"id":"29e740c8c29caed1","type":"debug","z":"74b8a7cc2ec7d068","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":561.5642700195312,"y":406.924516394043,"wires":[]},{"id":"7dc3530e.8f07a4","type":"ui_group","name":"control","tab":"6b25e5f4.b44ecc","order":1,"disp":true,"width":"24","collapse":false},{"id":"8db3fac0.99dd48","type":"mqtt-broker","name":"","broker":"localhost","port":"1883","clientid":"RailPI","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"1","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"6b25e5f4.b44ecc","type":"ui_tab","name":"Tasmota Control","icon":"dashboard","disabled":false,"hidden":false}]

```

here is mqttin node and debug screen

 ![debugandmqttinnode](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/4/94bcb43bcfc6b490c951bee8d08b0a310aad04fd.png)

---

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [21 April 2022 05:49 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/214 "2022-04-21T05:49:47Z")

</div>

if i have switch to show input it doesnt change to on.  
if i have it show output it changes. however  
in node red node screen (not the ui)  
it shows off|on  
when it should say on/on

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [21 April 2022 16:41 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/215 "2022-04-21T16:41:57Z")

</div>

If you want to use a relay connected to the Wemos then you need to set it up first in module parameters.

This is only needed for first setup.

For Wemos choose module type 18 this will show ALL available pins for that device.  
Then which items are connected to which pins like this -

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/50c25e259bba700e41c289938c85f70f1492f257.png)

click the pin you want to use then scroll down list to find relay, then use drop down to pick the number eg1  
Tasmota will then configure this pin and add a switch on main menu to toggle it on and off.

It will then also respond to a command like cmnd/”topic”/power on

with

stat/”topic”/RESULT = {"POWER1":"ON"}  
stat/”topic”/POWER1 = ON

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [21 April 2022 16:45 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/216 "2022-04-21T16:45:29Z")

</div>

Note not all pins can be used as input and output -

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/c/cca3d9d815d59c880210417428771a687e7b94e4.png)

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [21 April 2022 16:48 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/217 "2022-04-21T16:48:52Z")

</div>

Use this topic **stat/”topic”/POWER1** for the input to the switch as its dedicated to that relay output. So doesn't need any addtional processing in NR.

The result topic wil show ANY results from the wemos.

> [@9toejack](#):
>
> if i have switch to show input it doesnt change to on.  
> if i have it show output it changes. however  
> in node red node screen (not the ui)  
> it shows off|on  
> when it should say on/on

Set up your switch like this

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/4/a4ab85827ac6d8f5acb775fd293369a516ccd491.png)

In the editor it will show as on/ if the last input message is the same as the On payload.

---

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [21 April 2022 17:06 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/218 "2022-04-21T17:06:30Z")

</div>

so i dont have a wemos.  
i have

 ![espersion1.PNG](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/d/cdfcffd2afd80ea398c0fb2dec278a3972481c3b.jpeg)  
 ![espversion2.PNG](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/9/f93ab6db7154930dfdaa2a8ca4b3781d1167351e.jpeg)

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [21 April 2022 17:09 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/219 "2022-04-21T17:09:54Z")

</div>

Its an ESP8266 but the pins are just in different places - still pick generic 18

---

<div class="post-metadata">

**Author:** ![9toejack](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/9toejack/32/56868_2.png) [@9toejack](https://discourse.nodered.org/u/9toejack)\
**Post date:** [21 April 2022 17:13 UTC](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556/220 "2022-04-21T17:13:33Z")

</div>

so it wont let me change in module parameters.  
but it will in Template.  
 ![notlettingme](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/b/4bf7975d2cac16421c4a7b731516e8935241ded6.png)

 ![intemplate](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/2/42fefaf89944e2450667974ef0d1014685f7b99b.png)

[Previous page](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556.md?page=10)

[Next page](https://discourse.nodered.org/t/esp8266-and-multiple-ds18b20s-with-mqtt/60556.md?page=12)
