Switchbot Lock

Hello, by now the Switchbot Lock is not supported directly via Bluetooth by Home Assistant, since it is new on the market.

Is there a possibility that it is also compatible with Home Assistant? I would like to add it to Home Assistant.

Link of the HA integration:

Switchbot Lock site:

Perhaps this will be more likely to happen with the first-class support for Bluetooth in 2022.8.

Letā€™s hope!

1 Like

Some Switchbot device types are now shown as first-class support, with 2022.8. But not Switchbot Lock. Can integration be added for Switchbot Lock, please.

I think it will dependent on it being added to the Switchbot API first Lock BLE API Ā· Issue #5 Ā· OpenWonderLabs/SwitchBotAPI-BLE (github.com)

Unfortunately this seems to not be possible via the Switchbot API in HA BLE currently (2022.9.x versions). Switchbot do not yet support Homekit either.
So, I voted for this, but I have a feeling we are waiting on Switchbot to allow it.

In case it might help people looking for an alternative way to integrate SwitchBot SMart Lock into HA. This is a link for an AppDaemon app I have written to integrate my smart lock.

2 Likes

Thank you for your development! It works great! Just two things which were not created after the installation so i created them manually.

  • The Path and file to logs/switchbot.log in /config/appdaemon is not automatically created and i got an error in the log for that.
  • The file switchbotlockmanager.py is not automatically created

I know you are writing in the docu to create this file but can this step not automated?

Iā€™ve been working on getting this working locally for a while and have some good news - PR has been merged so the integration should be coming in the next release :partying_face:

4 Likes

This is fantastic news. Thanks @dsypniewski !

Thank you for the local integration! Really cool! I would like to test it. Is there already a docu how it works and is the PR incorporated in the current beta release?

Yes, the PR is in the beta release. For now setup requires using a separate script to obtain locks encryption key, but Iā€™m working on incorporating that part into integration as well.
Here are the current configuration instructions Updated SwitchBot documentation to include details about the lock by dsypniewski Ā· Pull Request #25421 Ā· home-assistant/home-assistant.io Ā· GitHub

1 Like

Cool :+1:
Does it also mean the PR makes it possible to detect the lock via Bluetooth?

Yes, the lock gets auto discovered via Bluetooth

1 Like

I got the key and the current HA beta is installed but the Lock is not yet Auto-Discovered via Bluetooth.
Any idea?

Seems there is some problem with auto-discovery thatā€™s going to be addressed in another update (might not be beta), but you should be able to set-up the lock by going through the ā€œ+ Add integrationā€ button just fine.

1 Like

Awesome! Works straight forward and the lock is integrated and the response time is in my case pretty good.
You mentioned you try to implement the key retrieval into the integration. Do you think this will be part of the release next week?

Itā€™s already merged into the dev branch. Iā€™m not yet so familiar with how things get released here but I think it should go out with the initial 2023.1.0 release as was mentioned here Add option to retrieve SwitchBot Lock encryption key through config flow by dsypniewski Ā· Pull Request #84830 Ā· home-assistant/core Ā· GitHub.

1 Like

Hey there! Hoping you can help me get my lock into HA. Iā€™m on the latest beta release, and have extracted the encryption key and key IDā€¦ However, Iā€™m now stuck. Autodiscover keeps detecting the lock as a Plug Mini, so I canā€™t seem to find where I should input these keys into the switchbot config flow.

How exactly did you get this added to HA?

Thanks so much!

With Beta 3 you should be able to add the lock via config flow. Go to Devices & Services > Add Integration > Switchbot. A dialog should appear asking you to add your username and password from your Switchbot account. No longer necessary to extract the key upfront.

1 Like

@JamieSBenson did you maybe get it working after what @smartmatic added? Iā€™m pretty sure that it would be impossible for the lock to be recognized as a plug but just to be sure does the part of the device name in the parenthesis match up with your locks last 4 characters of the mac address? Iā€™d say itā€™s more likely that this plug is just someones else one close by.