diff --git a/lib/MycilaRouter/MycilaRouterOutput.cpp b/lib/MycilaRouter/MycilaRouterOutput.cpp index b035487e..30b69729 100644 --- a/lib/MycilaRouter/MycilaRouterOutput.cpp +++ b/lib/MycilaRouter/MycilaRouterOutput.cpp @@ -230,7 +230,7 @@ void Mycila::RouterOutput::applyAutoBypass() { } } - const int inRange = Time::timeInRange(timeInfo, config.autoStartTime, config.autoStopTime); + const int inRange = Time::timeInRange(timeInfo, config.autoStartTime.c_str(), config.autoStopTime.c_str()); if (inRange == -1) { if (_autoBypassEnabled) { LOGW(TAG, "Time range %s to %s is invalid: stopping Auto Bypass '%s'", config.autoStartTime.c_str(), config.autoStopTime.c_str(), _name); diff --git a/platformio.ini b/platformio.ini index 014dbc46..7ff9f8ec 100644 --- a/platformio.ini +++ b/platformio.ini @@ -62,13 +62,13 @@ lib_deps = mathieucarbou/ESPAsyncWebServer @ 3.2.4 mathieucarbou/MycilaConfig @ 3.0.1 mathieucarbou/MycilaDS18 @ 4.1.0 - mathieucarbou/MycilaESPConnect @ 5.0.3 + mathieucarbou/MycilaESPConnect @ 6.0.0 mathieucarbou/MycilaEasyDisplay @ 3.0.1 - mathieucarbou/MycilaHADiscovery @ 2.2.2 + mathieucarbou/MycilaHADiscovery @ 3.0.0 mathieucarbou/MycilaJSY @ 9.1.7 mathieucarbou/MycilaLogger @ 3.2.0 - mathieucarbou/MycilaMQTT @ 4.2.1 - mathieucarbou/MycilaNTP @ 4.0.1 + mathieucarbou/MycilaMQTT @ 4.2.2 + mathieucarbou/MycilaNTP @ 5.0.0 mathieucarbou/MycilaPulseAnalyzer @ 1.0.2 mathieucarbou/MycilaPZEM004Tv3 @ 4.0.7 mathieucarbou/MycilaRelay @ 4.0.1 @@ -76,7 +76,7 @@ lib_deps = mathieucarbou/MycilaTaskManager @ 3.1.2 mathieucarbou/MycilaTaskMonitor @ 3.0.1 mathieucarbou/MycilaTrafficLight @ 1.0.0 - mathieucarbou/MycilaUtilities @ 1.3.7 + mathieucarbou/MycilaUtilities @ 2.0.0 build_flags = ; Stack sizes diff --git a/src/init/Config.cpp b/src/init/Config.cpp index cd6bf6a5..7094e147 100644 --- a/src/init/Config.cpp +++ b/src/init/Config.cpp @@ -97,12 +97,12 @@ Mycila::Task initConfigTask("Init Config", [](void* params) { pidController.setOutputLimits(config.get(KEY_PID_OUT_MIN).toFloat(), config.get(KEY_PID_OUT_MAX).toFloat()); // NTP - Mycila::NTP.setTimeZone(config.get(KEY_NTP_TIMEZONE)); + Mycila::NTP.setTimeZone(config.get(KEY_NTP_TIMEZONE).c_str()); // Home Assistant Discovery - haDiscovery.setDiscoveryTopic(config.get(KEY_HA_DISCOVERY_TOPIC)); - haDiscovery.setBaseTopic(config.get(KEY_MQTT_TOPIC)); - haDiscovery.setWillTopic(config.get(KEY_MQTT_TOPIC) + YASOLR_MQTT_WILL_TOPIC); + haDiscovery.setDiscoveryTopic(config.get(KEY_HA_DISCOVERY_TOPIC).c_str()); + haDiscovery.setBaseTopic(config.get(KEY_MQTT_TOPIC).c_str()); + haDiscovery.setWillTopic((config.get(KEY_MQTT_TOPIC) + YASOLR_MQTT_WILL_TOPIC).c_str()); haDiscovery.setBufferSise(512); haDiscovery.setDevice({ .id = Mycila::AppInfo.defaultMqttClientId, @@ -190,7 +190,7 @@ Mycila::Task initConfigTask("Init Config", [](void* params) { espConnect.setIPConfig(ipConfig); espConnect.setAutoRestart(true); espConnect.setBlocking(false); - espConnect.begin(Mycila::AppInfo.defaultHostname, Mycila::AppInfo.defaultSSID, config.get(KEY_ADMIN_PASSWORD), {config.get(KEY_WIFI_SSID), config.get(KEY_WIFI_PASSWORD), config.getBool(KEY_ENABLE_AP_MODE)}); + espConnect.begin(Mycila::AppInfo.defaultHostname.c_str(), Mycila::AppInfo.defaultSSID.c_str(), config.get(KEY_ADMIN_PASSWORD).c_str(), {config.get(KEY_WIFI_SSID).c_str(), config.get(KEY_WIFI_PASSWORD).c_str(), config.getBool(KEY_ENABLE_AP_MODE)}); // ZCD + Dimmers zcdTask.forceRun(); diff --git a/src/init/Events.cpp b/src/init/Events.cpp index ad7bb2aa..a1a5ea3a 100644 --- a/src/init/Events.cpp +++ b/src/init/Events.cpp @@ -114,14 +114,14 @@ Mycila::Task initEventsTask("Init Events", [](void* params) { output2.config.reservedExcessPowerRatio = config.get(KEY_OUTPUT2_RESERVED_EXCESS).toFloat() / 100; } else if (key == KEY_NTP_TIMEZONE) { - Mycila::NTP.setTimeZone(config.get(KEY_NTP_TIMEZONE)); + Mycila::NTP.setTimeZone(config.get(KEY_NTP_TIMEZONE).c_str()); } else if (key == KEY_NTP_SERVER) { if (!config.getBool(KEY_ENABLE_AP_MODE)) - Mycila::NTP.sync(config.get(KEY_NTP_SERVER)); + Mycila::NTP.sync(config.get(KEY_NTP_SERVER).c_str()); } else if (key == KEY_HA_DISCOVERY_TOPIC) { - haDiscovery.setDiscoveryTopic(config.get(KEY_HA_DISCOVERY_TOPIC)); + haDiscovery.setDiscoveryTopic(config.get(KEY_HA_DISCOVERY_TOPIC).c_str()); } else if (key == KEY_ENABLE_LIGHTS) { lights.end(); diff --git a/src/tasks/Network.cpp b/src/tasks/Network.cpp index c65e19e1..c5c7f503 100644 --- a/src/tasks/Network.cpp +++ b/src/tasks/Network.cpp @@ -23,7 +23,7 @@ Mycila::Task networkConfigTask("Network UP", Mycila::TaskType::ONCE, [](void* pa if (!config.getBool(KEY_ENABLE_AP_MODE)) { // NTP logger.info(TAG, "Enable NTP"); - Mycila::NTP.sync(config.get(KEY_NTP_SERVER)); + Mycila::NTP.sync(config.get(KEY_NTP_SERVER).c_str()); // mDNS #ifndef ESPCONNECT_NO_MDNS