I currently have node-red running on a Raspberry Pi Zero and so far it's been great, but I've been running into some issues connecting to an MQTT broker on my lan. I have Mosquitto v1.6.7 running on a Freebsd jail (hostname: mosquitto) on a server in my home network. A sensor (BME280 on a NodeMCU) is publishing data to this MQTT broker, and I can see the data being published successfully using MQTT Explorer running on a separate PC. For whatever reason, I cannot get the
mqtt in node to connect to this broker. It just hangs with a yellow icon and
connecting. Here are my settings:
I can ping
mosquitto.lan from the RPi running node-red. I can also
ssh into the RPi and subscribe to the messages from the command line i.e.
mosquitto_sub -h mosquitto.lan -t esp/bme280/temperature and it connects successfully and displays the published temperature values. Also, if I run Mosquitto on the RPi, publish sensor data to that instead, and point the
mqtt in node at it, everything seems to work. I can also connect to the test.mosquitto.org test broker from node-red. There is no security on the broker and it is set up to accept anonymous connections.
Does anybody have any suggestions?