question

george-m avatar image
george-m asked

Home Assistant and Mutiple Cerbo GXs

Hello. First, I am brand new to Home Assistant. I have 2 Cerbo-S GXs. I have the 1st one running on HA just fine. I am using MQTT and Mosquitto. I am not sure how to tell Mosquitto or File Editor to look for a 2nd Cerbo. Mosquitto has a file that looks like this to link to the cerbo


connection victron

address 192.168.50.123:1883

topic N/# in 0 victron/

topic R/# out 0 victron/


Can I add the 2nd Cerbo-S's address in there somehow. I copied the code from a github post and copied in my Cerbo's Id. I also have the File Editor code for the first Cerbo in it's own file called mqtt.yaml, and included it in the configuration.yaml with the line

mqtt: !include mqtt.yaml

could I call the 2nd Cerbo's mqtt2.yaml and add it's code the same way?


I've been reading about the MODBUS method, but I am not sure on how to make that work yet. I am still looking for info. I would like to have them both read in the same way if possible. I'm sure it is simply a way of entering in the address of the 2nd Cerbo, telling Mosquitto to look for it, and having the code in File Editor. I have tried many combinations but haven't figured it out by accident. I can link up with the 2nd Cerbo with MQTT Explorer. Any help is greatly appreciated.

Windows 10 laptop, Python 3.12.1, Oracle Virtual Box 7.0.14


MQTThome assistant
2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image matt1309 commented ·
Hi @George_M


The second cerbo will have a different internal ip address (the 192.168.50.xx:1883) you need to find the xx. either use a network scanner (fing on android is my favourite), check your router or check the cerbos network settings to find the internal ip of second cerbo.



0 Likes 0 ·
george-m avatar image george-m matt1309 commented ·

Thank you. I do have that. I just don't know how to tell Mosquitto to look for it.

This bit is in Home Assistant/Share/Mosquitto. Inside is a file "touch victron.conf"

this is that file:

connection victron

address 192.168.50.123:1883

topic N/# in 0 victron/

topic R/# out 0 victron/


to add the 2nd ip address do I change it to

address 192.168.50.123:1883 192.168.234:1883


or address 192.168.50.123 192.168.234:1883


or address 192.168.50.123:1883

address 192.168.50.234:1883


Do I make a 2nd instance of all for but with the 2nd one's ip adress?

I have no idea how or if I can tell it to look for another Cerbo


I am completely new at Home Assistant. I am trying to find documentation about is an Mosquitto that will point me in the right direction. I'm sure it's a very simple change. But it's a brick wall until I find it. I hope this make sense. And thank you again.



0 Likes 0 ·
2 Answers
thibaud-m avatar image
thibaud-m answered ·

Hello,

you can install HACS on your HA instance, then search "Victron", you'll find an integration named Victron GX modbus TCP.

Once installed, setup IP of the second device and all MODBUS data from this one will be added as entity in HA.

If you want to stay on mqtt :

just add a second block like this :

touch victron1.conf :

connection victron1
address 192.168.50.123:1883
topic N/# in 0 victron1/
topic R/# out 0 victron1/


and a new conf file in the same mosquitto directory (don't forget to replace the IP address with the right one ;) )

touch victron2.conf :

connection victron2
address 192.168.50.124:1883
topic N/# in 0 victron2/
topic R/# out 0 victron2/
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

george-m avatar image
george-m answered ·

Wonderful. Thank you! I am using mqtt but I will try that in the HACS also.

Thank you for your help!

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Additional resources still need to be added for this topic

Victron MQTT readme