I'm stumped on this one.
I have an OpenSprinkler3.0 controller that will report to an MQTT broker. I have one RPi4 with homeassistant and Mosquitto broker installed. I have a separate RPiZero with Raspbian and Mosquitto 1.5.7 installed. I have a domain (mqtt.example.com) that directs to my router and port 1883 forwards to 1883 on the RPiZero.
Here's the RPiZero config
pid_file /var/run/mosquitto.pid
listener 1883
protocol mqtt
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
allow_anonymous true
password_file /etc/mosquitto/passwordfile
connection homeassistant
address mqtt.example.com:8883
bridge_cafile /etc/ssl/certs/ISRG_Root_X1.pem
#topic # out 0
#topic # in 0
topic # both 0
remote_username xxxxxx
remote_password xxxxxx
If I use the WAN address (mqtt.example.com:1883) for the RPiZero, Open Sprinkler connects and sends messages to the broker, no problem.
But using the LAN IP address (192.168.1.51:1883), it doesn't work. Here's the weird thing. If I put in the LAN IP for the RPi4 broker running homeassistant (192.168.1.50:1883), it connects to that broker and works fine.
I've tried Android and Windows MQTT clients, and they connect to both brokers fine using WAN and LAN addresses. So for whatever reason, the OpenSprinkler can connect to one RPi using MQTT broker, but not another. Other clients don't have the same issue. Any ideas?
Thanks, Seth
Turns out restarting the router solved the problem. Some other devices were acting odd causing me to reboot. Google WIFI is not my favorite product these days...
Thanks!