Imroy / pubsubclient

A client library for the ESP8266 that provides support for MQTT
MIT License
435 stars 115 forks source link

MQTT client triggers GPIO after success connect on ESP8266-01 #66

Closed chefooff closed 7 years ago

chefooff commented 7 years ago

Hi Guys,

My problem is that the MQTT client triggers relay GPIO after successful connection to the MQTT server (mosquitto). You even can reproduce the issue by restarting mosquitto broker.

I found that if I remove "client.subscribe(inTopic);" everything is fine and there aren't any not needed triggers, but in this case I can not take any status from the relay topic.

Please find attached my mqtt client example. esp8266_relay_mqtt.txt

chefooff commented 7 years ago

I found that I made a mistake. The mqtt client that I used is different but with the same name as yours one. https://github.com/knolleary/pubsubclient

I do not have any problem with your client and it works without any not needed triggers.