esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
422 stars 27 forks source link

Adding BLE support for Eqiva Ble Smart Lock #1175

Open nerdosity opened 3 years ago

nerdosity commented 3 years ago

Describe the problem you have/What new integration you would like Integration for EQ3 HomeMatic smart lock https://www.eq-3.com/products/homematic/detail/bluetooth-smart-lock.html

Please describe your use case for this integration and alternatives you've tried: This is already working, it seems, but it's not ESPHome :) https://github.com/tc-maxx/esp32-keyble/blob/master/src/main.cpp

Additional context This is a good, cheap lock, impossible to integrate in Home assistant. It would be much more useful with a proper integration

h0jeZvgoxFepBQ2C commented 2 years ago

With the new bluetooth proxy support, would it be possible to just forward the equiva bluetooth data to home assistant via proxy?

digaus commented 1 year ago

There is also this repo: https://github.com/mccoy88f/esp32-keyble-ha

Would be nice if this could be added to esphome :)

Then it would be easy to integrate with a grow fingerprint

digaus commented 1 year ago

Since noone has done it yet I am currently implementing an esphome version.

I am already possible to connect and send lock/unlock commands.

Next step is to clean up the code base and implement user registration :)

IMG_3905

nagyrobi commented 1 year ago

Don't forget battery status...

digaus commented 1 year ago

Don't forget battery status...

Only can get info if battery is low :)

image

Got user registration also working 👍🏻

digaus commented 1 year ago

image

HA services working fine :)

selamanse commented 1 year ago

@digaus do you have your working state somewhere checked in? I'd be interested to test it.

digaus commented 1 year ago

@digaus do you have your working state somewhere checked in? I'd be interested to test it.

If you really want to: https://github.com/digaus/esphome-components-eqiva

With service pair you can create a new user_key and user_id

Currently it will be logged only

Also no current lock status passed to HA yet

digaus commented 1 year ago

Also just sneek preview of my custom ESP32-C3 for the grow fingerprint which will be integrated into a doorbell and then directly control the lock :)

IMG_3918

Strakomania commented 11 months ago

Hey guys im very interested in testing the esphome configuration with my equiva Lock. But i am a newby in esphome and dont know how to set this up. Is it just copy and paste? Maybe you have a small instruction for me ? :)

scrivoluce commented 11 months ago

Awesome,thanks for you work! I've just flashed esphome to my first esp32. I'll git it a try and feedback.

Strakomania commented 11 months ago

@scrivoluce i also flashed esphome to my esp32 but dont know whats the next step. Can you tell me how you get it to work?

I would be very thankful

ginko64 commented 11 months ago

I also have the Eqiva lock and am very interested in this project. What I don't understand is how to pass the access credentials contained in the original QRcode to EspHome

digaus commented 11 months ago

@scrivoluce and @Strakomania

https://github.com/digaus/esphome-components-eqiva/blob/main/README.md#initial-pairing

Updated the readme

ginko64 commented 11 months ago

@digaus you wrote in the new readme: "need to scan QR code of the card and copy the result" how can I do this?

thanks for your patience :)

digaus commented 11 months ago

@digaus you wrote in the new readme: "need to scan QR code of the card and copy the result" how can I do this?

thanks for your patience :)

Smartphone? :)

ginko64 commented 11 months ago

@digaus you wrote in the new readme: "need to scan QR code of the card and copy the result" how can I do this? thanks for your patience :)

Smartphone? :)

It was easy :) thank you

Strakomania commented 11 months ago

@ginko64

Can you show me your yaml Code you get to Work? When i copy the Parts from the Readme the Installation will fail

digaus commented 11 months ago

Check the example yaml

ginko64 commented 11 months ago

@ginko64

Can you show me your yaml Code you get to Work? When i copy the Parts from the Readme the Installation will fail

I haven't done it yet, I'm waiting for the esp32 from Amazon. I put yaml file (from readme) in my esphome folder in Home Assistant but I have several errors. For now I try to figure out

