Skip to content

Commit

Permalink
Version bump to 8.22, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
technyon committed Apr 8, 2023
1 parent c6f8d49 commit c34eeb1
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 20 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ include_directories(${PROJECT_NAME}
)

set(SRCFILES
Pins.h
Config.h
CharBuffer.cpp
Network.cpp
Expand Down
2 changes: 1 addition & 1 deletion Config.h
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion Gpio.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <esp32-hal.h>
#include "Gpio.h"
#include "Arduino.h"
#include "Pins.h"
#include "Logger.h"
#include "PreferencesKeys.h"
#include "RestartReason.h"
Expand Down
8 changes: 7 additions & 1 deletion Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand Down
5 changes: 0 additions & 5 deletions Pins.h

This file was deleted.

3 changes: 2 additions & 1 deletion PreferencesKeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)<br>
[LilyGO-T-ETH-POE](https://github.com/Xinyuan-LilyGO/LilyGO-T-ETH-POE)<br>

<br>
<b>Note for users upgrading from 8.21 or lower:</b> Please go to "MQTT and Network Configuration" and select
"Wifi only" as the network device (unless you use other network hardware).

## Installation

Expand Down Expand Up @@ -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.<br><br>
The Pin configuration is:<br>
32: Lock<br>
33: Unlock<br>
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)

Expand Down
1 change: 0 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "Arduino.h"
#include "Pins.h"
#include "NukiWrapper.h"
#include "NetworkLock.h"
#include "WebCfgServer.h"
Expand Down
1 change: 0 additions & 1 deletion networkDevices/W5500Device.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <Arduino.h>
#include <WiFi.h>
#include "W5500Device.h"
#include "../Pins.h"
#include "../PreferencesKeys.h"
#include "../Logger.h"
#include "../MqttTopics.h"
Expand Down
Binary file modified webflash/nuki_hub.bin
Binary file not shown.

0 comments on commit c34eeb1

Please sign in to comment.