#include #include //D4 auf ground macht led leuchten #define PIN_LED D4 HomieNode knobNode("blinky", "blinky", "commands"); void setup() { Serial.begin(115200); Serial << endl << endl; pinMode(PIN_LED, OUTPUT); Homie_setFirmware("blinky", "0.1.0"); Homie.setup(); ArduinoOTA.setHostname(Homie.getConfiguration().deviceId); ArduinoOTA.onStart([]() { Homie.getLogger() << "Arduino OTA angefragt" << endl; }); ArduinoOTA.onError([](ota_error_t error) { Serial.printf("Error[%u]: ", error); if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed"); else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed"); else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed"); else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed"); else if (error == OTA_END_ERROR) Serial.println("End Failed"); }); ArduinoOTA.begin(); } long lastmillis = 0; bool stateled = false; void loop() { Homie.loop(); ArduinoOTA.handle(); if ((lastmillis+500)