I have two RPi’s with installed Solar Assistant (Solar software that sends MQTT data, locally).
I want both of them to be connected to my Home Assistant (also installed locally).
However, after configuring one of the devices in HA MQTT, I can’t add the second one, I’ve got message “Already configured. Only a single configuration possible.”
Please advice?
Can you add some screenshots? Because based on what you write, it sounds like this is a restriction by the integration, addon - not by HA
Yeah an MQTT broker can connect to many devices of the same type. They just need different client IDs.
Here are the screenshots. I have added one entry (the showing 10.142.50.104). I want to add a second entry (another IP address device that broadcasts MQTT).
That IP (10.142.50.104
) is the IP address of your MQTT broker. MQTT brokers can have multiple devices connecting to them.
Not knowing your setup, the broker could be on the same machine as Home Assistant, one of the RPi or on another machine completely. It’s probably best to have one broker in your setup.
- You need to get Home Assistant and both RPis to connect to the same broker. Not sure where it is but all your devices need to speak to the same broker (probably
10.142.50.104
). - You need the RPi to use different MQTT client IDs from each other. This is so the broker knows that this is two different devices connecting to it.
- I think the RPi should also not post to the same topic if you have two different inverters connected they should be published under slightly different topics to ensure that Home Assistant sees them as separate.
Thank you, I can now see that I’ve given false information! Sorry.
-
I have two RPi’s that are logging data and each of them have an MQTT broker installed on them. The two devices are 10.142.50.104 (device1) and 10.142.50.105 (device2)
-
I want Home Assistant (which is installed on separate computer in the same local network) to receive the data from the two devices, for logging and graphs.
Can I connect somehow to the second MQTT broker (10.142.50.105) via HA?
Can you set the pis up to log to the home assistant broker instead?
You only need one central mqtt broker.
Use a MQTT bridge
The software on the RPi’s is not open (SolarAssistant) and I have only Web interface on them, with the following config options:
That you have to add a mosquitto to your HA, and bridge your 2 solarAssistants to your HA mosquitto
In that case a bridge would be better. They describe it in their help:
https://solar-assistant.io/help/integration/mqtt
They describe how to do this here:
https://solar-assistant.io/help/home-assistant/broker-setup
This seems to install another broker on your Home Assistant device and bridge it to the broker on the Solar Assistant. In your case you would need two bridges to each Solar Assistants.
So you would create solar_assistant1.conf
and solar_assistant2.conf
You need also ensure that each Solar Assistant has a unique ID on the settings screen you posted. (the magazin
). Might need a different topic prefix too?
Did you ever get this working? I Have the same situation with a solark and a sungold inverter. I have 2 SAs set up with unique prefixes and unique ids talking to HA via mosquitto. Independently they both work perfectly but when both are reporting at the same time some values from the sungold inverter will get published to the solark values in HA. Really wierd issue.
Is that a joke ? Or chatGPT talking ?
Hi, from my understanding the need for @mariovesel is to get two MQTT clients in HA in order to connect to two different brokers (which is not what MQTT Bridge is actually doing). I know that other home automation systems are able to do this, here below a screenshot from Jeedom where we can see 2 clients, one is connected to my remote broker on HA and one to my local broker on Jeedom, and everything is gathered into Jeedom
I’m currently migrating from Jeedom to HAOS, and it would be more than appreciated that HA could do the same.
Just because Jeedom has no idea how mqtt should be implemented is no reason for Home Assistant to throw standards out the window.
MQTT works by having multiple clients connected to one broker. You can bridge brokers if you have more than one, but ideally you would not have more than one broker.