Strakomania commented 11 months ago

oh okay. This is also my problem i put the code snippets together and compare it with the "example.yaml" put i get just errors.

digaus commented 11 months ago

Just go to esphome menu and click on add device. Then paste the example yaml

digaus commented 11 months ago

What errors do you specifically get?

Strakomania commented 11 months ago

Just go to esphome menu and click on add device. Then paste the example yaml

okay let me triy it this way at first.

Strakomania commented 11 months ago

What errors do you specifically get?

INFO ESPHome 2023.11.6 INFO Reading configuration /config/esphome/equiva-lock.yaml... INFO Detected timezone 'Europe/Berlin' INFO Generating C++ source... INFO Compiling app... Processing esphome-eqiva-lock (board: esp32dev; framework: espidf; platform: platformio/espressif32@5.4.0)

HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash

digaus commented 11 months ago

Add refresh: 0s below the GitHub url

Strakomania commented 11 months ago

there already was added 0s.

i had to copy and paste the raw code wich i get when i click on the copy button?

digaus commented 11 months ago

Remove the # on that line, otherwise it's only a comment...

Strakomania commented 11 months ago

oh yeah that was stupid , sorry :D

Strakomania commented 11 months ago

so i succeed to flash the Firmware :)

at the end i got this Log:

========================= [SUCCESS] Took 9.15 seconds ========================= INFO Successfully compiled program. INFO Resolving IP address of esphome-eqiva-lock.local ERROR Error resolving IP address of esphome-eqiva-lock.local. Is it connected to WiFi? ERROR (If this error persists, please set a static IP address: https://esphome.io/components/wifi.html#manual-ips) ERROR Error resolving IP address: Error resolving address with mDNS: Did not respond. Maybe the device is offline., [Errno -5] No address associated with hostname

What can i doo?

digaus commented 11 months ago

To what device do you want to flash it?

You have to change the name to the device you want to flash or you have to compile and download the firmware then flash via https://web.esphome.io is USB

That's why you normally do not copy a whole yaml but follow the instructions :)

Strakomania commented 11 months ago

Now i got it!

Addeed a static IP and i had to add the OTA Password. Now it succsessfully flashed tot the esp32 I got 19 entities for my Equiva lock Esp :)

So all in all i flashed the Esp32 over https://web.esphome.io/ an after that i copied the raw code from github. Then i had to change the wifi settings an ad the OTA Password and ad the Passkey i get after flashing.

Then install it.

thank yout for the help :))

Strakomania commented 11 months ago

sorry but i got the next issue

I added my lock and it looks pretty good but i can´t controll ost and i dont see the status.

the Lock Ble State switches every second the state

Log equiva

Lock 2

Lock

Strakomania commented 11 months ago

The BLE State shows Established but everytime i click "aufschließen" the state changes to connect and idle

digaus commented 11 months ago

The BLE State shows Established but everytime i click "aufschließen" the state changes to connect and idle

Have you done the pairing process with the ESP?

The lock needs to beep and then you get user_id and user_key.

Also after pair you should remove the card_key

Maybe it is also good to not spam this issue but better create an issue on my repo :)

Strakomania commented 11 months ago

I think i did something wrong while the pairing. I tried it again step by step with your instruction and i it work. :)

Sorry for spaming im a newbie on gitub so i have to figure out how to behave. Next time will i open a new issue . :)

scrivoluce commented 11 months ago

Kudos @digaus ! I just got the time today to play with it! THIS IS AWESOME! It worked like charm!!! So gratefull for you work!

sobrarbe commented 8 months ago

Hello, @digaus I am really very excited about this project. I have been wanting to put my eqavi lock on home assitnat for a while. but I have a problem. at the time I put the mac in the ESPHome Eqiva Lock. It doesn't connect to me and it keeps finding the mac and it doesn't come out connected. Can you help me to make it work? It is very important to me, thank you for your great work. IMG_20240406_174235