update readme, remove unused battery nodes
This commit is contained in:
@@ -131,12 +131,8 @@ void NetworkOpener::publishKeyTurnerState(const NukiOpener::OpenerState& keyTurn
|
|||||||
|
|
||||||
if(_firstTunerStatePublish || keyTurnerState.criticalBatteryState != lastKeyTurnerState.criticalBatteryState)
|
if(_firstTunerStatePublish || keyTurnerState.criticalBatteryState != lastKeyTurnerState.criticalBatteryState)
|
||||||
{
|
{
|
||||||
uint8_t level = (keyTurnerState.criticalBatteryState & 0b11111100) >> 1;
|
|
||||||
bool critical = (keyTurnerState.criticalBatteryState & 0b00000001) > 0;
|
bool critical = (keyTurnerState.criticalBatteryState & 0b00000001) > 0;
|
||||||
bool charging = (keyTurnerState.criticalBatteryState & 0b00000010) > 0;
|
|
||||||
publishInt(mqtt_topic_battery_level, level); // percent
|
|
||||||
publishBool(mqtt_topic_battery_critical, critical);
|
publishBool(mqtt_topic_battery_critical, critical);
|
||||||
publishBool(mqtt_topic_battery_charging, charging);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_firstTunerStatePublish = false;
|
_firstTunerStatePublish = false;
|
||||||
@@ -156,7 +152,6 @@ void NetworkOpener::publishCommandResult(const char *resultStr)
|
|||||||
void NetworkOpener::publishBatteryReport(const NukiOpener::BatteryReport& batteryReport)
|
void NetworkOpener::publishBatteryReport(const NukiOpener::BatteryReport& batteryReport)
|
||||||
{
|
{
|
||||||
publishFloat(mqtt_topic_battery_voltage, (float)batteryReport.batteryVoltage / 1000.0);
|
publishFloat(mqtt_topic_battery_voltage, (float)batteryReport.batteryVoltage / 1000.0);
|
||||||
publishInt(mqtt_topic_battery_drain, batteryReport.batteryDrain); // milliwatt seconds
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkOpener::publishConfig(const NukiOpener::Config &config)
|
void NetworkOpener::publishConfig(const NukiOpener::Config &config)
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -26,6 +26,8 @@ Just enable pairing mode on the NUKI lock (press button for a few seconds) and p
|
|||||||
|
|
||||||
## MQTT Interface
|
## MQTT Interface
|
||||||
|
|
||||||
|
### Lock
|
||||||
|
|
||||||
- lock/action: Allows to execute lock actions. After receiving the action, the value is set to "ack". Possible actions: unlock, lock, unlatch, lockNgo, lockNgoUnlatch, fullLock, fobAction1, fobAction2, fobAction3
|
- lock/action: Allows to execute lock actions. After receiving the action, the value is set to "ack". Possible actions: unlock, lock, unlatch, lockNgo, lockNgoUnlatch, fullLock, fobAction1, fobAction2, fobAction3
|
||||||
- lock/state: Reports the current lock state as a string. Possible values are: uncalibrated, locked, unlocked, unlatched, unlockedLnga, unlatching, bootRun, motorBlocked
|
- lock/state: Reports the current lock state as a string. Possible values are: uncalibrated, locked, unlocked, unlatched, unlockedLnga, unlatching, bootRun, motorBlocked
|
||||||
- lock/trigger: The trigger of the last action: autoLock, automatic, button, manual, system
|
- lock/trigger: The trigger of the last action: autoLock, automatic, button, manual, system
|
||||||
@@ -35,7 +37,6 @@ Just enable pairing mode on the NUKI lock (press button for a few seconds) and p
|
|||||||
- lock/commandResult: Result of the last action as reported by NUKI library: success, failed, timeOut, working, notPaired, error, undefined
|
- lock/commandResult: Result of the last action as reported by NUKI library: success, failed, timeOut, working, notPaired, error, undefined
|
||||||
- lock/doorSensorState: State of the door sensor: unavailable, deactivated, doorClosed, doorOpened, doorStateUnknown, calibrating
|
- lock/doorSensorState: State of the door sensor: unavailable, deactivated, doorClosed, doorOpened, doorStateUnknown, calibrating
|
||||||
|
|
||||||
- battery/voltage: Reports the current battery voltage in Volts.
|
|
||||||
- battery/level: Battery level in percent
|
- battery/level: Battery level in percent
|
||||||
- battery/critical: 1 if battery level is critical, otherwise 0
|
- battery/critical: 1 if battery level is critical, otherwise 0
|
||||||
- battery/charging: 1 if charging, otherwise 0
|
- battery/charging: 1 if charging, otherwise 0
|
||||||
@@ -43,6 +44,21 @@ Just enable pairing mode on the NUKI lock (press button for a few seconds) and p
|
|||||||
- battery/drain: The drain of the last lock action in Milliwattseconds (mWs)
|
- battery/drain: The drain of the last lock action in Milliwattseconds (mWs)
|
||||||
- battery/maxTurnCurrent: The highest current of the turn motor during the last lock action (A)
|
- battery/maxTurnCurrent: The highest current of the turn motor during the last lock action (A)
|
||||||
|
|
||||||
|
### Opener
|
||||||
|
|
||||||
|
- lock/action: Allows to execute lock actions. After receiving the action, the value is set to "ack". Possible actions: activateRTO, deactivateRTO, electricStrikeActuation, activateCM, deactivateCM, fobAction1, fobAction2, fobAction3
|
||||||
|
- lock/state: Reports the current lock state as a string. Possible values are: locked, RTOactive, open, opening, uncalibrated
|
||||||
|
- lock/trigger: The trigger of the last action: autoLock, automatic, button, manual, system
|
||||||
|
- lock/completionStatus: Status of the last action as reported by NUKI lock (needs bluetooth connection): success, motorBlocked, canceled, tooRecent, busy, lowMotorVoltage, clutchFailure, motorPowerFailure, incompleteFailure, invalidCode, otherError, unknown
|
||||||
|
- lock/authorizationId: If enabled in the web interface, this node returns the authorization id of the last lock action
|
||||||
|
- lock/authorizationName: If enabled in the web interface, this node returns the authorization name of the last lock action
|
||||||
|
- lock/commandResult: Result of the last action as reported by NUKI library: success, failed, timeOut, working, notPaired, error, undefined
|
||||||
|
- lock/doorSensorState: State of the door sensor: unavailable, deactivated, doorClosed, doorOpened, doorStateUnknown, calibrating
|
||||||
|
|
||||||
|
- battery/voltage: Reports the current battery voltage in Volts.
|
||||||
|
- battery/critical: 1 if battery level is critical, otherwise 0
|
||||||
|
|
||||||
|
### Misc
|
||||||
- presence/devices: List of detected bluetooth devices as CSV. Can be used for presence detection
|
- presence/devices: List of detected bluetooth devices as CSV. Can be used for presence detection
|
||||||
|
|
||||||
## Connecting via LAN (Optional)
|
## Connecting via LAN (Optional)
|
||||||
|
|||||||
Reference in New Issue
Block a user