Skip to content

Commit

Permalink
Lib updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Sep 14, 2024
1 parent 4ec7f3e commit e690062
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/MycilaRouter/MycilaRouterOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ 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
mathieucarbou/MycilaSystem @ 3.0.2
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
Expand Down
10 changes: 5 additions & 5 deletions src/init/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions src/init/Events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e690062

Please sign in to comment.