MQTT, mysteries

My basic question is how does MQTT work architecturally within the HA world. My two basic problems are…

  1. when I have MQTT add-on running, Node Red does not. When I disable MQTT, Node Red works again. Node Red is clearly making MQTT calls to run a flow. I get that it’s integrated. But yet I am creating a conflict when both are active.
  2. in order to be able to address advanced features with a JASCO switch, I learned that I needed ZWAVEJS2MQTT, and after trying to following instructions, broke the entity ID’s across the platform such that Lovelace Cards give entity not available, but the ZWAVEJS2MQTT seems to work just fine, including performaing a network heal. Am I supposed to kill all of the devices and reattach them

So… what gives, what am I missing? Is it an ordering issue in terms of installations? Is the conflict between running the same service on different platforms? How are we supposed to think about running multiple services where MQTT is integration, but potentially competing with each other? Is that even an issue?

Before venturing down too many additional roads, I would love to understand this better.

If you have a link you think is helpful, I’ll take it. If you feel like we might tallk by phone to gain a better understanding, I’ll take that too.

My environment is currently at

  • 20 zwave nodes (Jasco, Fibaro, Qibino)
  • Arlo
  • Bose (also problematic, it’s own quandry of building a better app than Bose did, w/in HA)
  • Thermo’s
  • Garmin Watch
  • TV’s
  • Garage door

… and more in the works.

Having a stronger understanding of MQTT is becoming paramount.

I don’t know if I can fully help but I’ll give it a try…

  1. I don’t use Node-Red (I tried it once but didn’t care for it) but there should be no reason that I know of that the two add-ons should interfere with each other. The only way that would be possible is if they used the same port for communication. I’d be surprised if that was it since you added them both thru the add-ons but it would be something to check.

  2. Not that it helps with the MQTT/Node-red interference issue but you don’t have to use the MQTT portion of Zwavejs2mqtt. Just disable that and use websockets to get your zwave network running. Then sort out MQTT later.

and I assume you had some version of zwave running before? If so when you switched to zwavejs then the entity_ids won’t be the same by default sine it’s a different integration supplying the info. You will need to go to the entities of zwavejs and change them to your old entity_ids. there should be no reason to need to re-pair anything at least for that reason.

As fr as how MQTT works…

Here is a link that will give you way more information than you need to get started but it is pretty thorough so take from it what you want:

https://www.hivemq.com/blog/how-to-get-started-with-mqtt/

but basically, MQTT is a server-client system in which the server (called a broker) is the central communication hub and repository for all of the mqtt topics and values.

A client connects to the broker.

And then the client tells the broker which topics it want to listen for (“subscribe”) so the broker only sends those topics to that client.

The client will also send (“publish”) all of it’s topics that it creates to the broker so they are available to any client that wants to get those topics by subscribing to them.

That is abnormal. I have both the MQTT Mosquitto Broker Add-On and the Node-Red Add-On working concurrently with no problems.

Node-Red only needs MQTT if you intend to create flows that communicate via MQTT. In that case, it’s normal to expect the two Add-Ons to work hand in hand.