Yet another MQTT question (Multiple Dev add to HA)

Good day everyone.

My name is Casper and I am from Johannesburg, South Africa. This, is my very first post on the HA forum. I have been using HA for about 6 months now. During this time (the last 3 months) I broke my back when I fell into a uncovered manhole. These 3 months (still at home and in bed) gave me a lot of time to learn HA. I have maybe wiped and reloaded my HAOS running on a PC as a HA Sever, and doing ONLY HA, 20 times.

The reason for this is I wanted to know exactly how to do it. I have learned a hell-of-a-lot about HA, but I still have some issues, hence my post today.

So my ip on my HA is 10.0.0.13. I have a Paradox Alarm system running over mqtt using the PAI integration (available here: https://mybroadband.co.za/forum/threads/paradox-alarm-to-home-assistant-interface-through-pi-zero-w-without-ip150-module.1104251/) and its ip is 10.0.0.12

Now, I have purchased a large 10KVA MPPT Solar system with 12 450w solar panels and 14.5KW batteries that I want to install, as soon as my back allows me to.

Here is the problem. (Please dont crucify me for this)
My HAOS is setup as a Mosquitto broker, using the supervisor Add-on. Then, under integrations I also have MQTT configured with the same username and passwd that I used in the Supervisor Add-on, default port.

If I add the solar system, it is going to have to also run over MQTT. My problem is that I can easily add my alarm panel again (which is now no longer working after I stuffed around with the MQTT under integrations) by just changing the IP to 10.0.0.12 (Alarm system IP). But, then how do I add the solar? I cannot add another integration for MQTT, as I already have one.

And yes I do have MQTT discover on in the configuration.yaml:

mqtt:
discovery: true
discovery_prefix: homeassistant

May I humbly ask anyone to take some time and please, please tell me how do I change what to accommodate multiple instances of MQTT on my HAOS server?

I think the alarm system is running as a MQTT broker (server), should I change it? Where does my problem lay?

My Supervisor Add-on page:

My Integrations config:
2
Thank you guys!

I really don’t understand your question.
For mqtt in HA you need 2 things :

  • a working mqtt broker
  • the mqtt integration pointing to your mqtt broker.
    The mqtt broker can be the HA add-on, or any mqtt broker.

Now , if you want to add your Paradox alarm system, you activate mqtt on it and let it use your broker.
If you want to add your solar panels, you activate mqtt and let it use your broker.
If you want to use Zigbee2mqtt, you tell it to use you broker.
If you want to use a Tasmota device, set in mqtt settings your broker.
Etc,etc,etc…

Simply, all systems use the same broker.

The integration needs to be pointing to the IP address of the Home Assistant system. The broker is the server, the devices you use it with - are clients, they connect to the server and send and receive information. The server handles passing messages to the clients who have subscribed for certain topics.

Your alarm system and solar system should (ideally) by automatically discovered, but if that is not possible - then as long as they can be connected to the broker (server) and you know what topics they use, sensors and switches can be created manually in the YAML.

Only if he uses the mosquitto add-on. If you use another broker it should point to the IP address of the broker used. My different HA instances all use the same external broker ( on a standalone Pi)

Same I use an external broker - but he did say that he was using the broker through the supervisor addons page.

According to the description on the supplied link, it is. You will need to choose which one to use, the one on your PAI system, or the HA add-on. You can’t use both.

It’s not. It’s a PiZeroW configured to speak to the Panel over Serial. Running a service that speaks MQTT. But it’s clear from the fields needed in the config:

MQTT_HOST = 'yourmqttbroker' # Hostname or address
MQTT_PORT = 1883 # TCP Port (TLS port if MQTT_TLS_CERT_PATH is set)
MQTT_USERNAME = 'yourmqttbrokerusername' # MQTT Username for authentication
MQTT_PASSWORD = 'yourmqttbrokerpassword' # MQTT Password

It is not running the broker itself, it expects to be connected to a broker.

Guys

I am still not getting this right.

Just to be sure. I need 2 instances

The 1st one is the MQTT Broker (Pictured above) in the Supervisor Add-On,

And the 2nd one is the MQTT Integration found under Integrations. This integration needs to be setup, pointing to the same server (Basically to itself) as also pictured above?

Please help me. The moment I add aditional MQTT stuff my PAI stops working. I ONLY works if my integration MQTT (Found under integrations) Points to my PiZeroW running PAI.

What am I doing wrong?

Nothing. If that MQTT broker works, use it. You only have to let any additional mqtt devices point to that broker too.

@francisp

Thank you buddy. I’ve done that, and it worked. That then confirms my suspicions )I was right!) that my Paradox PAI system is running as a MQTT Server (Broker) and not as a MQTT Client. I want to try and change that. Because of various reasons, 1 being that first of all the Pi Zero W is not very fast, nor reliable. Using the SD card and all.

Thing is, I want to MQTT my new Inverter system as I am going to move Off-Grid, and I need my MQTT Broker to be my HA Server.

I think if I depend on that Pi Zero I am going to be let down.

I have drawn a little picture of what I actually want. I am not sure how I can change my PAI system on the Paradox to become a client and NOT a Broker.

According to the link posted in the OP, there should be a pai.conf file on the pi zero. You have to edit that and change these fields:

MQTT_HOST = 'yourmqttbroker' # Hostname or address
MQTT_PORT = 1883 # TCP Port (TLS port if MQTT_TLS_CERT_PATH is set)
MQTT_USERNAME = 'yourmqttbrokerusername' # MQTT Username for authentication
MQTT_PASSWORD = 'yourmqttbrokerpassword' # MQTT Password

That is correct yes. It does have that file. If I change the IP of MQTT_HOST to my HA Server who is the Broker, it doesnt work anymore.

Did you create the mqtt user and password in the HA mqtt add-on ?

I did yes. It uses the same user and passwd as my HA does.

Just a question, in the “yourmqttbroker” entry, and the same with the user and passwd, should the ‘’ actually be in there? or only the IP withoul the commas?

Something like this :

MQTT_HOST = 192.168.8.13
MQTT_PORT = 1883 # TCP Port (TLS port if MQTT_TLS_CERT_PATH is set)
MQTT_USERNAME = xxx
MQTT_PASSWORD = yyy

if that does not work, try :

MQTT_HOST = 192.168.8.13
MQTT_PORT = 1883 # TCP Port (TLS port if MQTT_TLS_CERT_PATH is set)
MQTT_USERNAME = 'xxx'
MQTT_PASSWORD = 'yyy'