testing with different controllers (mqtt brokers)

  • I run mysensors (ms) to an MQTT broker to Home Assistant (HA). My experience with MQTT has been great; it's simple and it's a easy way (using MQTT Explorer) to see the communication between ms and HA. ms has a reasonable way to watch the data flow. HA is another story, steep in necromancy, YAML, double secret persistence files, etc.

    So once I get an HA configuration working, I don't want to mess with it. I have a "production" version of HA running devices and a "lab" version when I'm trying to integrate a new device. When I'm satisfied with how the device works in "the lab", I switch it over to "production".

    Right now, what I do to change the MQTT broker for ms is to run the configure program, then "make" mysgw, just to change the MQTT broker. Is there an easier way, like changing an entry in a file?

  • Mod

    @OldSurferDude use a host name for the broker in the configure command (--my-controller-url-address=). Add the host name to /etc/hosts on the rpi where the gateway is. Start the MySensors gatway.

    When you want to switch brokers, modify /etc/hosts again and restart the MySensors gateway.

Suggested Topics