diff --git a/src/Config.h b/src/Config.h index 43a82f0..d3ea328 100644 --- a/src/Config.h +++ b/src/Config.h @@ -5,8 +5,8 @@ #define NUKI_HUB_VERSION "9.13" #define NUKI_HUB_VERSION_INT (uint32_t)913 #define NUKI_HUB_BUILD "unknownbuildnr" -#define NUKI_HUB_DATE "2025-10-01" -#define NUKI_HUB_DATE "2025-10-01" +#define NUKI_HUB_DATE "2025-10-02" +#define NUKI_HUB_DATE "2025-10-02" #define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest" #define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json" diff --git a/src/Gpio.cpp b/src/Gpio.cpp index 03427fe..26f24f4 100644 --- a/src/Gpio.cpp +++ b/src/Gpio.cpp @@ -179,6 +179,7 @@ void Gpio::setPins() case PinRole::OutputHighRtoOrCmActive: case PinRole::GeneralOutput: case PinRole::OutputHighMqttConnected: + case PinRole::OutputHighNetworkConnected: pinMode(entry.pin, OUTPUT); break; case PinRole::Ethernet: @@ -500,6 +501,8 @@ String Gpio::getRoleDescription(const PinRole& role) const return "Ethernet"; case PinRole::OutputHighMqttConnected: return "Output: High when MQTT connected"; + case PinRole::OutputHighNetworkConnected: + return "Output: High when network connected"; default: return "Unknown"; } @@ -548,6 +551,7 @@ GpioAction Gpio::getGpioAction(const PinRole &role) const case PinRole::OutputHighCmActive: case PinRole::OutputHighRtoOrCmActive: case PinRole::OutputHighMqttConnected: + case PinRole::OutputHighNetworkConnected: default: return GpioAction::None; } diff --git a/src/Gpio.h b/src/Gpio.h index 7eb34e5..f910200 100644 --- a/src/Gpio.h +++ b/src/Gpio.h @@ -29,7 +29,8 @@ enum class PinRole GeneralInputPullDown, GeneralInputPullUp, Ethernet, - OutputHighMqttConnected + OutputHighMqttConnected, + OutputHighNetworkConnected, }; enum class GpioAction @@ -125,6 +126,7 @@ private: PinRole::InputDeactivateRTO, PinRole::InputDeactivateCM, PinRole::OutputHighMqttConnected, + PinRole::OutputHighNetworkConnected, PinRole::OutputHighLocked, PinRole::OutputHighUnlocked, PinRole::OutputHighRtoActive, diff --git a/src/NukiNetwork.cpp b/src/NukiNetwork.cpp index b25ea0d..5f18801 100644 --- a/src/NukiNetwork.cpp +++ b/src/NukiNetwork.cpp @@ -38,6 +38,7 @@ NukiNetwork::NukiNetwork(Preferences *preferences) _inst = this; #ifndef NUKI_HUB_UPDATER _pinsMqttConnected = _gpio->getPinsWithRole(PinRole::OutputHighMqttConnected); + _pinsNetworkConnected = _gpio->getPinsWithRole(PinRole::OutputHighNetworkConnected); #endif setupDevice(); } @@ -682,11 +683,16 @@ bool NukiNetwork::update() void NukiNetwork::updateNetworkStatusLeds() { bool mqttConnected = _device->mqttConnected(); + bool networkConnected = _device->isConnected(); for (uint8_t pin : _pinsMqttConnected) { _gpio->setPinOutput(pin, mqttConnected ? HIGH : LOW); } + for (uint8_t pin : _pinsNetworkConnected) + { + _gpio->setPinOutput(pin, networkConnected ? HIGH : LOW); + } } void NukiNetwork::checkInternetConnectivity() diff --git a/src/NukiNetwork.h b/src/NukiNetwork.h index 1ded0ff..cd257e7 100644 --- a/src/NukiNetwork.h +++ b/src/NukiNetwork.h @@ -176,6 +176,7 @@ private: std::map _gpioTs; std::vector _pinsMqttConnected; + std::vector _pinsNetworkConnected; char* _buffer; const size_t _bufferSize;