SwitchBotAPI
SwitchBotAPI copied to clipboard
[Lock] Reveal unlock method in WebHook
Current Situation
Currently when a Lock is locked or unlocked the WebHook sends the following data:
{ "eventType":"changeReport", "eventVersion":"1", "context":{ "deviceType":"WoLock", "deviceMac":"XXXX", "lockState":"LOCKED", "battery":95, "timeOfSample":1678390391311 } }
Proposed Change
Include the method by which the lock was changed - the logs in the app provide more detail such as:
- Frontdoor unlocked manually
- Frontdoor auto-locked
- Frontdoor unlocked - Dan thumb (fingerprint)
It would be incredibly useful to include this data in the web hook JSON - a few examples:
{ "eventType":"changeReport", "eventVersion":"1", "context":{ "deviceType":"WoLock", "deviceMac":"XXXX", "lockState":"UNLOCKED", "changeReason":"Dan thumb (fingerprint)", "battery":95, "timeOfSample":1678390391311 } }
{ "eventType":"changeReport", "eventVersion":"1", "context":{ "deviceType":"WoLock", "deviceMac":"XXXX", "lockState":"LOCKED", "changeReason":"AUTO-LOCKED", "battery":95, "timeOfSample":1678390391311 } }
Additional Context
No response
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.
Please re-open this and consider it for inclusion in a future API update - it would be very useful to many home automation enthusiasts!
I'd like this to be implemented for sure. I live in an apartment and are forced to have the lock that came with my door. As I always unlock my door via the keypad and/or app, so having the ability to receive a webhook that states the unlock method, would allow me to detect when a manual unlock occurs and send myself a silent alarm of sorts, or even sound the alarm.
OOps, seems like I accidently opened a new issue for the same request. I'll keep it open as it's newer, but due to the nature of this issue's age - I have a feeling the chances it'll be implemented are zero to none: https://github.com/OpenWonderLabs/SwitchBotAPI/issues/338