I have a french door with a glass insert out to my patio which has a double cylinder lock (key on both sides). The only solution to automating this kind of lock I could find was the Level Bolt, but I was reluctant to spend $250 for the bolt with the Connect hub.
I’ve also been experimenting with an ESP32 dev board as a BT proxy which I have working but couldn’t find a use for. Then I saw a used Level bolt without the Connect hub on Amazon for $130 which seemed a more reasonable price and would allow me to put my BT proxy board to use.
Here are my experiences with getting the Bolt to work with HA and a BT proxy.
- I did all my setup before installing the Bolt in the door which made it much easier to see what was happening with the Bolt, and if it didn’t work, to return it to Amazon!
- I powered down my BT proxy.
- Installed the Level app on my iPhone and added the Bolt to the Level App. The app said a firmware update was needed so I went ahead and did that. I did NOT add the Bolt to Homekit in the Level app.
- I tested the operation of the Bolt from the Level app and all seemed to be working well.
- Next I turned off Bluetooth on my phone (to make sure the Level app could not talk to the Bolt) and powered up my BT proxy board right next to the Bolt.
- I removed and replaced the battery in the Bolt.
- HA said it had discovered a new Homekit device.
- I added the Homekit device to HA.
- The Homekit integration came up with the following error:
An unhandled error occurred while attempting to pair with this device. This may be a temporary failure or your device may not be supported currently.
However it still allowed me to go ahead and enter the HK code which is printed on the Bolt and in the QuickStart guide. A few seconds after entering the code, HA went back to the screen to enter the code again, so I entered it again. This time it worked and it added a HK device, with three entities:
lock.a208w4ea_lock_mechanism
button.a208w4ea_identify
sensor.a208w4ea_signal_strength (initially disabled)
I was able to successfully lock and unlock the Bolt from HA. I found that the Bolt would react immediately to an HA command if I did not wait too long between commands, but if I waited, then it was a lot slower to react. I also found that even when the Bolt reacted immediately, HA would sometimes show the lock entity in the “locking” or “unlocking” state for about 15 secs before eventually showing “Locked” or “Unlocked”. - My next test was to verify that HA showed the correct state for the lock when I locked and unlocked it manually using the key. I have an HA dashboard near my backdoor, and my main reason for getting the lock was so I could see if the patio door was locked before leaving the house.
To my disappointment I found that when I locked/unlocked the lock manually the HA lock entity did not change state.
Looking at the BT proxy logs I found the following message
[09:43:15][D][esp32_ble_server:164]: BLE Client disconnected
[09:43:15][D][esp32_ble_client:172]: [0] [E0:A3:66:B3:85:3F] ESP_GATTC_DISCONNECT_EVT, reason 19
[09:43:15][D][esp32_ble_client:110]: [0] [] ESP_GATTC_CLOSE_EVT
after 30 seconds. So it seems the Bolt is disconnecting from the BT proxy after 30 seconds of inactivity (to conserve battery I assume).
After searching the HA forums, I found the suggestion that I could use an automation to update the entity every 30 seconds and so keep the connection to the Bolt up:
alias: Patio Lock Update
description: ""
triggers:
- trigger: time_pattern
seconds: /30
conditions: []
actions:
- action: homeassistant.update_entity
metadata: {}
data:
entity_id:
- lock.a208w4ea_lock_mechanism
mode: single
After adding this automation, HA is consistently reflected the correct state of the lock, even when I lock/unlock manually, though the update takes a few seconds. Also the lock seems to be much quicker to react to a command from HA. I don’t know what effect this is going to have on the battery life of the Bolt.
- Since all seemed to be working well, I went ahead and installed the Bolt in the door. I found that the Bolt cylinder was slightly too fat to fit in the existing hole in the door, so I had to dremel out the hole a little bit to get it to slide in.
- Moved my BT proxy to the nearest outlet to the door (about 3 feet away).
So far all is working well.
I can control the Bolt from HA or the Level app. I also exposed the HA lock entity to Amazon Alexa, so I can also control the Bolt from Alexa.
One more thing I found is that if the Bolt cannot operate properly because of an obstruction or something, the HA entity goes into an “Unavailable” state. The best way to get it out of that state is to manually lock and/or unlock the Bolt.