diff --git a/vesper/src/Communication/CommandHandler/CommandHandler.cpp b/vesper/src/Communication/CommandHandler/CommandHandler.cpp index 04cb943..fc8b45d 100644 --- a/vesper/src/Communication/CommandHandler/CommandHandler.cpp +++ b/vesper/src/Communication/CommandHandler/CommandHandler.cpp @@ -524,14 +524,14 @@ void CommandHandler::handleSetRtcTimeCommand(JsonVariant contents, const Message // Verify the time was set correctly by reading it back unsigned long verifyTime = _timeKeeper->getTime(); - if (verifyTime > 0 && abs((long)verifyTime - (long)timestamp) < 5) { // Allow 5 second tolerance + if (verifyTime > 0 && abs((long)verifyTime - (long)localTimestamp) < 5) { // Allow 5 second tolerance sendSuccessResponse("set_rtc_time", "RTC time and timezone updated successfully", context); LOG_INFO("RTC time set with timezone: UTC %lu + %ld = local %lu", timestamp, totalOffset, localTimestamp); } else { sendErrorResponse("set_rtc_time", "Failed to verify RTC time was set correctly", context); - LOG_ERROR("RTC time verification failed - expected: %lu, got: %lu", timestamp, verifyTime); + LOG_ERROR("RTC time verification failed - expected: %lu, got: %lu", localTimestamp, verifyTime); } } else { // Legacy method: Use device's existing timezone config diff --git a/vesper/src/ConfigManager/ConfigManager.cpp b/vesper/src/ConfigManager/ConfigManager.cpp index b1892b3..a5ed716 100644 --- a/vesper/src/ConfigManager/ConfigManager.cpp +++ b/vesper/src/ConfigManager/ConfigManager.cpp @@ -529,13 +529,19 @@ void ConfigManager::updateClockAlerts(JsonVariant doc) { clockConfig.alertRingInterval = doc["alertRingInterval"].as(); } if (doc.containsKey("hourBell")) { - clockConfig.hourBell = doc["hourBell"].as(); + uint8_t bellNum = doc["hourBell"].as(); + // Convert from 1-based (API) to 0-based (internal), or keep 255 (disabled) + clockConfig.hourBell = (bellNum == 255) ? 255 : bellNum - 1; } if (doc.containsKey("halfBell")) { - clockConfig.halfBell = doc["halfBell"].as(); + uint8_t bellNum = doc["halfBell"].as(); + // Convert from 1-based (API) to 0-based (internal), or keep 255 (disabled) + clockConfig.halfBell = (bellNum == 255) ? 255 : bellNum - 1; } if (doc.containsKey("quarterBell")) { - clockConfig.quarterBell = doc["quarterBell"].as(); + uint8_t bellNum = doc["quarterBell"].as(); + // Convert from 1-based (API) to 0-based (internal), or keep 255 (disabled) + clockConfig.quarterBell = (bellNum == 255) ? 255 : bellNum - 1; } LOG_DEBUG("ConfigManager - Updated Clock alerts"); } @@ -593,7 +599,7 @@ bool ConfigManager::loadClockConfig() { return false; } - StaticJsonDocument<512> doc; + StaticJsonDocument<1024> doc; // Increased size for all settings DeserializationError error = deserializeJson(doc, file); file.close(); @@ -602,12 +608,34 @@ bool ConfigManager::loadClockConfig() { return false; } + // Clock enable/outputs if (doc.containsKey("enabled")) clockConfig.enabled = doc["enabled"].as(); if (doc.containsKey("c1output")) clockConfig.c1output = doc["c1output"].as(); if (doc.containsKey("c2output")) clockConfig.c2output = doc["c2output"].as(); if (doc.containsKey("pulseDuration")) clockConfig.pulseDuration = doc["pulseDuration"].as(); if (doc.containsKey("pauseDuration")) clockConfig.pauseDuration = doc["pauseDuration"].as(); + // Alert settings + if (doc.containsKey("alertType")) clockConfig.alertType = doc["alertType"].as(); + if (doc.containsKey("alertRingInterval")) clockConfig.alertRingInterval = doc["alertRingInterval"].as(); + if (doc.containsKey("hourBell")) clockConfig.hourBell = doc["hourBell"].as(); + if (doc.containsKey("halfBell")) clockConfig.halfBell = doc["halfBell"].as(); + if (doc.containsKey("quarterBell")) clockConfig.quarterBell = doc["quarterBell"].as(); + + // Backlight settings + if (doc.containsKey("backlight")) clockConfig.backlight = doc["backlight"].as(); + if (doc.containsKey("backlightOutput")) clockConfig.backlightOutput = doc["backlightOutput"].as(); + if (doc.containsKey("backlightOnTime")) clockConfig.backlightOnTime = doc["backlightOnTime"].as(); + if (doc.containsKey("backlightOffTime")) clockConfig.backlightOffTime = doc["backlightOffTime"].as(); + + // Silence period settings + if (doc.containsKey("daytimeSilenceEnabled")) clockConfig.daytimeSilenceEnabled = doc["daytimeSilenceEnabled"].as(); + if (doc.containsKey("daytimeSilenceOnTime")) clockConfig.daytimeSilenceOnTime = doc["daytimeSilenceOnTime"].as(); + if (doc.containsKey("daytimeSilenceOffTime")) clockConfig.daytimeSilenceOffTime = doc["daytimeSilenceOffTime"].as(); + if (doc.containsKey("nighttimeSilenceEnabled")) clockConfig.nighttimeSilenceEnabled = doc["nighttimeSilenceEnabled"].as(); + if (doc.containsKey("nighttimeSilenceOnTime")) clockConfig.nighttimeSilenceOnTime = doc["nighttimeSilenceOnTime"].as(); + if (doc.containsKey("nighttimeSilenceOffTime")) clockConfig.nighttimeSilenceOffTime = doc["nighttimeSilenceOffTime"].as(); + LOG_DEBUG("ConfigManager - Clock config loaded"); return true; } @@ -615,14 +643,37 @@ bool ConfigManager::loadClockConfig() { bool ConfigManager::saveClockConfig() { if (!ensureSDCard()) return false; - StaticJsonDocument<512> doc; + StaticJsonDocument<1024> doc; // Increased size for all settings + + // Clock enable/outputs doc["enabled"] = clockConfig.enabled; doc["c1output"] = clockConfig.c1output; doc["c2output"] = clockConfig.c2output; doc["pulseDuration"] = clockConfig.pulseDuration; doc["pauseDuration"] = clockConfig.pauseDuration; - char buffer[512]; + // Alert settings + doc["alertType"] = clockConfig.alertType; + doc["alertRingInterval"] = clockConfig.alertRingInterval; + doc["hourBell"] = clockConfig.hourBell; + doc["halfBell"] = clockConfig.halfBell; + doc["quarterBell"] = clockConfig.quarterBell; + + // Backlight settings + doc["backlight"] = clockConfig.backlight; + doc["backlightOutput"] = clockConfig.backlightOutput; + doc["backlightOnTime"] = clockConfig.backlightOnTime; + doc["backlightOffTime"] = clockConfig.backlightOffTime; + + // Silence period settings + doc["daytimeSilenceEnabled"] = clockConfig.daytimeSilenceEnabled; + doc["daytimeSilenceOnTime"] = clockConfig.daytimeSilenceOnTime; + doc["daytimeSilenceOffTime"] = clockConfig.daytimeSilenceOffTime; + doc["nighttimeSilenceEnabled"] = clockConfig.nighttimeSilenceEnabled; + doc["nighttimeSilenceOnTime"] = clockConfig.nighttimeSilenceOnTime; + doc["nighttimeSilenceOffTime"] = clockConfig.nighttimeSilenceOffTime; + + char buffer[1024]; size_t len = serializeJson(doc, buffer, sizeof(buffer)); if (len == 0 || len >= sizeof(buffer)) { diff --git a/vesper/src/ConfigManager/ConfigManager.hpp b/vesper/src/ConfigManager/ConfigManager.hpp index 564f2a2..fd4ec2e 100644 --- a/vesper/src/ConfigManager/ConfigManager.hpp +++ b/vesper/src/ConfigManager/ConfigManager.hpp @@ -70,6 +70,8 @@ public: String apPass; // 🔐 AP is Open. No Password uint16_t discoveryPort = 32101; // 📡 Fixed discovery port bool permanentAPMode = false; // 🔘 Permanent AP mode toggle (stored on SD) + String defaultWifiSsid = "BellSystemsInfra"; // 📡 Default WiFi SSID to try on boot + String defaultWifiPsk = "v3sp3r_8998!"; // 🔐 Default WiFi password to try on boot }; /** diff --git a/vesper/src/Networking/Networking.cpp b/vesper/src/Networking/Networking.cpp index 78d10b7..20d641b 100644 --- a/vesper/src/Networking/Networking.cpp +++ b/vesper/src/Networking/Networking.cpp @@ -71,63 +71,97 @@ void Networking::begin() { return; } + // ETHERNET DISABLED - WiFi only mode // Start Ethernet hardware - auto& hwConfig = _configManager.getHardwareConfig(); - ETH.begin(hwConfig.ethPhyType, hwConfig.ethPhyAddr, hwConfig.ethPhyCs, - hwConfig.ethPhyIrq, hwConfig.ethPhyRst, SPI); + // auto& hwConfig = _configManager.getHardwareConfig(); + // ETH.begin(hwConfig.ethPhyType, hwConfig.ethPhyAddr, hwConfig.ethPhyCs, + // hwConfig.ethPhyIrq, hwConfig.ethPhyRst, SPI); - // Start connection sequence - LOG_INFO("Starting network connection sequence..."); - startEthernetConnection(); + // Start connection sequence - Skip Ethernet, go directly to WiFi + LOG_INFO("Starting WiFi connection (Ethernet disabled)..."); + startWiFiConnection(); } void Networking::startEthernetConnection() { - LOG_INFO("Attempting Ethernet connection..."); - setState(NetworkState::CONNECTING_ETHERNET); - - // Check if Ethernet hardware initialization failed - if (!ETH.linkUp()) { - LOG_WARNING("Ethernet hardware not detected or failed to initialize"); - LOG_INFO("Falling back to WiFi immediately"); - startWiFiConnection(); - return; - } - - // Ethernet will auto-connect via events - // Set timeout for Ethernet attempt (5 seconds) - _lastConnectionAttempt = millis(); - - // Start reconnection timer to handle timeout - xTimerStart(_reconnectionTimer, 0); + // ETHERNET DISABLED - Skip to WiFi immediately + LOG_DEBUG("Ethernet connection disabled - falling back to WiFi"); + startWiFiConnection(); + + // Original Ethernet code (DISABLED): + // LOG_INFO("Attempting Ethernet connection..."); + // setState(NetworkState::CONNECTING_ETHERNET); + // + // // Check if Ethernet hardware initialization failed + // if (!ETH.linkUp()) { + // LOG_WARNING("Ethernet hardware not detected or failed to initialize"); + // LOG_INFO("Falling back to WiFi immediately"); + // startWiFiConnection(); + // return; + // } + // + // // Ethernet will auto-connect via events + // // Set timeout for Ethernet attempt (5 seconds) + // _lastConnectionAttempt = millis(); + // + // // Start reconnection timer to handle timeout + // xTimerStart(_reconnectionTimer, 0); } void Networking::startWiFiConnection() { LOG_INFO("Attempting WiFi connection..."); setState(NetworkState::CONNECTING_WIFI); - - if (!hasValidWiFiCredentials()) { - LOG_WARNING("No valid WiFi credentials found"); - if (!_bootSequenceComplete) { - // No credentials during boot - start portal - startWiFiPortal(); - } - return; - } - - // Get and log saved credentials (for debugging) - String savedSSID = _wifiManager->getWiFiSSID(true); - LOG_INFO("Using WiFiManager saved credentials - SSID: %s", savedSSID.c_str()); - + + // ALWAYS try default credentials first (for bundled router deployment) + auto& netConfig = _configManager.getNetworkConfig(); + + LOG_INFO("Using DEFAULT WiFi credentials - SSID: %s", netConfig.defaultWifiSsid.c_str()); + applyNetworkConfig(false); // false = WiFi config WiFi.mode(WIFI_STA); - - // Let WiFiManager handle credentials (uses saved SSID/password) - WiFi.begin(); - + WiFi.begin(netConfig.defaultWifiSsid.c_str(), netConfig.defaultWifiPsk.c_str()); + _lastConnectionAttempt = millis(); - - // Start reconnection timer to handle timeout xTimerStart(_reconnectionTimer, 0); + + // Original WiFiManager fallback code (DISABLED for fixed deployment): + // // First, try default credentials if this is the first boot attempt + // if (!_bootSequenceComplete && !hasValidWiFiCredentials()) { + // LOG_INFO("No saved credentials - trying default WiFi credentials"); + // auto& netConfig = _configManager.getNetworkConfig(); + // + // applyNetworkConfig(false); // false = WiFi config + // WiFi.mode(WIFI_STA); + // WiFi.begin(netConfig.defaultWifiSsid.c_str(), netConfig.defaultWifiPsk.c_str()); + // + // _lastConnectionAttempt = millis(); + // xTimerStart(_reconnectionTimer, 0); + // return; + // } + // + // // Check if we have valid saved credentials + // if (!hasValidWiFiCredentials()) { + // LOG_WARNING("No valid WiFi credentials found"); + // if (!_bootSequenceComplete) { + // // No credentials during boot - start portal + // startWiFiPortal(); + // } + // return; + // } + // + // // Get and log saved credentials (for debugging) + // String savedSSID = _wifiManager->getWiFiSSID(true); + // LOG_INFO("Using WiFiManager saved credentials - SSID: %s", savedSSID.c_str()); + // + // applyNetworkConfig(false); // false = WiFi config + // WiFi.mode(WIFI_STA); + // + // // Let WiFiManager handle credentials (uses saved SSID/password) + // WiFi.begin(); + // + // _lastConnectionAttempt = millis(); + // + // // Start reconnection timer to handle timeout + // xTimerStart(_reconnectionTimer, 0); } void Networking::startWiFiPortal() { @@ -168,31 +202,32 @@ void Networking::handleReconnection() { if (_state == NetworkState::CONNECTED_ETHERNET || _state == NetworkState::CONNECTED_WIFI) { return; // Already connected } - + LOG_DEBUG("Attempting reconnection..."); - + + // ETHERNET DISABLED - Skip Ethernet timeout checks // Check for Ethernet timeout (fall back to WiFi) - if (_state == NetworkState::CONNECTING_ETHERNET) { - unsigned long now = millis(); - if (now - _lastConnectionAttempt > 5000) { // 5 second timeout - LOG_INFO("Ethernet connection timeout - falling back to WiFi"); - startWiFiConnection(); - return; - } - return; // Still waiting for Ethernet - } - + // if (_state == NetworkState::CONNECTING_ETHERNET) { + // unsigned long now = millis(); + // if (now - _lastConnectionAttempt > 5000) { // 5 second timeout + // LOG_INFO("Ethernet connection timeout - falling back to WiFi"); + // startWiFiConnection(); + // return; + // } + // return; // Still waiting for Ethernet + // } + // Check for WiFi timeout if (_state == NetworkState::CONNECTING_WIFI) { unsigned long now = millis(); if (now - _lastConnectionAttempt > 10000) { // 10 second timeout _wifiConnectionFailures++; LOG_WARNING("WiFi connection timeout (failure #%d)", _wifiConnectionFailures); - + // After 3 failed attempts during boot, start portal if (_wifiConnectionFailures >= MAX_WIFI_FAILURES) { LOG_ERROR("Multiple WiFi connection failures - credentials may be invalid"); - + if (!_bootSequenceComplete) { // Boot not complete yet - open portal LOG_INFO("Opening WiFi portal for reconfiguration"); @@ -215,21 +250,16 @@ void Networking::handleReconnection() { } return; // Still waiting for WiFi } - - // State is DISCONNECTED - decide what to try - if (_ethernetCableConnected) { - LOG_INFO("Ethernet cable detected - trying Ethernet"); - startEthernetConnection(); + + // State is DISCONNECTED - WiFi only mode (Ethernet disabled) + LOG_INFO("Disconnected - trying WiFi"); + if (hasValidWiFiCredentials()) { + startWiFiConnection(); + } else if (!_bootSequenceComplete) { + // No credentials during boot - start portal + startWiFiPortal(); } else { - LOG_INFO("No Ethernet - trying WiFi"); - if (hasValidWiFiCredentials()) { - startWiFiConnection(); - } else if (!_bootSequenceComplete) { - // No credentials during boot - start portal - startWiFiPortal(); - } else { - LOG_WARNING("No WiFi credentials and boot sequence complete - waiting"); - } + LOG_WARNING("No WiFi credentials and boot sequence complete - waiting"); } } @@ -243,27 +273,27 @@ bool Networking::isHealthy() const { LOG_DEBUG("Networking: Unhealthy - No active connection"); return false; } - - // Check connection state - if (_state != NetworkState::CONNECTED_ETHERNET && _state != NetworkState::CONNECTED_WIFI) { + + // Check connection state (Ethernet disabled, only check WiFi or AP) + if (_state != NetworkState::CONNECTED_WIFI && _state != NetworkState::AP_MODE_PERMANENT) { LOG_DEBUG("Networking: Unhealthy - Not in connected state"); return false; } - + // Check IP address validity String ip = getLocalIP(); if (ip == "0.0.0.0" || ip.isEmpty()) { LOG_DEBUG("Networking: Unhealthy - Invalid IP address"); return false; } - + // For WiFi connections, check signal strength if (_activeConnection == ConnectionType::WIFI) { if (WiFi.status() != WL_CONNECTED) { LOG_DEBUG("Networking: Unhealthy - WiFi not connected"); return false; } - + // Check signal strength (RSSI should be better than -80 dBm) int32_t rssi = WiFi.RSSI(); if (rssi < -80) { @@ -271,15 +301,16 @@ bool Networking::isHealthy() const { return false; } } - + + // ETHERNET DISABLED - Removed Ethernet link check // For Ethernet connections, check link status - if (_activeConnection == ConnectionType::ETHERNET) { - if (!ETH.linkUp()) { - LOG_DEBUG("Networking: Unhealthy - Ethernet link down"); - return false; - } - } - + // if (_activeConnection == ConnectionType::ETHERNET) { + // if (!ETH.linkUp()) { + // LOG_DEBUG("Networking: Unhealthy - Ethernet link down"); + // return false; + // } + // } + return true; } @@ -305,35 +336,43 @@ void Networking::notifyConnectionChange(bool connected) { } } -// Event handlers +// Event handlers (ETHERNET DISABLED) void Networking::onEthernetConnected() { - LOG_INFO("Ethernet connected successfully"); - setState(NetworkState::CONNECTED_ETHERNET); - setActiveConnection(ConnectionType::ETHERNET); - - // Stop WiFi if it was running - if (WiFi.getMode() != WIFI_OFF) { - WiFi.disconnect(true); - WiFi.mode(WIFI_OFF); - } - - // Stop reconnection timer - xTimerStop(_reconnectionTimer, 0); - - notifyConnectionChange(true); + // ETHERNET DISABLED - This should never be called + LOG_WARNING("Ethernet event received but Ethernet is disabled - ignoring"); + + // Original code (DISABLED): + // LOG_INFO("Ethernet connected successfully"); + // setState(NetworkState::CONNECTED_ETHERNET); + // setActiveConnection(ConnectionType::ETHERNET); + // + // // Stop WiFi if it was running + // if (WiFi.getMode() != WIFI_OFF) { + // WiFi.disconnect(true); + // WiFi.mode(WIFI_OFF); + // } + // + // // Stop reconnection timer + // xTimerStop(_reconnectionTimer, 0); + // + // notifyConnectionChange(true); } void Networking::onEthernetDisconnected() { - LOG_WARNING("Ethernet disconnected"); - - if (_activeConnection == ConnectionType::ETHERNET) { - setState(NetworkState::DISCONNECTED); - setActiveConnection(ConnectionType::NONE); - notifyConnectionChange(false); - - // Start reconnection attempts - xTimerStart(_reconnectionTimer, 0); - } + // ETHERNET DISABLED - This should never be called + LOG_WARNING("Ethernet disconnect event received but Ethernet is disabled - ignoring"); + + // Original code (DISABLED): + // LOG_WARNING("Ethernet disconnected"); + // + // if (_activeConnection == ConnectionType::ETHERNET) { + // setState(NetworkState::DISCONNECTED); + // setActiveConnection(ConnectionType::NONE); + // notifyConnectionChange(false); + // + // // Start reconnection attempts + // xTimerStart(_reconnectionTimer, 0); + // } } void Networking::onWiFiConnected() { @@ -367,35 +406,37 @@ void Networking::onWiFiDisconnected() { } void Networking::onEthernetCableChange(bool connected) { - _ethernetCableConnected = connected; - LOG_INFO("Ethernet cable %s", connected ? "connected" : "disconnected"); - - if (connected && _activeConnection != ConnectionType::ETHERNET) { - // Cable connected and we're not using Ethernet - try to connect - startEthernetConnection(); - } + // ETHERNET DISABLED - Ignore cable events + LOG_DEBUG("Ethernet cable event ignored (Ethernet disabled)"); + + // Original code (DISABLED): + // _ethernetCableConnected = connected; + // LOG_INFO("Ethernet cable %s", connected ? "connected" : "disconnected"); + // + // if (connected && _activeConnection != ConnectionType::ETHERNET) { + // // Cable connected and we're not using Ethernet - try to connect + // startEthernetConnection(); + // } } // Utility methods void Networking::applyNetworkConfig(bool ethernet) { auto& netConfig = _configManager.getNetworkConfig(); - + + // ETHERNET DISABLED - Only apply WiFi config + if (ethernet) { + LOG_WARNING("applyNetworkConfig called with ethernet=true but Ethernet is disabled"); + return; + } + if (netConfig.useStaticIP) { LOG_INFO("Applying static IP configuration"); - if (ethernet) { - ETH.config(netConfig.ip, netConfig.gateway, netConfig.subnet, netConfig.dns1, netConfig.dns2); - } else { - WiFi.config(netConfig.ip, netConfig.gateway, netConfig.subnet, netConfig.dns1, netConfig.dns2); - } + WiFi.config(netConfig.ip, netConfig.gateway, netConfig.subnet, netConfig.dns1, netConfig.dns2); } else { LOG_INFO("Using DHCP configuration"); } - - if (ethernet) { - ETH.setHostname(netConfig.hostname.c_str()); - } else { - WiFi.setHostname(netConfig.hostname.c_str()); - } + + WiFi.setHostname(netConfig.hostname.c_str()); } bool Networking::hasValidWiFiCredentials() { @@ -413,7 +454,9 @@ bool Networking::isConnected() const { String Networking::getLocalIP() const { switch (_activeConnection) { case ConnectionType::ETHERNET: - return ETH.localIP().toString(); + // ETHERNET DISABLED - Should never reach here + LOG_WARNING("getLocalIP called with ETHERNET type but Ethernet is disabled"); + return "0.0.0.0"; case ConnectionType::WIFI: return WiFi.localIP().toString(); case ConnectionType::AP: @@ -426,7 +469,9 @@ String Networking::getLocalIP() const { String Networking::getGateway() const { switch (_activeConnection) { case ConnectionType::ETHERNET: - return ETH.gatewayIP().toString(); + // ETHERNET DISABLED - Should never reach here + LOG_WARNING("getGateway called with ETHERNET type but Ethernet is disabled"); + return "0.0.0.0"; case ConnectionType::WIFI: return WiFi.gatewayIP().toString(); default: @@ -438,16 +483,16 @@ void Networking::forceReconnect() { LOG_INFO("Forcing reconnection..."); setState(NetworkState::RECONNECTING); setActiveConnection(ConnectionType::NONE); - + // Disconnect everything if (WiFi.getMode() != WIFI_OFF) { WiFi.disconnect(true); WiFi.mode(WIFI_OFF); } - - // Restart connection sequence + + // Restart connection sequence - WiFi only (Ethernet disabled) delay(1000); - startEthernetConnection(); + startWiFiConnection(); } // Static callbacks @@ -457,46 +502,30 @@ void Networking::networkEventHandler(arduino_event_id_t event, arduino_event_inf LOG_DEBUG("Network event: %d", event); switch (event) { + // ETHERNET EVENTS DISABLED - Ignored case ARDUINO_EVENT_ETH_START: - LOG_DEBUG("ETH Started"); - break; - case ARDUINO_EVENT_ETH_CONNECTED: - LOG_DEBUG("ETH Cable Connected"); - _instance->onEthernetCableChange(true); - break; - case ARDUINO_EVENT_ETH_GOT_IP: - LOG_INFO("ETH Got IP: %s", ETH.localIP().toString().c_str()); - _instance->applyNetworkConfig(true); - _instance->onEthernetConnected(); - break; - case ARDUINO_EVENT_ETH_DISCONNECTED: - LOG_WARNING("ETH Cable Disconnected"); - _instance->onEthernetCableChange(false); - _instance->onEthernetDisconnected(); - break; - case ARDUINO_EVENT_ETH_STOP: - LOG_INFO("ETH Stopped"); - _instance->onEthernetDisconnected(); + LOG_DEBUG("Ethernet event ignored (Ethernet disabled)"); break; - + + // WiFi events (ACTIVE) case ARDUINO_EVENT_WIFI_STA_GOT_IP: LOG_INFO("WiFi Got IP: %s", WiFi.localIP().toString().c_str()); _instance->onWiFiConnected(); break; - + case ARDUINO_EVENT_WIFI_STA_DISCONNECTED: LOG_WARNING("WiFi Disconnected"); _instance->onWiFiDisconnected(); break; - + case ARDUINO_EVENT_WIFI_STA_CONNECTED: LOG_DEBUG("WiFi STA Connected"); break; - + default: break; } diff --git a/vesper/vesper.ino b/vesper/vesper.ino index ddb7da3..9275ecf 100644 --- a/vesper/vesper.ino +++ b/vesper/vesper.ino @@ -64,19 +64,19 @@ * 👨‍💻 AUTHOR: BellSystems bonamin */ -#define FW_VERSION "137" +#define FW_VERSION "138" /* * ═══════════════════════════════════════════════════════════════════════════════ * 📅 VERSION HISTORY: + * NOTE: Versions are now stored as integers (v1.3 = 130) * ═══════════════════════════════════════════════════════════════════════════════ * v0.1 (100) - Vesper Launch Beta * v1.2 (120) - Added Log Level Configuration via App/MQTT * v1.3 (130) - Added Telemetry Reports to App, Various Playback Fixes * v137 - Made OTA and MQTT delays Async - * ═══════════════════════════════════════════════════════════════════════════════ - * NOTE: Versions are now stored as integers (v1.3 = 130) + * v138 - Removed Ethernet, added default WiFi creds (Mikrotik AP) and fixed various Clock issues * ═══════════════════════════════════════════════════════════════════════════════ */