HomeAssistant(11) - HelloMorningStar/HomeAssistant GitHub Wiki

How to move ha-mqtt to another server?
i've just done the following steps:

1) release old server ip (binding new ip to old server then restart router to release old ip)

2) assign that old ip to a new server (you don't need to change configuration.yaml and homekit configuration etc...)

3) install mosquitto on new server

sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa    
sudo apt-get update   
sudo apt-get install mosquitto  
sudo apt-get install libmosquitto-dev  
sudo apt-get install mosquitto-clients   
sudo service mosquitto status

Open a terminal and issue the given below command to subscribe the topic “mqtt”

mosquitto_sub -h localhost -t "mqtt" -v

Open another terminal and issue the given below command to publish message to the topic “mqtt”

mosquitto_pub -h localhost -t "mqtt" -m "Hello MQTT"

if you get error, you just follow the message "sudo snap ..." install the right client version.

4) last, restart homeassistant and switch off/on sonoff hardware

it's ok for me, mqtt server is smooth changed to a new server.

5) Scan ip

nmap -sP 10.88.0.0/24

⚠️ **GitHub.com Fallback** ⚠️