Chat freely about anything...

User avatar
#18149 Hi John

Thanks for that.
I am back to using the MQTT client library and I am using Eclipse.
The reason for my question is that lwt did not seem to work because I had not realised how long I had to wait until the lwt topic was published. All working now.
The only issue I have now is that sometimes the ESP shows exception in terminal and reboots but it is extremely rare. I am going to change out the ESP module if it continues.
User avatar
By emzeperx
#53444 Hi,

Apologies if I am not posting into the correct topic, I am new here.

I am working on a wifi control for a heater. I have mosquito and openhab running on a rpi2 (jessey). Cabled clients work with it without any issues.

For the wifi enabled controller I use an Arduino nano, an esp8266 and a relay module. esp and the relay module have their own power supply. Esp is connected to the Arduino using software serial (to have usb serial). For the mqtt connection I use mqqt, not pubsubclient. I have tested both and mqtt seems to be more stable, pubsub client tends to miss messages.

The whole thing works fine while I just read mqtt messages with this wifi enabled controller. As soon as I want to publish anything (room temperature and power consumption), the connection to the mosquito server is lost. The wifi connection is ok, ping shows no packet drops. The mosquito log tells: timeout exceeded, disconnecting. What timeout?

Mosquitto is the latest version (1.4.9), just like the mqtt client (0.16.1, according to Arduino IDE). I get the very same result with pubsubclient, too.

What do you recommend to check/test/change?

Thanks in advance,