MQTT SOM/EOM message formats. Problems

Yes, sorry.

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

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.

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.

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.

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.

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

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?

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.

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.

1 Like

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/

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).

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.

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

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.

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.

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?!?!

he/she has only one

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)

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

Recent thing?

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

??? 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?

Well, obviously it was always there.

This is the MQTT node setting as shown in:
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.