question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LockMechanismLastKnownAction additional state

See original GitHub issue

Describe The Bug:

HomeKit defines the characteristic of LockLastKnownAction as:

typedef NS_ENUM(NSInteger, HMCharacteristicValueLockMechanismLastKnownAction) {
    HMCharacteristicValueLockMechanismLastKnownActionSecuredUsingPhysicalMovementInterior = 0,
    HMCharacteristicValueLockMechanismLastKnownActionUnsecuredUsingPhysicalMovementInterior,
    HMCharacteristicValueLockMechanismLastKnownActionSecuredUsingPhysicalMovementExterior,
    HMCharacteristicValueLockMechanismLastKnownActionUnsecuredUsingPhysicalMovementExterior,
    HMCharacteristicValueLockMechanismLastKnownActionSecuredWithKeypad,
    HMCharacteristicValueLockMechanismLastKnownActionUnsecuredWithKeypad,
    HMCharacteristicValueLockMechanismLastKnownActionSecuredRemotely,
    HMCharacteristicValueLockMechanismLastKnownActionUnsecuredRemotely,
    HMCharacteristicValueLockMechanismLastKnownActionSecuredWithAutomaticSecureTimeout,
    HMCharacteristicValueLockMechanismLastKnownActionSecuredUsingPhysicalMovement,
    HMCharacteristicValueLockMechanismLastKnownActionUnsecuredUsingPhysicalMovement,
} API_AVAILABLE(ios(8.0), watchos(2.0), tvos(10.0), macCatalyst(14.0)) API_UNAVAILABLE(macOS);

It seems they added the last two where the lock can be secured/unsecured via a motion sensor.

To Reproduce:

Expected behavior:

Logs:

Screenshots:

Environment:

  • Node.js Version:
  • NPM Version:
  • Operating System: Raspbian / Ubuntu / Debian / Windows / macOS / Docker / other
  • Process Supervisor: Systemd / init.d / pm2 / launchctl / Docker / hb-service / other / none

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Superegcommented, Nov 30, 2020

Changed by mind. Just added two new predefined valid values for LockLastKnownAction: SECURED_PHYSICALLY and UNSECURED_PHYSICALLY.

EDIT: change is included in the latest beta release.

0reactions
ztalbot2000commented, Jun 16, 2021

Hi,

So LockLastKnownAction is an Optional type of the accessory type LockManagement. It is not part of any other accessory. LockLastKnownAction does have the possible values of validValues: “UNSECURED_PHYSICALLY_INTERIOR”, “SECURED_PHYSICALLY_EXTERIOR”, “UNSECURED_PHYSICALLY_EXTERIOR”, “SECURED_BY_KEYPAD”, “UNSECURED_BY_KEYPAD”, “SECURED_REMOTELY”, “UNSECURED_REMOTELY”, “SECURED_BY_AUTO_SECURE_TIMEOUT”, “SECURED_PHYSICALLY”, “UNSECURED_PHYSICALLY”

This device type also has a required characteristic of LockControlPoint of type TLV8 (Array of bytes). I will not be able to help you with this part at all. That is not what your asking though.

I did create an accessory of the type LockManagement in Cmd4.

“accessories”: [ { “type”: “LockManagement”, “Cmd4_Mode”: “Demo”, “category”: “ALARM_SYSTEM”, “name”: “LockManagement”, “Version”: “1.0”, “CurrentDoorState”: 0, “LockLastKnownAction”: “SECURED_PHYSICALLY” } ]

Unfortunately this is what the Home App thought of it

don’t know what Eve would think about the accessory. You would have to try. The fact though that a required characteristic is TLV8 is a big tip off to me that this is something more for a standalone App.

I hope this helps you. Sorry it is not the answer you were probably hoping for.

John

On Wed, Jun 16, 2021 at 7:58 AM John Talbot @.***> wrote:

Hi,

Just to let you know I got your message.

There are just so many characteristics and accessories I’m not always sure right away. I’ll have to create one to test it and let you know.

Bbl, John

On Wed, Jun 16, 2021 at 6:03 AM mgoeller @.***> wrote:

Is this characteristic displayed somewhat in the Home App for a Lock accessory?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/homebridge/HAP-NodeJS/issues/859#issuecomment-862226831, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX6HOPLDUOL2ZFQ3G73TTBZF5ANCNFSM4TZ7QWHQ .

Read more comments on GitHub >

github_iconTop Results From Across the Web

HomeKitADK/HAPCharacteristicTypes.h at master - GitHub
* Current Heating Cooling State. *. * This characteristic describes the current mode of an accessory that supports cooling or heating its environment,....
Read more >
HomeKit in Xamarin.iOS - Microsoft Learn
Discover new HomeKit enabled home automation devices and add them to a database ... To ensure that you app has the latest state...
Read more >
HomeKit Accessory Protocol Specification - PDFCOFFEE.COM
Additional HomeKit Accessory Protocol Requirements . ... Accessory Updates State Number Internally . ... 9.29 Current Humidifier Dehumidifier State .
Read more >
Mono API Manual - Hubwiz.com
Add · Android.Provider.ContactsContract. ... State.TurningOff · AudioUnit.AudioUnitParameterUnit. ... LockMechanismLastKnownAction · Security.SecProtocol.
Read more >
HAP-NodeJS issues and how to fix | GitAnswer
LockMechanismLastKnownAction additional state - HAP-NodeJS · Characteristic.CarbonDioxideLevel not expected on Service.AirQualitySensor - HAP-NodeJS ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found