Open nerdosity opened 3 years ago
With the new bluetooth proxy support, would it be possible to just forward the equiva bluetooth data to home assistant via proxy?
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
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 :)
Don't forget battery status...
Don't forget battery status...
Only can get info if battery is low :)
Got user registration also working 👍🏻
HA services working fine :)
@digaus do you have your working state somewhere checked in? I'd be interested to test it.
@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
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 :)
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 ? :)
Awesome,thanks for you work! I've just flashed esphome to my first esp32. I'll git it a try and feedback.
@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
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
@scrivoluce and @Strakomania
https://github.com/digaus/esphome-components-eqiva/blob/main/README.md#initial-pairing
Updated the readme
@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 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? :)
@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
@ginko64
Can you show me your yaml Code you get to Work? When i copy the Parts from the Readme the Installation will fail
Check the example yaml
@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
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.
Just go to esphome menu and click on add device. Then paste the example yaml
What errors do you specifically get?
Just go to esphome menu and click on add device. Then paste the example yaml
okay let me triy it this way at first.
What errors do you specifically get?
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_i'
^~~~~~~~~~
src/esphome/components/eqiva_key_ble/eqiva_key_ble.cpp:358:7: note: in expansion of macro 'ESP_LOGI'
ESP_LOGI(TAG, "Waiting for connection... (sendingNonce: %s) (remoteSessionNonce: %s) (remoteSessionNonce: %s) (clientStateEstablished: %s)", sendingNonce ? 'true' : 'false', clientState.remote_session_nonce.length() > 0 ? 'true' : 'false', this->state() == espbt::ClientState::ESTABLISHED ? 'true' : 'false');
^~~~
src/esphome/components/eqiva_key_ble/eqiva_key_ble.cpp:358:21: error: format '%s' expects argument of type 'char*', but argument 6 has type 'int' [-Werror=format=]
ESP_LOGI(TAG, "Waiting for connection... (sendingNonce: %s) (remoteSessionNonce: %s) (remoteSessionNonce: %s) (clientStateEstablished: %s)", sendingNonce ? 'true' : 'false', clientState.remote_session_nonce.length() > 0 ? 'true' : 'false', this->state() == espbt::ClientState::ESTABLISHED ? 'true' : 'false');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:72:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_i'
^~~~~~~~~~
src/esphome/components/eqiva_key_ble/eqiva_key_ble.cpp:358:7: note: in expansion of macro 'ESP_LOGI'
ESP_LOGI(TAG, "Waiting for connection... (sendingNonce: %s) (remoteSessionNonce: %s) (remoteSessionNonce: %s) (clientStateEstablished: %s)", sendingNonce ? 'true' : 'false', clientState.remote_session_nonce.length() > 0 ? 'true' : 'false', this->state() == espbt::ClientState::ESTABLISHED ? 'true' : 'false');
^~~~
src/esphome/components/eqiva_key_ble/eqiva_key_ble.cpp:358:21: error: format '%s' expects argument of type 'char*', but argument 7 has type 'int' [-Werror=format=]
ESP_LOGI(TAG, "Waiting for connection... (sendingNonce: %s) (remoteSessionNonce: %s) (remoteSessionNonce: %s) (clientStateEstablished: %s)", sendingNonce ? 'true' : 'false', clientState.remote_session_nonce.length() > 0 ? 'true' : 'false', this->state() == espbt::ClientState::ESTABLISHED ? 'true' : 'false');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:72:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_i'
^~~~~~~~~~
src/esphome/components/eqiva_key_ble/eqiva_key_ble.cpp:358:7: note: in expansion of macro 'ESP_LOGI'
ESP_LOGI(TAG, "Waiting for connection... (sendingNonce: %s) (remoteSessionNonce: %s) (remoteSessionNonce: %s) (clientStateEstablished: %s)", sendingNonce ? 'true' : 'false', clientState.remote_session_nonce.length() > 0 ? 'true' : 'false', this->state() == espbt::ClientState::ESTABLISHED ? 'true' : 'false');
^~~~
src/esphome/components/eqiva_key_ble/eqiva_key_ble.cpp:358:21: error: format '%s' expects a matching 'char*' argument [-Werror=format=]
ESP_LOGI(TAG, "Waiting for connection... (sendingNonce: %s) (remoteSessionNonce: %s) (remoteSessionNonce: %s) (clientStateEstablished: %s)", sendingNonce ? 'true' : 'false', clientState.remote_session_nonce.length() > 0 ? 'true' : 'false', this->state() == espbt::ClientState::ESTABLISHED ? 'true' : 'false');
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/esphome/core/log.h:72:36: note: in definition of macro 'ESPHOME_LOG_FORMAT'
^~~~~~
src/esphome/core/log.h:151:28: note: in expansion of macro 'esph_log_i'
^~~~~~~~~~
src/esphome/components/eqiva_key_ble/eqiva_key_ble.cpp:358:7: note: in expansion of macro 'ESP_LOGI'
ESP_LOGI(TAG, "Waiting for connection... (sendingNonce: %s) (remoteSessionNonce: %s) (remoteSessionNonce: %s) (clientStateEstablished: %s)", sendingNonce ? 'true' : 'false', clientState.remote_session_nonce.length() > 0 ? 'true' : 'false', this->state() == espbt::ClientState::ESTABLISHED ? 'true' : 'false');
^~~~
Compiling .pioenvs/esphome-eqiva-lock/src/esphome/components/wifi/wifi_component_libretiny.o
Compiling .pioenvs/esphome-eqiva-lock/src/esphome/components/wifi/wifi_component_pico_w.o
Compiling .pioenvs/esphome-eqiva-lock/src/esphome/core/application.o
Compiling .pioenvs/esphome-eqiva-lock/src/esphome/core/color.o
cc1plus: some warnings being treated as errors
Compiling .pioenvs/esphome-eqiva-lock/src/esphome/core/component.o
*** [.pioenvs/esphome-eqiva-lock/src/esphome/components/eqiva_key_ble/eqiva_key_ble.o] Error 1
========================== [FAILED] Took 4.68 seconds ==========================
Add refresh: 0s
below the GitHub url
there already was added 0s.
i had to copy and paste the raw code wich i get when i click on the copy button?
Remove the # on that line, otherwise it's only a comment...
oh yeah that was stupid , sorry :D
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?
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 :)
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 :))
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
The BLE State shows Established but everytime i click "aufschließen" the state changes to connect and idle
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 :)
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 . :)
Kudos @digaus ! I just got the time today to play with it! THIS IS AWESOME! It worked like charm!!! So gratefull for you work!
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.
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