diff --git a/include/config.h b/include/config.h index 099658b..f768322 100644 --- a/include/config.h +++ b/include/config.h @@ -11,15 +11,15 @@ // Define other settings according to your needs -// The credentials of your WiFi router has to be set in the file config_secret.h +// The credentials of your WiFi router have to be set in the file config_secret.h #define SERIAL_PRINT 1 // 1 = yes, 0 = no. Select if Serial.print messages are printed -#define TRANSPORT_PROTOCOL 0 // 0 = http, 1 = https - -// not yet implemented -#define WORK_WITH_WATCHDOG 1 // 1 = yes, 0 = no, Watchdog is used (1) or not used (0) +#define TRANSPORT_PROTOCOL 0 // 0 = http, 1 = https + // should be 1 for normal operation and 0 for testing + +#define WORK_WITH_WATCHDOG 0 // 1 = yes, 0 = no, Watchdog is used (1) or not used (0) // should be 1 for normal operation and 0 for testing // not tested if it works #define USE_STATIC_IP 0 // 1 = use static IpAddress, 0 = use DHCP diff --git a/platformio.ini b/platformio.ini index 329c364..8c74078 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,9 +18,6 @@ platform = espressif32 board = esp32dev framework = arduino - - - [env] ; ============================================================ ; Serial configuration @@ -34,8 +31,8 @@ upload_port = COM10 monitor_speed = 115200 monitor_port = COM10 -debug_tool = esp-prog -debug_init_break = tbreak setup +;debug_tool = esp-prog +;debug_init_break = tbreak setup build_flags = ; set your debug output (default=Serial) @@ -52,27 +49,17 @@ lib_extra_dirs = lib/RoSchmi lib - lib_deps = SPI Sinricpro/SinricPro@^2.9.10 - ;/~https://github.com/khoih-prog/WiFiWebServer#v1.4.2 - ;/~https://github.com/khoih-prog/ESPAsync_WiFiManager ;/~https://github.com/khoih-prog/WiFiNINA_Generic@=1.8.13 /~https://github.com/khoih-prog/WiFiNINA_Generic /~https://github.com/khoih-prog/WebSockets_Generic#v2.10.1 /~https://github.com/tzikis/ArduinoMD5/ - ;/~https://github.com/sinricpro/esp8266-esp32-sdk?utm_source=platformio&utm_medium=piohome - - ;/~https://github.com/khoih-prog/NTPClient_Generic - - - - - + lib_ignore = WiFiNINA_Generic WiFi101 diff --git a/src/main.cpp b/src/main.cpp index c749308..c624feb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -108,7 +108,6 @@ std::map devices = uint32_t millisAtLastAction; uint32_t millisBetweenActions = 10000; -//X509Certificate myX509Certificate = baltimore_root_ca; X509Certificate myX509Certificate = myfritzbox_root_ca; #if TRANSPORT_PROTOCOL == 1 @@ -173,8 +172,7 @@ void setup() { Serial.print(BOARD_NAME); Serial.print(F(" with ")); Serial.println(SHIELD_TYPE); - //Serial.println(WIFI_WEBSERVER_VERSION); - + // Wait some time (3000 ms) start = millis(); while ((millis() - start) < 3000) @@ -283,7 +281,7 @@ if (!WiFi.enableSTA(true)) SinricProSwitch& mySwitch = SinricPro[SWITCH_ID_1]; // send powerstate event mySwitch.sendPowerStateEvent(actualSocketState); // send the actual powerState to SinricPro server - Serial.println("State from Fritz!Dect was transmitted to server"); + Serial.println("PowerState from Fritz!Dect was transmitted to server"); } // Set time interval for repeating commands @@ -318,9 +316,7 @@ void loop() delay(10 * 1000); // 10 seconds ESP.restart(); } - } - //String switchname = fritz.getSwitchName(FRITZ_DEVICE_AIN_01); - //Serial.printf("Name of device is: %s", switchname.c_str()); + } } SinricPro.handle(); handleButtonPress();