Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #42 from bluewalk/develop
Browse files Browse the repository at this point in the history
Build 1.5.3.1
  • Loading branch information
bluewalk committed Dec 22, 2020
2 parents d2df88c + 865721f commit d7010e4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AssemblyVersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.3.0")]
[assembly: AssemblyVersion("1.5.3.1")]
16 changes: 16 additions & 0 deletions Net.Bluewalk.NukiBridge2Mqtt/Logic/NukiBridge2MqttLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ private async void HttpListenAsync()
device.LastKnownState.DoorSensorState = callback.DoorSensorState;
device.LastKnownState.DoorSensorStateName = callback.DoorSensorStateName;
device.LastKnownState.Mode = callback.Mode;
device.LastKnownState.KeypadBatteryCritical = callback.KeypadBatteryCritical;
device.LastKnownState.RingActionState = callback.RingActionState;
device.LastKnownState.RingActionTimestamp = callback.RingActionTimestamp;
device.LastKnownState.Timestamp = DateTimeOffset.Now;

await PublishDeviceStatus(device);
}
Expand Down Expand Up @@ -294,6 +298,18 @@ private async Task PublishDeviceStatus(Device device)

await Publish($"{device.NukiId}/battery-critical", device.LastKnownState?.BatteryCritical.ToString());
await Publish($"{device.NameMqtt}/battery-critical", device.LastKnownState?.BatteryCritical.ToString());

await Publish($"{device.NukiId}/keypad-battery-critical", device.LastKnownState?.KeypadBatteryCritical.ToString());
await Publish($"{device.NameMqtt}/keypad-battery-critical", device.LastKnownState?.KeypadBatteryCritical.ToString());

await Publish($"{device.NukiId}/ring-action-state", device.LastKnownState?.RingActionState.ToString());
await Publish($"{device.NameMqtt}/ring-action-state", device.LastKnownState?.RingActionState.ToString());

await Publish($"{device.NukiId}/timestamp", device.LastKnownState?.Timestamp.ToString());
await Publish($"{device.NameMqtt}/timestamp", device.LastKnownState?.Timestamp.ToString());

await Publish($"{device.NukiId}/ring-action-timestamp", device.LastKnownState?.RingActionTimestamp.ToString());
await Publish($"{device.NameMqtt}/ring-action-timestamp", device.LastKnownState?.RingActionTimestamp.ToString());
}

/// <summary>
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Connects Nuki Bridges to MQTT

## Installation
### Service (.NET 4.7)
### Service (.NET 4.8)
Extract the release build to a folder and run `Net.Bluewalk.NukiBridge2Mqtt.Service.exe --install`, this will install the service. Seconds update [configuration](#configuration).

### Console app (.NET Core)
### Console app (.NET 5)
Copy files to a directory and update [configuration](#configuration). You can optionally create a startup script to always run the console at boot.

### Docker image
Expand Down Expand Up @@ -80,10 +80,14 @@ ___!NOTE: Prepend the root-topic if provided in the config, by default `nukibrid
| reboot | write | `true` to reboot the bridge |
| fw-upgrade | write | `true` to immediately check for firmware updates and install it |
| callbacks | write | `true` to query all registered callbacks and log these to the logfile |
| {deviceId}/device-action `OR` {deviceName}/device-action | write | Performs an action on the device (`Unlock`, `Lock`, `Unlatch`, `LockNGo`, `LockNGoWithUnlatch`) or for the opener (`ActivateRto`, `DeactivateRto`, `ElectricStrikeActuation`, `ActivateContinuousMode`, `DeactivateContinuousMode`) |
| {deviceId}/device-state `OR` {deviceName}/device-state | readonly | Contains the current device state (`Uncalibrated`, `Locked`, `Unlocking`, `Unlocked`, `Locking`, `Unlatched`, `UnlockedLockNGo`, `Unlatching`, `MotorBlocked`, `Undefined`) or for the opener (`Untrained`, `Online`, `RtoActive`, `Open`, `Opening`, `BootRun`, `Undefined` |
| {deviceId}/device-mode `OR` {deviceName}/device-mode | readonly | Contains the current device mode (`DoorMode`, `ContinuousMode`) |
| {deviceId}/battery-critical `OR` {deviceName}/battery-critical | readonly | `True` or `False` if the battery level is critical |
| {deviceId}/device-action `OR` {deviceName}/device-action | write | Performs an action on the device (`Unlock`, `Lock`, `Unlatch`, `LockNGo`, `LockNGoWithUnlatch`) or for the opener (`ActivateRto`, `DeactivateRto`, `ElectricStrikeActuation`, `ActivateContinuousMode`, `DeactivateContinuousMode`) |
| {deviceId}/keypad-battery-critical `OR` {deviceName}/keypad-battery-critical | readonly | `True` or `False` if the keypad battery level is critical |
| {deviceId}/timestamp `OR` {deviceName}/timestamp | readonly | Timestamp of the last callback |
| {deviceId}/ring-action-state `OR` {deviceName}/ring-action-state | readonly | `True` or `False` depending on the action state |
| {deviceId}/ring-action-timestamp `OR` {deviceName}/ring-action-timestamp | readonly | Timestamp of the last ring action |

** Device name is automatically generated based on the actual Lock Name, eg. `Front door` becomes `front-door`

Expand Down

0 comments on commit d7010e4

Please sign in to comment.