Small tweak to diagnostic message when OTA is started

This commit is contained in:
Gregg 2021-02-17 08:54:29 -06:00
parent edefa1380c
commit 66cd30fa80
2 changed files with 9 additions and 8 deletions

View File

@ -483,14 +483,14 @@ void Span::checkConnect(){
}); });
ArduinoOTA.begin(); ArduinoOTA.begin();
Serial.print("Starting OTA: "); Serial.print("Starting OTA Server: ");
Serial.print(displayName); Serial.print(displayName);
Serial.print(" at "); Serial.print(" at ");
Serial.print(WiFi.localIP()); Serial.print(WiFi.localIP());
Serial.print("\nAuthorization Password: "); Serial.print("\nAuthorization Password: ");
Serial.print(otaAuth?"Enabled\n\n":"DISABLED!\n\n"); Serial.print(otaAuth?"Enabled\n\n":"DISABLED!\n\n");
} else { } else {
Serial.print("\n*** Warning: Can't enable OTA - Partition table used to compile this sketch is not configured for OTA.\n\n"); Serial.print("\n*** Warning: Can't start OTA Server - Partition table used to compile this sketch is not configured for OTA.\n\n");
} }
} }

View File

@ -11,14 +11,14 @@ void setup() {
homeSpan.setLogLevel(1); homeSpan.setLogLevel(1);
// homeSpan.setHostNameSuffix(""); // homeSpan.setHostNameSuffix("");
homeSpan.setPortNum(1200); homeSpan.setPortNum(1201);
homeSpan.setMaxConnections(6); // homeSpan.setMaxConnections(6);
// homeSpan.setQRID("One1"); // homeSpan.setQRID("One1");
// homeSpan.enableOTA(false); homeSpan.enableOTA();
homeSpan.setSketchVersion("Test 1.2.6"); homeSpan.setSketchVersion("Test 1.3.0");
homeSpan.setWifiCallback(wifiEstablished); homeSpan.setWifiCallback(wifiEstablished);
homeSpan.begin(Category::Lighting,"HomeSpanTest"); homeSpan.begin(Category::Lighting,"HomeSpan Lamp Server","homespanlamp");
new SpanAccessory(); // Begin by creating a new Accessory using SpanAccessory(), which takes no arguments new SpanAccessory(); // Begin by creating a new Accessory using SpanAccessory(), which takes no arguments
@ -41,8 +41,9 @@ void setup() {
new Characteristic::On(); new Characteristic::On();
new Characteristic::Brightness(); new Characteristic::Brightness();
new Characteristic::Name("Light 2"); new Characteristic::Name("Light 2");
new Service::Switch(); (new Service::Switch())->setPrimary();
new Characteristic::On(); new Characteristic::On();
new Characteristic::Name("Switch 3");
} // end of setup() } // end of setup()