this is my config:
Hardware device ID: 18fe34e03c37
• Device ID: homietest
• Name: callbacktest
• Wi-Fi:
◦ SSID: 208
◦ Password not shown
• MQTT:
◦ Host: m2m.eclipse.org
◦ Port: 1883
◦ Base topic: homie/
◦ Auth? no
when it run, i can recieve message from mqtt broker. but i send message "homie/homietest/light" value "on" ,i get nothing from mqtt client.
so i try to run mqtt_esp8266_callback.ino from Adafruit MQTT Library , all thing is ok, i can recieve message.
i use homie 2.0 , anyone can help me !
this is my code:
include
HomieNode lightNode("light", "switch");
bool globalInputHandler(const HomieNode& node, const String& property, const HomieRange& range, const String& value) { Homie.getLogger() << "Received on node " << node.getId() << ": " << property << " = " << value << endl; return true; }
void setup() { Serial.begin(115200); Serial << endl << endl; Homie_setFirmware("global-input-handler", "1.0.0"); Homie.setGlobalInputHandler(globalInputHandler); lightNode.advertise("on").settable(); Homie.setup(); } void loop() { Homie.loop(); }
this is my config: Hardware device ID: 18fe34e03c37 • Device ID: homietest • Name: callbacktest • Wi-Fi: ◦ SSID: 208 ◦ Password not shown • MQTT: ◦ Host: m2m.eclipse.org ◦ Port: 1883 ◦ Base topic: homie/ ◦ Auth? no