OpenWonderLabs / SwitchBotAPI-BLE

SwitchBot BLE open API
105 stars 10 forks source link

Lock Remote BLE API #22

Open RobertClarke64 opened 1 year ago

RobertClarke64 commented 1 year ago

Current Situation

Currently there is a BLE API available for the SwitchBot Lock, though no API for the Remote. The lock doesn't expose which code or fingerprint, etc. was used to unlock a door. I would like a way to query which person (via which code or fingerprint was used) unlocked the door. You can view this information within the SwitchBot app, though there is no way to integrate it with other services.

The main reason for this is I would like to include automations in my Home Assistant instance when someone opens the door. I'd want to check if the door was opened using the remote, or if it was opened manually with a key (or a lock pick). I would like this as a backup for my alarm system deactivation, if the WiFi-based presence detection does not work (i.e. people have their WiFi turned off). If someone used the remote to unlock, I can identify who it is, and deactivate the alarm. However if the remote was not used, it could possibly be an intruder picking the lock, and so I would not deactivate the alarm.

Proposed Change

The SwitchBot Remote should have a BLE API, so that it can be included in various other APIs, such as the python-switchbot API, used for the Home Assistant SwitchBot integration.

Additional Context

No response