# Another message split issue

**URL:** <https://discourse.nodered.org/t/another-message-split-issue/65962>\
**Category:** General\
**Created:** [3 August 2022 06:51 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962 "2022-08-03T06:51:16Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [3 August 2022 06:51 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/1 "2022-08-03T06:51:16Z")

</div>

Ok im sure im missing something simple here.  
I am trying to for now get the power settings from an esp8266 with tasmota here is the mqtt message.

```auto
{"Time":"2022-08-03T07:44:49","Uptime":"0T04:10:13","UptimeSec":15013,"Heap":23,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":38,"MqttCount":2,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","Wifi":{"AP":1,"SSId":"Newmannest","BSSId":"6C:CD:D6:02:7B:03","Channel":5,"Mode":"11n","RSSI":100,"Signal":-45,"LinkCount":2,"Downtime":"0T00:00:11"}}

```

on all my other esp8266 I only have 1 relay controlling a valve , this one I have multiple you can see the difference in mqtt explorer. I am not sure why its different but it is .  
 ![whyisthisdifferent](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/3/93c5c8c36335abd6e85aa746ead100af38188301.png)  
The device I'm confused about is tas04 it shows logging in stat instead of result and power like eferm cferm and so on.  
I should know what do do with the message but I need a kick in the arse direction to see what im forgetting.

---

<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:** [3 August 2022 07:31 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/2 "2022-08-03T07:31:44Z")

</div>

This is what your MQTT message looks like that you posted above.  
 ![mqtt_object](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/0/50910110fac0f0c04322d4ccc8bd37ea306416c3.png)  
So if you want, for example the value of POWER4, you just use...  
`msg.payload.POWER4`

If you wanted to "listen" to a particular ESP8266, you could use a dedicated MQTT-In like this.  
 ![mqtt_listen](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/54e5d7bc4013e2dd0d580776a1c2b108572a8542.png)  
You will need to change **/node54/** etc.. to match what you have in your Tasmota settings.

I use this method to get feedback from my home security lighting system.

 ![tasmota_feedback](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/9/998d417479200f1a45fcade5fd8d59bee4fc0900.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:** [3 August 2022 15:20 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/3 "2022-08-03T15:20:19Z")

</div>

Thanks for fast reply @dynamicdave  
so I have tried that however if you look at mqtt messages coming in.  
it does not have a "POWER" message coming from my tas04.  
why is it different then the others? see picture  
 ![tas04isdif](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/c/5cfd86512aceabae0647b5a66f56ecd4fd2132fb.png)  
The esp in question is only sending sensor and logging messages. the power portion seems to be imbedded in the logging message.

 ![mqttexpanded](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/78b07e02f4cff1158771953dd087f802fa20316c.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:** [3 August 2022 15:46 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/4 "2022-08-03T15:46:59Z")

</div>

I did get message set the way I needed. I used function node  
here is flow

```auto
[{"id":"c68e95a9daba011e","type":"mqtt in","z":"a83eb32ba827c55d","name":"valve status","topic":"tele/tas04/STATE","qos":"2","datatype":"json","broker":"8db3fac0.99dd48","nl":false,"rap":true,"rh":0,"inputs":0,"x":712,"y":725,"wires":[["1b56672ceb1fdc4f","f03e45e260f969c1"]]},{"id":"f03e45e260f969c1","type":"function","z":"a83eb32ba827c55d","name":"Fermenters Pressure","func":"let msg0 = {};\nlet msg1 = {};\nlet msg2 = {};\nlet msg3 = {};\n\nmsg0.payload = msg.payload.POWER1;\nmsg1.payload = msg.payload.POWER2;\nmsg2.payload = msg.payload.POWER3;\nmsg3.payload = msg.payload.POWER4;\n\nmsg0.topic = \"POWER1\"\nmsg1.topic = \"POWER2\"\nmsg2.topic = \"POWER3\"\nmsg3.topic = \"POWER4\"\nreturn [msg0, msg1, msg2, msg3];\n","outputs":4,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":890,"wires":[["40cc6491facd9bb6"],["06aa6bf4b71bc3d0"],["e5cf61990eb748fa"],["dd12bbf24019c3bd"]]},{"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":""}]

```

here is function I wrote

```auto
let msg0 = {};
let msg1 = {};
let msg2 = {};
let msg3 = {};

msg0.payload = msg.payload.POWER1;
msg1.payload = msg.payload.POWER2;
msg2.payload = msg.payload.POWER3;
msg3.payload = msg.payload.POWER4;

msg0.topic = "POWER1"
msg1.topic = "POWER2"
msg2.topic = "POWER3"
msg3.topic = "POWER4"
return [msg0, msg1, msg2, msg3];

```

however im still stumped on why this esp sends a logging message instead of a power message.  
I guess ill have to play with commands to see if i can turn each valve on and off by themselves when i get back to brewery.

---

<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:** [3 August 2022 15:47 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/5 "2022-08-03T15:47:28Z")

</div>

> [@dynamicdave](#):
>
> This is what your MQTT message looks like that you posted above.

I just used the MQTT message you posted as I thought that was what you were trying to isolate.  
The rest of your post looks like something that MQTT Explorer might be showing.

---

<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:** [3 August 2022 15:49 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/6 "2022-08-03T15:49:42Z")

</div>

> [@9toejack](#):
>
> however im still stumped on why this esp sends a logging message instead of a power message.

Sounds like a setting in Tasmota is affecting that. I don't use Tasmota, so I hope someone else jumps in.

---

<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:** [3 August 2022 15:52 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/7 "2022-08-03T15:52:35Z")

</div>

yes your correct except for you are able to use "stat/node55/POWER" in my case if I was receiving a "POWER" message node55 would be changed to tas04.  
however im not receiving the power message.  
instead i am having to use "tele/tas04/STATE" for my mqtt in  
if I use stat/tas04/LOGGING it cant parse the jason object and gives me further issues.  
at least I did figure out how to get my info out thanks to your help.  
I think I have another issue or I'm just simply overthinking it. lol

---

<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:** [3 August 2022 15:57 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/8 "2022-08-03T15:57:31Z")

</div>

> [@dynamicdave](#):
>
> Sounds like a setting in Tasmota is affecting that. I don't use Tasmota, so I hope someone else jumps in.

when I get back to taproom this morning, ill look at settings on the esp devices.  
I do know this one has different firmware because of the ADS1115 (analog to digital converter) and the need for I2c bus comms.

just a little note, I have added these electric ball valves so when im carbonating the beer, I can set a specific pressure goal and hit start. It should in theory open and allow the proper amount of co2 carbonate the beer to a precise amount rather then the norm where I start carbonating, start drinking and yes squirrel and forget what the hell I was doing lol.

---

<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:** [3 August 2022 16:00 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/9 "2022-08-03T16:00:25Z")

</div>

If I click the Console option on the main menu on one of my Tasmota nodes.  
 ![tasmota_main](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/4/2452d2e6a797a08b1d6b26617ca48fd2c91320c8.png)  
I get this report...  
 ![tasmota_report](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/f/4f3d97a302318d056b92f67f89bac876ded8dc55.png)  
I then used one of those lines as the topic setting in the MQTT-In node.

If you look at the various lines in the report, you can see **stat/.../RESULT** is an **object** and **stat/.../POWER** is a **string**. Also **tele/.../STATE is an object.**

---

<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:** [3 August 2022 16:06 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/10 "2022-08-03T16:06:42Z")

</div>

> [@dynamicdave](#):
>
> I don't use Tasmota

lol and your showing me tasmota  
when i have the relays set to relay in tasmota 4 toggle buttons.  
on that screen you screen shotted,  
however when I do not see a toggle buttons.  
I bet that is why. I'm logging off here and headed to brewery to challenge that theory.

---

<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:** [3 August 2022 16:09 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/11 "2022-08-03T16:09:30Z")

</div>

Ha, ha - well spotted.  
I only use Tasmota in a very simplistic way as a mains switch driven by MQTT commands.

---

<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:** [3 August 2022 16:19 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/12 "2022-08-03T16:19:27Z")

</div>

![mytasmotamsg](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/b/0bc571d660e9e8567986bb698f77d6dec4e98771.png)  
this is my screen in console  
this is my mainscreen see how i have toggle buttons.

 ![myscreen](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/b/5bc638deb349e32a98bec50ef0e781322944c74f.png)  
in configure module is your toggle a switch or a relay ?  
 ![relayorswtich](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/e/7e8b2c6960085831b3fe07fc290c1a9b6ff3cd0e.png)

---

<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:** [3 August 2022 16:22 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/13 "2022-08-03T16:22:45Z")

</div>

Neither of those - it just a simple (old) S20 Sonoff.

 ![tasmota_config](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/878daf80de10b4afc06ed597206eac995f1988ba.png)  
I think you have a lot more options selected than I do.  
That's why I said - I don't use Tasmota much.

I think I've spotted the difference - I think you are using an ESP8266 device flashed with Tasmota.  
I'm using a Sonoff mains switch - which I re-flashed with Tasmota.  
 ![sonoff_s26](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c704d443c9b3dbd59e8c6fe84750461ec9237068.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:** [3 August 2022 16:28 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/14 "2022-08-03T16:28:26Z")

</div>

yes i see that.  
I found out why im getting a logging mqtt from the one esp can you see the difference

 ![taso4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/1/21c71933473ac5754719528b73d862d9bb44940b.png)  
 ![theothers](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/e/ded940a0834c2c365812ae6f0a1d1228ac6e13ec.png)

---

<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:** [3 August 2022 16:30 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/15 "2022-08-03T16:30:53Z")

</div>

Yep - - Mqtt log level is different between the two devices.

---

<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:** [3 August 2022 16:30 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/16 "2022-08-03T16:30:56Z")

</div>

> [@dynamicdave](#):
>
> I think I've spotted the difference - I think you are using an ESP8266 device flashed with Tasmota.  
> I'm using a Sonoff mains switch - which I re-flashed with Tasmota.

its just amazing whats out there for us to automate home, shop, brewery whatever  
 ![incredibles-the](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/d/7d60f5e92bb7878f0431ca5a9124d2b947ea7951.gif)

---

<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:** [3 August 2022 16:33 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/17 "2022-08-03T16:33:55Z")

</div>

This is my settings for logging.

 ![tasmota_logging](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/dd119622c52fd5bc0c61c86a2dbe8d931d7c697a.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:** [3 August 2022 16:36 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/18 "2022-08-03T16:36:46Z")

</div>

yes for somereason the syslog level was set to 2 info  
here is my console of tas04 and the fermenters

 ![theothersconsole](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/b/3bc0d19d2d03766d8bc42bd6970c7656c5031029.png)  
 ![tas04console](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5dba9e570c37a20e500efb42bbed86cf49decfe5.png)  
im wondering if its because i have more then one relay.  
not sure why I am not getting the Power message  
baffling

---

<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:** [3 August 2022 17:04 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/19 "2022-08-03T17:04:00Z")

</div>

I'm sure one of the guys that use Tasmota in more depth than me will probably jump in with some ideas.

---

<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:** [3 August 2022 18:51 UTC](https://discourse.nodered.org/t/another-message-split-issue/65962/20 "2022-08-03T18:51:05Z")

</div>

so when i activate the co2 valve i do get the power message.  
 ![whala](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f17ef0b1c73d9aea4a1775cbcca7b139b42062e4.png)

[Next page](https://discourse.nodered.org/t/another-message-split-issue/65962.md?page=2)
