Please help, CloudMQTT for Owntrack and Mosqitto for Sonoff ESP8266 Switches

Hello, I have set up Cloudmqtt for my family owntracks, it could track my family member location correctly. I 've also set up Mosquito MQTT on raspberry PI for controlling Sonoff ESP8266 switches in Home Assistant, they also work very well too. But when I combine both Cloudmqtt and Mosquito MQTT into Home Assistant in the configuration.yaml as shown below. Home Assistant stops working. I tried to rearrange mqtt: in the configuration.yaml in many ways. Home Assistant stops working in everyway I arranged. But if I run them separately. Home Assistant return to work correctly again. If anyone could see what is wrong in my setup, please kindly suggest or please leave a comment what I have missed, It would be grateful. Thank you very much in advanced.

mqtt:

  • broker: r12.cloudmqtt.com
    port: 18547
    client_id: home-assistant-1
    keepalive: 60
    username: kiratikarnpat
    password: *******
  • broker: 192.168.1.40
    port: 1883
    client_id: home-assistant-2
    keepalive: 60
    username: kiratikarnpat
    password: ******
    protocol: 3.1.1

You can’t have more than one mqtt server in the config.

If using more than one mqtt server try bridging your servers. Ergo your mosquitto server will connect to your cloudmqtt server and subscribe to the specified topics.

There’s some documentation on owntracks about how you do it and even more in the mosquitto documentation.

1 Like

Hello Landrash, Thank you very much for your reply and suggestion. It is very useful to me. I would study the recommended document. Thanks.

1 Like

This thread may also be of help; it’s for another use but gets into setting up the bridge and has a nice chart that shows the topology of the setup. Thank the user (I did!) as he put a lot of time into it to help others.

1 Like

Thanks to you, rpitera. I have finished studying the documentation that Landrash recommended. I started to understand several things very useful about MQTT in Owntrack. Now you kindly suggested the above thread. I think that is what I am looking for. Thanks to you all again. Have a nice weekend.

2 Likes

Hi, how do you do it, can you give me your configuration

Thank you very much, erj855. I could create bridging between my mosquito and cloudmqtt by following this thread MQTT: Working Mosquitto / CloudMQTT Bridge and this thread MQTT Bridge. All the best to you. Thank for this very nice community with many helpful and so kind people.