homieiot / homie-esp8266

💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
http://homieiot.github.io/homie-esp8266
MIT License
1.36k stars 307 forks source link

MQTT not working if more than 4 subscriptions #11

Closed enavarro222 closed 8 years ago

enavarro222 commented 8 years ago

I got Homie.sendProperty that returns false (even if some time msg is sent) and some random MQTT reconnection when I get more than 4 Homie.addSubscription.

It seems to be linked to https://github.com/knolleary/pubsubclient/issues/98

Maybe one should add a mqtt.loop call in Homie.addSubscription ?

marvinroger commented 8 years ago

Yes this is probably the issue. We need to add mqtt.loop() after https://github.com/marvinroger/homie-esp8266/blob/master/src/Homie/Boot/BootNormal.cpp#L99

I will fix tomorrow!

marvinroger commented 8 years ago

Can you try again?

enavarro222 commented 8 years ago

Thanks, I'll test it tonight.

enavarro222 commented 8 years ago

OK you can close it, the fix works. Thanks !

enavarro222 commented 8 years ago

Oh I didn't take care: I can close it myself...