Temp/Humidity Sensor will not connect to Mosquitto Broker

Hello all! Requesting aid for the following:

Issue: Sensor will not establish connection with MQTT Mosquitto Broker, solid white LED.
Request: Please provide guidance to verify NCD Sensor MQTT settings! I can connect an MQTTX pub/sub client on a separate PC to the broker via static ip over network, but the sensor will not connect to the broker with this same ip.

  1. Sensor: WiFi MQTT Temperature/Humidity Sensor
  2. MQTT Broker: Mosquitto from CLI on a Windows PC
  • configuration file settings:
    • allow_anonymous true
    • listener 1883 0.0.0.0
  1. MQTT Subscriber(s): MQTTX on separate PC, Mosquitto CLI in separate window
  2. MQTT Publisher(s): MQTTX on separate PC, Mosquitto CLI in separate window; NCD Temp/Humidity Sensor
  3. Connection method: A wifi hotspot broadcast from a usb wifi module connected to the broker/host desktop PC.
  4. NCD settings:
  • Wifi configured for local hotspot, DCHP enabled;
    • no changes to SoftAP;
    • no changes to Sensor Settings;
  • MQTT:
    • broker ip - see below
    • port - 1883
    • clientid - TempHumid
    • no user, no pass, TLS disabled, no certs, no key, no settings topic
    • message format: ::Sensor_Data::
    • topic format: ncd_sensor


MQTTX settings


NCD settings

I have setup a mosquitto MQTT broker, successfully published, subscribed and read topics from MQTTX and CLI. The desktop running the broker is broadcasting a wifi hotspot. MQTTX is deployed on a separate PC, connected via wifi, & had the broker desktop’s static ip address as the MQTT host address. The NCD sensor is set to the same static ip for the broker address. The NCD sensor successfully connects to the hotspot, but does not connect to the broker using the static IP address of the host desktop.
I have attempted the following configurations for the MQTT address:

  • host_desktop_hotspot_static_ip
  • mqtt://host_desktop_hotspot_static_ip
  • 127.0.0.1

What could I be missing in this setup? Thank you so much in advance!

Can you try running MQTT Explorer here on another computer connected to the computer running Mosquitto/MQTT Broker:

I’m wondering if a firewall on the windows computer is preventing the incoming connection on port 1883. This is why I’m suggesting testing using an MQTT client on a separate computer.

Thank you,
Travis Elliott

This is a good suggestion, but I already completed this troubleshooting by connecting an MQTT client on a separate computer as described above.

I think I found my issue. I had a spare temp/humidity sensor, and set it up this morning. It connected to my broker & began publishing with 0 issues. The only difference I can find between it and my first sensor is the new one is “version 1.0.10,” the first is “version 1.0.0.”

Is there any way I can update the software for my first sensor? Edit: Otherwise, how can I go about resetting or repairing the first sensor?

You can update the firmware as explained in the user guide here:

I would not think there would be any issue related to firmware but I suppose it is worth a shot.

Thank you for the link, and for the help!

Unfortunately, I have run into a new issue after attempting the firmware update on my first sensor.

Note: my first sensor was originally on version 1.0.0.

Steps I took:

  • Downloaded firmware archive, unzipped
  • Connected via SoftAP to sensor
  • Connected to http://192.168.0.1/update
  • Uploaded firmware.bin with “firmware” selected for v1.0.10. Received OTA success message.
  • Sensor rebooted, but my PC could not reestablish connection to its SoftAP network, and its LED stayed flashing white.
  • Pressed CFG button.
  • Able to connect to the SoftAP network.
  • Within the same page http://192.168.0.1/update, clicked back, selected “filesystem” and uploaded the spiffs.bin file.
  • After this completed, the sensor rebooted, but is now unresponsive (It is now not broadcasting SoftAP & its LED is flashing red. Pressing the CFG button does not set it back to configure mode.)

Would you please advise next steps I could take to resolve this? Thank you again!

Found these two posts that seem related… any advice on how to upload spiffs.bin using ESPTool? :sweat_smile:

Try pressing and holding the CFG button to see if it will factory reset first. If that does not work let me know.

Did not work :frowning: I tried:

  • holding for 20+ sec, no change
  • unplugging the unit, pressed & held CFG and plugged it back in. Held for 20+ sec after power on, but no change

What would you advise next?

You can update the firmware over USB. Follow instructions here:

When asked to enter a firmware option enter 23.

Let me know if you have any questions.

Thank you,
Travis Elliott