-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock BLE API #5
Comments
I also think this would be a nice feature and probably shouldn't be closed as the BLE fix isn't available yet. I understand that it's not possible yet, but the issue shouldn't be closed IMO. |
Hey team, any updates on this? |
I saw a post in a live chat with a cofounder of switchbot that said the ble lock api is coming: Here's the op: "Hey. It's Richard here. I am one of the cofounders of Here's the reply that says the lock api is coming: "1. Lock API is definitely on its way. We gotta |
I don't understand. Why was this issue closed even though there is still no documentation on using the switchbot lock via BLE? |
It's listed as open for me? But I believe comments may re open it. Pretty sure GitHub auto closes issues that don't get updates and go stale |
with V1.1 of the API dropping about a week ago and bringing back the lock and unlock capability to the webAPI (which is awesome, thank you very much for that), is there any timetable in regards to this functionality being added to the bleAPI? |
Best way I can find is to message Richard Mou on twitter. He responds quickly |
Looking forward for the BLE API support! |
i‘m not on twitter, could somebody do that please? |
This is Davidson from the dev team. We are working on the BLE API and we will update the BLE API doc hopefully in the next month. I myself will oversee the progress and keep you posted. Thanks a lot for being patient and supportive! You guys are the best! |
This is fantastic news! Out of curiosity, what features will the api include?
Best |
We plan to support these triggers first,
The actions will have to come after. Davidson |
awesome! @Minsheng do you have an estimated timeline for both reading and actions? Asking as our company is deciding which product to choose, so it may be worth to wait, but we need to understand how long. Thank you! |
Please also add the ability to set PIN. This will create a huge use case for vacation homes. |
We have released the broadcast definition for Lock. The pull request is being reviewed atm. |
great job, thank you for your work! |
Just goona buy in advance the lock waiting for this integration to be live asap 😃 |
Happy New Year ;) Any updates? |
@advorsky73 check this repo out: https://github.com/Danielhiversen/pySwitchbot |
@donavanbecker thats for cloud api, how does this help for BLE ??? 🤔 |
@advorsky73 pretty sure this is all BLE: https://github.com/dsypniewski/pySwitchbot/blob/ed46ac93e2c8985037e21f31e4bb7b933e17714f/switchbot/devices/lock.py From this PR: sblibs/pySwitchbot#164 |
@dsypniewski I find myself with a little bit of spare time. Is there anyway that I can help with reverse engineering the keypad functionality? I don't have much experience in this department but if you can send me towards some articles or something I'm eager to learn. |
@slight316 As to sniffing bluetooth traffic I can recommend series of videos mentioned here https://hackaday.com/2021/03/23/a-crash-course-on-sniffing-bluetooth-low-energy/ @donavanbecker I pushed an update to the branch mentioned earlier that adds support for macOS and Windows could you check it out? |
Hello @dsypniewski I'm trying to test the script on my mac, do I have to install the URL handler? because chrome can't found it. |
@KiraPC while running the script it should create an app that handles those authentication URLs and removes it after the script exits. While the script is running you can check in the |
Yes,
I did a little bit of reverse engineering and found.
Anyway it doesn’t want works.
I also tried to pack an app with py2app that listen on url as yours.
It works if I call the app directly from the browser typing switchbot:// and works (I also started a listener for debugging) but not when is cognito to call the app.
Could you help me?
EDIT: after another test (whiteout changing anything) it worked. Anyway you need to fix the creation of the app because like as it now, it doesn't work
|
Sorry @dsypniewski, been busy. sorry for not knowing much about python. Want to learn more about it, but how do I run the script? I have the zip downloaded and I tried to execute it using but then I receive this:
|
@KiraPC Do you have any ideas on how this could be improved? This is my first time working with an app for Mac. @donavanbecker Sorry for the delay but I've also been busy recently - the script is not standalone and needs the pySwitchbot and other libraries installed to work so you need to install the package using pip:
If |
No problems! and thanks @dsypniewski. I just get stuck here and receive this error when opening up the handler
|
@donavanbecker Hmm, this error message is not very helpful but there was one thing that I could think of and I pushed an update, could you check if that fixes your problem? |
This was the same error i had. I pushed here the standalone application to be installed manually. Try it and let me now.
@dsypniewski Check my repository. The code is basically equals to yours, but it is standalone. |
@KiraPC when I run the commands, I get this:
|
Damn! I stared from an old project, and I forget to remove a dependecy. In setup.py file remove the "install_requires" line and check again if it compile. I'm from my smartphone, tomorrow I'll fix on the repo. |
still getting:
No rush, I can wait till tomorrow. |
Mmm, I'll test it on a virtual environment tomorrow. |
@donavanbecker how about changes in my branch I mentioned earlier, does that work for you? |
@donavanbecker fixed it. Should work now! |
Sorry to interrupt your conversation but maybe you can help with this related issue: home-assistant/home-assistant.io#25859 |
Hello @federicotravaini I'm using the switchbot Lock too. It's working fine. I read the 3rd you posted and seems strange. Could you report your system? Are you using a BLE adapter? |
I am running HA in a VM on a Synology NAS DS920+. I also had a switchbot HUB that I powered off and now back on cause didn't impact on the behaviour of the integration. Will provide all the information you need. |
Mmm. What firmware version is installed on the lock? |
Pretty sure it's the latest one, I checked a couple of days ago. Now I not at home and I can't check since it requires BT connection. |
It is not so sure. The firmware is not delivered to all users togethers. If you don't have the v6.5, ask to the support, they will send you it. |
Will check for sure tonight and let you know. Now I am also using the web API to retrieve the door status (via the hub) and they work fine. It's really weird, I hope it's not related to the ESP32... |
I'm using a respberrypi 4pi with a usb doongle CSR and it works fine. |
I have version 6.4 holy moly |
Yes, ask for the V6.5. it should fix the sends update status. Comunque, italiano anche io! 😂 |
Ahah ottimo! When I update I'll let you know if it fixed |
@KiraPC, yours worked. @dsypniewski, yours worked when I used @KiraPC "switchbot.app" in the Applications Folder, but when I deleted that and tried again with the switchbot Url handler it didn't work and got the same error. FYI: I did have to right click and Open the "switchbot.app" before @dsypniewski script would recognize that it is installed. |
Great!. You could think to link the repository and install the macos app externally. |
After a couple of days with V6.5 I can confirm it works way better than before. Still happens sometimes that the device goes offline and I just need to reload the integration. Grazie per la dritta! |
Current Situation
There is no BLE API documentation for the lock API except for the device id
Proposed Change
Add documentation for the Lock BLE API
Additional Context
It is desirable to integrate the lock into other home automation systems.
The text was updated successfully, but these errors were encountered: