diff --git a/CMakeLists.txt b/CMakeLists.txt index 03386c4..8169027 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,6 @@ include_directories(${PROJECT_NAME} ) set(SRCFILES - Pins.h Config.h CharBuffer.cpp Network.cpp diff --git a/Config.h b/Config.h index 36f828a..d00a64a 100644 --- a/Config.h +++ b/Config.h @@ -1,6 +1,6 @@ #pragma once -#define NUKI_HUB_VERSION "8.22-pre-1" +#define NUKI_HUB_VERSION "8.22" #define MQTT_QOS_LEVEL 1 #define MQTT_CLEAN_SESSIONS false diff --git a/Gpio.cpp b/Gpio.cpp index e3680cc..739c541 100644 --- a/Gpio.cpp +++ b/Gpio.cpp @@ -1,7 +1,6 @@ #include #include "Gpio.h" #include "Arduino.h" -#include "Pins.h" #include "Logger.h" #include "PreferencesKeys.h" #include "RestartReason.h" diff --git a/Network.cpp b/Network.cpp index 4156a88..6457daa 100644 --- a/Network.cpp +++ b/Network.cpp @@ -19,6 +19,12 @@ Network::Network(Preferences *preferences, const String& maintenancePathPrefix, _buffer(buffer), _bufferSize(bufferSize) { + // Remove obsolete W5500 hardware detection configuration + if(_preferences->getInt(preference_network_hardware_gpio) != 0) + { + _preferences->remove(preference_network_hardware_gpio); + } + _inst = this; _hostname = _preferences->getString(preference_hostname); @@ -719,7 +725,7 @@ void Network::publishHASSConfig(char* deviceType, const char* baseTopic, char* n "reset", uidString, "_reset", - "Reset", + "Restart NUKI Hub", name, baseTopic, mqtt_topic_reset, diff --git a/Pins.h b/Pins.h deleted file mode 100644 index e29cf79..0000000 --- a/Pins.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#define TRIGGER_LOCK_PIN 32 -#define TRIGGER_UNLOCK_PIN 33 -#define TRIGGER_UNLATCH_PIN 27 diff --git a/PreferencesKeys.h b/PreferencesKeys.h index 81009e1..cae2429 100644 --- a/PreferencesKeys.h +++ b/PreferencesKeys.h @@ -25,6 +25,7 @@ #define preference_ip_gateway "ipgtw" #define preference_ip_dns_server "dnssrv" #define preference_network_hardware "nwhw" +#define preference_network_hardware_gpio "nwhwdt" // obsolete #define preference_rssi_publish_interval "rssipb" #define preference_hostname "hostname" #define preference_network_timeout "nettmout" @@ -42,7 +43,7 @@ #define preference_cred_user "crdusr" #define preference_cred_password "crdpass" #define preference_publish_authdata "pubauth" -#define preference_gpio_locking_enabled "gpiolck" +#define preference_gpio_locking_enabled "gpiolck" // obsolete #define preference_gpio_configuration "gpiocfg" #define preference_publish_debug_info "pubdbg" #define preference_presence_detection_timeout "prdtimeout" diff --git a/README.md b/README.md index 9b411d2..11facbb 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ As an alternative to Wifi, the following ESP32 modules with wired ethernet are s [M5Stack PoESP32 Unit](https://docs.m5stack.com/en/unit/poesp32)
[LilyGO-T-ETH-POE](https://github.com/Xinyuan-LilyGO/LilyGO-T-ETH-POE)
+
+Note for users upgrading from 8.21 or lower: Please go to "MQTT and Network Configuration" and select +"Wifi only" as the network device (unless you use other network hardware). ## Installation @@ -176,14 +179,27 @@ For example, to add a code: ## GPIO lock control (optional) -The lock can be controlled via GPIO. For security reasons, this has to be enabled in -the configuration portal (check "Enable control via GPIO" in the NUKI configuration -section). The Pins use pullup configuration, so they have to be connected to ground to -trigger the action.

-The Pin configuration is:
-32: Lock
-33: Unlock
-27: Unlatch +The lock can be controlled via GPIO. To enable GPIO control, go the the "GPIO Configuration" page where each GPIO +can be configured for a specific role: + +- Disabled: The GPIO is disabled +- Input: Lock: When connect to Ground, a lock command is sent to the lock +- Input: Unlock: When connect to Ground, an unlock command is sent to the lock +- Input: Unlatch: When connect to Ground, an unlatch command is sent to the lock +- Input: Electric strike actuation: When connect to Ground, an electric strike actuation command is sent to the opener (open door for configured amount of time) +- Input: Activate RTO: When connect to Ground, Ring-to-open is activated (opener) +- Input: Activate CM: When connect to Ground, Continuous mode is activated (opener) +- Input: Deactivate RTO/CM: Disable RTO or CM, depending on which is active +- Output: High when locked: Outputs a high signal when the door is locked +- Output: High when unlocked: Outputs a high signal when the door is unlocked +- Output: High when motor blocked: Outputs a high signal when the motor is blocked (lock) +- Output: High when RTO active: Outputs a high signal when ring-to-open is active (opener) +- Output: High when CM active: Outputs a high signal when continuous mode is active (opener) +- Output: High when RTO or CM active: Outputs a high signal when either ring-to-open or continuous mode is active (opener) + +Note: The old setting "Enable control via GPIO" is removed. If you had enabled this setting before upgrading to 8.22, the PINs are automatically configured to be +compatible with the previously hard-coded PINs. + ## Connecting via LAN (Optional) diff --git a/main.cpp b/main.cpp index 97dc63b..b59bc68 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,4 @@ #include "Arduino.h" -#include "Pins.h" #include "NukiWrapper.h" #include "NetworkLock.h" #include "WebCfgServer.h" diff --git a/networkDevices/W5500Device.cpp b/networkDevices/W5500Device.cpp index 8c6ab43..615a938 100644 --- a/networkDevices/W5500Device.cpp +++ b/networkDevices/W5500Device.cpp @@ -1,7 +1,6 @@ #include #include #include "W5500Device.h" -#include "../Pins.h" #include "../PreferencesKeys.h" #include "../Logger.h" #include "../MqttTopics.h" diff --git a/webflash/nuki_hub.bin b/webflash/nuki_hub.bin index 2e39fed..4aa5bab 100644 Binary files a/webflash/nuki_hub.bin and b/webflash/nuki_hub.bin differ