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 308 forks source link

Node doesn't receive MQTT messages #152

Closed eirinnm closed 8 years ago

eirinnm commented 8 years ago

I'm using v2.0.0 on Wemos D1, just trying to get Homie working with the readme code example (lightNode). Here's my code on pastebin. The only difference is I'm using an LED instead of a relay and I've added an extra Serial.println line to help with debugging.

The device boots, config.json is read, and my MQTT broker gets the status topics like devices/strip2/$uptime and devices/strip2/light/$properties etc. But if I publish a message to the actual property, devices/strip2/light/on, it isn't received by the node: there's nothing printed on the serial port. Only the regular "Sending uptime..." messages.

Any ideas? Is 2.0.0 unusable? I get no compiler warnings.

eirinnm commented 8 years ago

Problem solved: the actual topic for changing the value should be /devices/strip2/light/on/set. I see that's in the Homie readme rather than in Homie-esp8266.

marvinroger commented 8 years ago

That's why it's marked as a requirement to understand the convention. :)