Skip to content

Analyst's Musings

The musings of a tech analyst

Menu
  • Home
  • Travel Experiences
  • That’s Life
  • All things water
  • Politics
  • Religion
  • Tech
  • Privacy Policy
Menu
MQTT

Let me tell you an esp story…

Posted on June 9, 2024 by Analyst

Part of automation involves using the niffty little esp gadgets. So many programming examples to be had and many already written for use. I find these things to be perfect for hacking together relay controls, temperature and humidity sensors, and general equipment control.

Needless to say, I am also somewhat disorganized and seem to loose many of the custom .ino code I have written. But then again, who cares when you can just cut and past from some examples online! And there is the rub…

This week I have been updating code and replacing/combining some of the sensors and controllers. Having once again lost my original code, I quickly took an example from online and used it to make my MQTT broker connections. No issues. The first unit was up and running in no time!

Having experienced success, I deployed another similarly coded project only to find the original one was behaving badly. Having quite a bit of experience with TCP/IP, applications, and all that fun stuff I quickly began to troubleshoot the issue. Can you guess?

Code

After watching the MQ disconnect and reconnect constantly with no seemingly good reason, I finally noticed… “ESPClient”. In my rush to production, neglected to choose an appropriate name for each instance! So now the two devices were fighting to maintain the same MQTT connection name. Duh! Correcting that – all good!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • The Mysteries of Time
  • The Energy Efficient Scam
  • To Be a Rebel
  • Shocking Reality
  • Marketplace

ADSB

Capturing Automatic Dependent Surveillance-Broadcast. Software defined radio to capture real time flight information above your head. Part of the Flightradar24, FlightAware, OpenSky Network

Power Monitoring

If you don't mind giving away your data, there are many home monitoring solutions. None seem to offer the features of the old TED or recently departed IoTawatt. Too bad the useful ones disappear.

Open Source Software

Software with source code that anyone can inspect, modify, and enhance. Control, security, stability. What's not to love about this community supported development software?

©2026 Analyst's Musings | Design: Newspaperly WordPress Theme