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.

LockTargetState sending false via Siri-issued commands, 0 via Home app

See original GitHub issue

Describe The Bug: There seems to be an issue since 1.3.0 related to the value of LockTargetState sent to subscribed devices/plugins depending on whether Homebridge UI / Siri, or the Home app is used. This is affecting smart lock plugins such as https://github.com/ebaauw/homebridge-nb and https://github.com/lukasroegner/homebridge-nuki.

I’ve documented some output at https://github.com/ebaauw/homebridge-nb/issues/26, which shows that unlock commands issued via Homebridge UI or Siri obtain a value of false for the LockTargetState, but when using the Home app, it will receive a uint8 of 0.

The resulting behaviour is that Homebridge UI and Siri responds as if the action succeeded, but the locks will not actually perform their actions.

Expected Behaviour Commands issued via Siri, Homebridge UI, or Home app should all expect to deliver consistent data types. In case this is a bug in Siri / iOS 14, it might be necessary to sanitise / wrap / convert any data you get from HomeKit into the types you expect.

I’ve rolled back to 1.2.5 for now, which correctly sends 0/1 for LockTargetState and allows my locks to function with the above plugins.

Logs

From Siri:

[3/4/2021, 9:55:01 AM] [Nuki] Haustür: Lock Target State changed from 1 to **false**
[3/4/2021, 9:55:02 AM] [Nuki] Haustür: set Lock Target State from **false** to 1

From tapping on the lock (Nuki Opener) in Home:

[3/4/2021, 9:55:05 AM] [Nuki] Haustür: Lock Target State changed from 1 to **0**
[3/4/2021, 9:55:05 AM] [Nuki] Nuki_Bridge_XXXXXXXX: request 49: GET /lockAction?nukiId=XXXXXXXX&deviceType=2&action=3
[3/4/2021, 9:55:10 AM] [Nuki] Nuki_Bridge_XXXXXXXX: request 49: 200 OK

Environment:

  • Node.js Version: v14.16.0
  • NPM Version: v6.14.11
  • Homebridge Version: v1.3.1
  • Operating System: Raspbian
  • Process Supervisor: Systemd

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
oznucommented, Mar 5, 2021
0reactions
Larsn1commented, Mar 6, 2021

Updated to newest beta and Siri is opening the door again instead of closing which was wrong

Read more comments on GitHub >

github_iconTop Results From Across the Web

homebridge-broadlink-rm - npm
Start using homebridge-broadlink-rm in your project by running `npm i ... accessories are automatically added to the Home app (so long as ...
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