# MQTT SOM/EOM message formats. Problems

**URL:** https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215
**Category:** General
**Created:** [16 April 2019 07:16 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215 "2019-04-16T07:16:22Z")
**Posts on this page:** 20
**Page:** 3

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [20 April 2019 09:44 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/42 "2019-04-20T09:44:03Z")

</div>

Yes, sorry.

I know they aren't standard nodes, and there is a bit of dislike of them.

> [@zenofmud](#):
>
> If the `fan` node is not doing anyting to msg.payload then you are sending a `string` into the MQTT-out node.

Correct. Probably not the best thing, but it _explains_ the life of the 'X' which is/was seen in an `EOM` error message.

The MQTT-Out node is to the "IFF" channel.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [20 April 2019 09:49 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/43 "2019-04-20T09:49:32Z")

</div>

> [@Trying\_to\_learn](#):
>
> I know they aren't standard nodes, and there is a bit of dislike of them.

No. It isn't a dislike. We need to know what they are so we can understand the flow. You haven't said what they are... All we need is the name of the module that provides them.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [20 April 2019 09:54 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/44 "2019-04-20T09:54:01Z")

</div>

Ok... Though again: Apologies.

The `FAN` node is just an anchor point and doesn't alter the messages in anyway.

The `GATE` node is basically a _gate_ that is either open or closed to allow data to pass or be blocked.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [20 April 2019 10:22 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/45 "2019-04-20T10:22:47Z")

</div>

What node - i.e. node-red-contrib-xxxxx is the `fan` node?  
What node - i.e. node-red-contrib-xxxxx is the `gate` node?

I you won't provide the information then I have better things to do with my time than help you.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [20 April 2019 10:24 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/46 "2019-04-20T10:24:27Z")

</div>

> [@zenofmud](#):
>
> What node - i.e. node-red-contrib-xxxxx is the `fan` node?  
> What node - i.e. node-red-contrib-xxxxx is the `gate` node?

They are the nodes.  
node-red-contrib-fan  
node-red-contrib-simple-gate

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [20 April 2019 10:37 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/47 "2019-04-20T10:37:54Z")

</div>

Great, so you are receiving a message with a topic of 'EOM' or 'SOM' and you change the payload to the letter 'X' and then publish the msg (a string) with the topic 'IFF'

What more do you need to know about that flow?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [20 April 2019 10:43 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/48 "2019-04-20T10:43:08Z")

</div>

I am receiving a message with topic 'EOM' or 'SOM'. (Doesn't matter which.) via MQTT  
That is modified to 'X' and sent out on MQTT topic 'IFF'.

Why am I getting MQTT messages topic 'EOM' and payload of 'X'?

I am not understanding how/why that is happening.

 ![Screenshot%20from%202019-04-20%2009-52-51b](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e05d720ea9810bacefe3660ae80e8aec5b01393a.png)

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [20 April 2019 11:32 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/49 "2019-04-20T11:32:55Z")

</div>

> [@Trying\_to\_learn](#):
>
> Why am I getting MQTT messages topic 'EOM' and payload of 'X'?

Because somewhere in your flow(s), on some one of your devices, you are sending it.

Maybe you should change the topics, in all your MQTT-out nodes, to include the flow/machine messages are being sent from. For example you sould set your topic `piface/relaycontrol/EOM` and in the MQTT-in set the topic to `+/+/EOM` and you would receive all EOM messages from anywhere.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [20 April 2019 11:37 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/50 "2019-04-20T11:37:42Z")

</div>

If you didn't know about how to set topics, you might want to read [https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/](https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices/)

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [20 April 2019 11:43 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/51 "2019-04-20T11:43:53Z")

</div>

I am updating the database.

I hope I am setting the topics correctly.

I set the topics on some MQTT things, like machine name, flow name and error type.  
Though looking at it, that was done way WAY back. I have some problems with the structure of the names/data. That is going to be a whole lot of fun.

What I am stuck at now is how to edit one MQTT node and get the details applied to ALL nodes on that machine.

That will really save time with things but I can't find any help with what that does.

Sure, I could be missing it (or staring at the trees, looking for the wood).

 ![Screenshot%20from%202019-04-20%2021-41-42](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e8b018d86b9ba0dec216a9e7dc2f619f6b44f2eb.png)

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [20 April 2019 11:50 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/52 "2019-04-20T11:50:56Z")

</div>

What detail do you want to change?

You are looking at the broker config node which represents the overall connection including birth/death messages. You can see in the bottom left corner there are 41 regular mqtt nodes that uses this one config node. So any edit you make to this one node will apply to the connection shared by all of those nodes.

If you want to change the topics individual nodes subscribe or publish to, you'll have to edit each individually.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [20 April 2019 11:51 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/53 "2019-04-20T11:51:14Z")

</div>

Use search (CTRL+F) type the name of your config node

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [20 April 2019 11:56 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/54 "2019-04-20T11:56:33Z")

</div>

Nick,

Thanks.

I want to set the Birth/Death certificates for that machine.  
Yes, there are 41 nodes. Rather than going through all of them and editing the Birth/Death Certificates.....  
It would really help I edit one and they all get done.

I am maybe doing something wrong, but I want to be sure I am doing the right thing.

So for verification: I edit the Birth/Death certificates and all the nodes on that machine get those values.

The topics will be set from outside the node.

I'm just wanting to be sure before I go too far down the rabbit hole.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [20 April 2019 12:18 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/55 "2019-04-20T12:18:23Z")

</div>

> [@Trying\_to\_learn](#):
>
> Yes, there are 41 nodes. Rather than going through all of them and editing the Birth/Death Certificates.....

The point is you have 41 nodes sharing the same mqtt-broker config node. So you only need to edit the one broker config node.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [20 April 2019 12:19 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/56 "2019-04-20T12:19:08Z")

</div>

Hold on, do you have 41 config nodes?

Are you connecting to 41 different brokers?

The config should be shared between all your MQTT in/out nodes (i.e. only one of them) and you should only edit it once?!?!

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [20 April 2019 12:20 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/57 "2019-04-20T12:20:15Z")

</div>

he/she has only one

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [20 April 2019 12:22 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/58 "2019-04-20T12:22:07Z")

</div>

That is a point of _contention_/confusion.

I wasn't sure abut that.

Now that is clarified, all good.

Now I need to go back and I am checking all the MQTT nodes on two of the many machines.  
And I need to rewrite some of the flows because they are too ........ _old_.

In light of what I have seen, learned, and other stuff, I want to make it a lot better constructed.

Who knows, it may go to help the problem.

(I have other replies to read)

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [20 April 2019 12:32 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/59 "2019-04-20T12:32:21Z")

</div>

This "update all nodes" though.........

Recent thing?

Or was I just unaware of it for all this time?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [20 April 2019 12:37 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/60 "2019-04-20T12:37:38Z")

</div>

??? What do you mean **update all nodes**?. The config node where you set birth and death is ONE **shared** node. Changing that ONE SHARED NODE means just that. You aren't updating all, just a single shared config node.

Does that make more sense?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [20 April 2019 12:41 UTC](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215/61 "2019-04-20T12:41:09Z")

</div>

Well, obviously it was always there.

This is the MQTT node setting as shown in:  
[https://discourse.nodered.org/uploads/short-url/xcs3G654FcpY8xGER5YuCO7mTRV.png](https://discourse.nodered.org/uploads/short-url/xcs3G654FcpY8xGER5YuCO7mTRV.png)

For reasons unknown I never saw it before.

Just as I am/was going through editing nodes on the same machine, I am sure I saw some nodes that had different Brith/Death certificate messages than others on the same machine.

Shrug.

I'll chalk that to me not looking hard enough.

[Previous page](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215.md?page=2)

[Next page](https://discourse.nodered.org/t/mqtt-som-eom-message-formats-problems/10215.md?page=4)
