Merge branch 'master' into separate-config
This commit is contained in:
48
README.md
48
README.md
@@ -80,7 +80,7 @@ Enable "Register as app" before pairing to allow this. Otherwise the Bridge will
|
||||
## Support
|
||||
|
||||
If you haven't ordered your Nuki product yet, you can support me by using my referrer code when placing your order:<br>
|
||||
REFVSU6HN9HWK<br>
|
||||
REFNW2959GXR7<br>
|
||||
This will also give you a 10% discount on your order.<br>
|
||||
<br>
|
||||
This project is free to use for everyone. However if you feel like donating, you can buy me a coffee at ko-fi.com:<br>
|
||||
@@ -284,6 +284,7 @@ In a browser navigate to the IP address assigned to the ESP32.
|
||||
## Changing Nuki Lock/Opener Configuration
|
||||
|
||||
To change Nuki Lock/Opener settings set the `configuration/action` topic to a JSON formatted value with any of the following settings. Multiple settings can be changed at once. See [Nuki Smart Lock API Basic Config](https://developer.nuki.io/page/nuki-smart-lock-api-2/2/#heading--set-config), [Nuki Smart Lock API Advanced Config](https://developer.nuki.io/page/nuki-smart-lock-api-2/2/#heading--advanced-config), [Nuki Opener API Basic Config](https://developer.nuki.io/page/nuki-opener-api-1/7/#heading--set-config) and [Nuki Opener API Advanced Config](https://developer.nuki.io/page/nuki-opener-api-1/7/#heading--advanced-config) for more information on the available settings.<br>
|
||||
Changing settings has to enabled first in the configuration portal. Check the settings you want to be able to change under "Nuki Lock/Opener Config Control" in "Access Level Configuration" and save the configuration.
|
||||
|
||||
### Nuki Lock Configuration
|
||||
|
||||
@@ -419,13 +420,48 @@ The following mapping between Home Assistant services and Nuki commands is setup
|
||||
NOTE: MQTT Discovery uses retained MQTT messages to store devices configurations. In order to avoid orphan configurations on your broker please disable autodiscovery first if you no longer want to use this software. Retained messages are automatically cleared when unpairing and when changing/disabling autodiscovery topic in MQTT Configuration page.<br>
|
||||
NOTE2: Home Assistant can be setup manually using the [MQTT Lock integration](https://www.home-assistant.io/integrations/lock.mqtt/), but this is not recommended
|
||||
|
||||
## Keypad control (optional)
|
||||
## Keypad control using JSON (optional)
|
||||
|
||||
If a keypad is connected to the lock, keypad codes can be added, updated and removed. This has to enabled first in the configuration portal. Check "Add, modify and delete keypad codes" under "Access Level Configuration" and save the configuration.
|
||||
|
||||
Information about current keypad codes is published as JSON data to the "keypad/json" MQTT topic.<br>
|
||||
This needs to be enabled separately by checking "Publish keypad codes information" under "Access Level Configuration" and saving the configuration.
|
||||
For security reasons, the code itself is not published.
|
||||
|
||||
To change Nuki Lock/Opener keypad settings set the `keypad/actionJson` topic to a JSON formatted value containing the following nodes.
|
||||
|
||||
| Node | Delete | Add | Update | Usage | Possible values |
|
||||
|------------------|----------|----------|----------|------------------------------------------------------------------------------------------|----------------------------------------------------------------|
|
||||
| action | Required | Required | Required | The action to execute | "delete", "add", "update" |
|
||||
| codeId | Required | Not used | Required | The code ID of the existing code to delete or update | Integer |
|
||||
| code | Not used | Required | Required | The code to create or update | 6-digit Integer without zero's |
|
||||
| enabled | Not used | Not used | Optional | Enable or disable the code, enabled if not set | 1 = enabled, 0 = disabled |
|
||||
| name | Not used | Required | Required | The name of the code to create or update | String, max 20 chars |
|
||||
| timeLimited | Not used | Optional | Optional | If this authorization is restricted to access only at certain times, disabled if not set | 1 = enabled, 0 = disabled |
|
||||
| allowedFrom | Not used | Optional | Optional | The start timestamp from which access should be allowed (requires timeLimited = 1) | "YYYY-MM-DD HH:MM:SS" |
|
||||
| allowedUntil | Not used | Optional | Optional | The end timestamp until access should be allowed (requires timeLimited = 1) | "YYYY-MM-DD HH:MM:SS" |
|
||||
| allowedWeekdays | Not used | Optional | Optional | Allowed weekdays on which access should be allowed (requires timeLimited = 1) | Array of days: "mon", "tue", "wed", "thu" , "fri" "sat", "sun" |
|
||||
| allowedFromTime | Not used | Optional | Optional | The start time per day from which access should be allowed (requires timeLimited = 1) | "HH:MM" |
|
||||
| allowedUntilTime | Not used | Optional | Optional | The end time per day until access should be allowed (requires timeLimited = 1) | "HH:MM" |
|
||||
|
||||
Example usage:<br>
|
||||
Examples:
|
||||
- Delete: `{ "action": "delete", "codeId": "1234" }`
|
||||
- Add: `{ "action": "add", "code": "589472", "name": "Test", "timeLimited": "1", "allowedFrom": "2024-04-12 10:00:00", "allowedUntil": "2034-04-12 10:00:00", "allowedWeekdays": [ "wed", "thu", "fri" ], "allowedFromTime": "08:00", "allowedUntilTime": "16:00" }`
|
||||
- Update: `{ "action": "update", "codeId": "1234", "code": "589472", "enabled": "1", "name": "Test", "timeLimited": "1", "allowedFrom": "2024-04-12 10:00:00", "allowedUntil": "2034-04-12 10:00:00", "allowedWeekdays": [ "mon", "tue", "sat", "sun" ], "allowedFromTime": "08:00", "allowedUntilTime": "16:00" }`
|
||||
|
||||
### Result of attempted keypad code changes
|
||||
|
||||
The result of the last configuration change action will be published to the `configuration/commandResultJson` MQTT topic.<br>
|
||||
Possible values are "noPinSet", "keypadControlDisabled", "keypadNotAvailable", "keypadDisabled", "invalidConfig", "invalidJson", "noActionSet", "invalidAction", "noExistingCodeIdSet", "noNameSet", "noValidCodeSet", "noCodeSet", "invalidAllowedFrom", "invalidAllowedUntil", "invalidAllowedFromTime", "invalidAllowedUntilTime", "success", "failed", "timeOut", "working", "notPaired", "error" and "undefined".<br>
|
||||
|
||||
## Keypad control (alternative, optional)
|
||||
|
||||
If a keypad is connected to the lock, keypad codes can be added, updated and removed.
|
||||
This has to enabled first in the configuration portal. Check "Enable keypad control via MQTT" and save the configuration.
|
||||
After enabling keypad control, information about codes is published under "keypad/code_x", x starting from 0 up the number of configured codes.
|
||||
The same data is also published as JSON data to the "keypad/json" MQTT topic.
|
||||
<br>
|
||||
This has to enabled first in the configuration portal. Check "Add, modify and delete keypad codes" under "Access Level Configuration" and save the configuration.
|
||||
|
||||
Information about codes is published under "keypad/code_x", x starting from 0 up the number of configured codes. This needs to be enabled separately by checking "Publish keypad codes information" under "Access Level Configuration" and saving the configuration.
|
||||
|
||||
For security reasons, the code itself is not published. To modify keypad codes, a command
|
||||
structure is setup under keypad/command:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user