-
Notifications
You must be signed in to change notification settings - Fork 121
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
Request for Gimdow A1 Max smart lock #46
Comments
Hi, I modified the code to make basic functions with lock, unlock and lock status for GIMDOW A1. My coding is quite dirty but it is working for me anyway. Hope it could provide some support for the development. BTW, many thanks everyone in supporting this project so that I could control my device without cloud. |
You're amazing! Thank you so much! This was the last thing missing from my home assistant setup. Sorry for the noob question, but how do I install the tuya_ble.tar.gz file into my HA? |
You may try to extract the tar file and paste the tuya_ble folder to custom_components. For windows, 7zip could help you to do so. Then restart HA should be good to go. As it is not stable yet, to use this smart lock, bring the physical key when leaving the property ;) |
That's what I thought too. The problem was when I extracted the tar to move
it to the folder, the file explorer app I have on HA only lets you upload
files, not entire folders. And yeah, I never left without a key even
before, the Tuya app isn't exactly trustworthy either 😂. I'll get the
files over and give it a shot. Thanks again, I really appreciate your help
…On Sat, Jul 22, 2023, 12:26 PM dmickeyus ***@***.***> wrote:
You may try to extract the tar file and paste the tuya_ble folder to
custom_components. For windows, 7zip could help you to do so. Then restart
HA should be good to go.
As it is not stable yet, to use this smart lock, bring the physical key
when leaving the property ;)
—
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEJKKXGHGABLH5I6ZYN2FYDXRP5MNANCNFSM6AAAAAA2NW4634>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
If you choose not to give up, you may consider to try this one instead. It should be able to keep the connection more stable. But the coding is really bad, I don't know where to put the keepalive code properly. I hope someone could help me to solve this so that it may be able to merge into main branch in the future. |
No way I'm giving up lol. I'm really excited to try it! Thank you so much!
…On Sat, Jul 22, 2023 at 3:20 PM dmickeyus ***@***.***> wrote:
If you choose not to give up, you may consider to try this one instead. It
should be able to keep the connection more stable. But the coding is really
bad, I don't know where to put the keepalive code properly. I hope someone
could help me to solve this so that it may be able to merge into main
branch in the future.
tuya_ble.zip
<https://github.com/PlusPlus-ua/ha_tuya_ble/files/12137109/tuya_ble.zip>
.
—
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEJKKXHIWBB27FCNDJ7JHS3XRQRX7ANCNFSM6AAAAAA2NW4634>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi! I just wanted to thank you again and tell you your code isn't just
working, it's been absolutely fantastic so far. It reacts to commands in a
split second, much faster than anything in the Tuya ecosystem. I think you
were just selling yourself short on purpose lol. One of the reasons I
switched to home assistant is because I was getting very delayed and often
missed commands using a ZigBee door sensor to trigger a lock routine in
Tuya routines. Not only does your code make the lock react instantly to
locking/unlocking commands and ZigBee sensor triggers, but there's even the
option to see the current state, which is just a cherry on top, so I don't
have to ever open the Tuya app. I was so happy to unplug that stupid little
white Tuya Bluetooth gateway and hope it stays buried deep in my junk
drawer. I can't tell you how much I appreciate this integration and the
brilliant work you've done on it.
…On Sat, Jul 22, 2023, 5:34 PM Michael Kornikh ***@***.***> wrote:
No way I'm giving up lol. I'm really excited to try it! Thank you so much!
On Sat, Jul 22, 2023 at 3:20 PM dmickeyus ***@***.***>
wrote:
> If you choose not to give up, you may consider to try this one instead.
> It should be able to keep the connection more stable. But the coding is
> really bad, I don't know where to put the keepalive code properly. I hope
> someone could help me to solve this so that it may be able to merge into
> main branch in the future.
> tuya_ble.zip
> <https://github.com/PlusPlus-ua/ha_tuya_ble/files/12137109/tuya_ble.zip>
> .
>
> —
> Reply to this email directly, view it on GitHub
> <#46 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEJKKXHIWBB27FCNDJ7JHS3XRQRX7ANCNFSM6AAAAAA2NW4634>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Great work, dmickeyus! It would be beneficial if you could post this code to a GitHub repository. In the future, we could merge this code to support a larger number of smart locks using the same add-on. |
ok, I'm willing to contribute, I will do it when I'm free. |
@dmickeyus Using your code seems to add the correct buttons and sensors to the A1 Pro Max device under the Tuya BLE integration, but they stay in the 'unavailable' state. The logs show various errors such as 'Device unexpectedly disconnected', 'Sending device info request failed' and 'device not found, not in range, or poor RSSI'. I get this for all devices (2 A1 locks as well as some other bluetooth Tuya devices, including a Gimdow P1 Keypad), even for the lock that is just 3 metres from my HA server bluetooth dongle. |
Hello @dmickeyus Since your last post, did you create a git repo or a new version of your code ? |
@chris24walsh https://developer.tuya.com/en/docs/iot/title?id=K9nmje3twsy7n Refer to their sdk, I could not find a way to control the accessories locally. Sorry. |
hi @liouma |
@dmickeyus thanks for your reply. I meant about trying to listen to the keypad/read it's endpoints, not integrate it with the lock. However, I looked up the listed endpoints on Tuya IoT developer console and there doesn't appear to be much documented there at all. Regarding your code, I was able to get the locks integrated to HA eventually, it just took setting up an ESPHome Bluetooth proxy closer (presumably too much local 2.4GHz interference), removing the existing HA devices and waiting until they repaired (usually after restarting HA or reloading the integration). In the end, though, I found this integration less reliable than another cloud integration someone wrote for the Gimdow locks which actually works pretty flawlessly, just that it is not a local solution. The main reason I stopped using the local bluetooth integration is that I found it was crashing my HA instance :( Have you experienced this, or anyone else here? Would still love to rely on a local solution for the locks, ideally, but can't unless can fix these issues. Happy to provide testing/feedback. |
I've had a 100% success rate using this for the last 5 months. It's never
messed up even one time. Works super fast, way faster and more consistently
than using some garbage Tuya hub. Local control for the win! I could also
add now that after these 5 months (and 2 or 3 before that using just the
Tuya cloud stuff) my battery level finally changed from high to normal.
This is incredibly energy efficient, especially compared to other similar
locks out there. (Switchbot lock usually lasts only a few months from what
I heard) This device should absolutely be in the Tuya Ble integration by
default for all users.
…On Wed, Nov 8, 2023, 2:51 PM dmickeyus ***@***.***> wrote:
hi @liouma <https://github.com/liouma>
I am still using that old code, I didn't clone a new branch for it yet.
Anyway, feel free to try it, it has been running in my HA for months and it
does the job for me at least.
—
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEJKKXD5M3XCLZ56VOJ74NLYDPPDHAVCNFSM6AAAAAA2NW4636VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBSGU2TANBRG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I also faced crashing to HA when the hardware not paired properly, with the error similar to this #27 . Once paring is failed, HA have to be restarted to retry paring from ground or otherwise the HA will be crashed. I didn't figure out the reason for it but it works after several retries from repairing :-(. Two months later, it seems run even smoother after I migrated the HA from pi4 to x86 VM and also remove the cloud app from my mobile. I guess you are using the smart lock with accessories, right? In this case, I believe the device has to run in cloud environment unless someone could find a way to integrate those accessories locally. |
Hello, can you please tell me how you got that cloud integration working? Did you have something to modify to make it work? I put the files in custom_components, I added the lines in configuration.yaml (for the client id and api key is used client id and client secret, is that correct?) but after HA restart I get the following error in logs: Logger: homeassistant.components.lock gimdow: Error on device update! Thank you! Regards |
@ReNeGaDe124 Sounds like you have done essentially what I did; but did you define the "device_id" correctly in your configuration.yaml entry? |
Do I have to get the device id from Iot Tuya? I thought I had to give it a name. I put the device id as gimdow_lock. What did you put? |
@dmickeyus thanks for the tips, however I found that even when both my locks were paired and working fine, eventually one would stop responding. In addition (perhaps because of continuous pairing attempts from HA) HA would crash very frequently, almost like a memory leak. I had to remove the integration to fix this :( I'll try and get it working again sometime soon when I can afford the downtime from the cloud integration, which works perfectly so I depend quite heavily on it :) Agree with @mikekornikh though about these Gimdow locks, they are really amazing. I have one for years already, well before the Switchbot one came out, and they work very well with the batteries lasting a long time for the effort they put in. |
@chris24walsh I got the correct device id and now it is working perfectly. Thank you for the help! |
Bingo, great to hear! Have you also tried and encountered issues with the above BLE integration? It is still the aim to get local working smoothly for me of course, but I have almost never had issues after more than a year of using the cloud integration (only self-inflicted issues when the Tuya BLE gateway was disconnected accidentally or placed too far away). @dmickeyus I will try again sometime by removing the Tuya app as you mentioned, only I still use it for 1 or 2 devices still that don't have good local solutions e.g. Tuya wifi vacuum. |
P.S. @dmickeyus you definitely should fork this repo and open a PR to include your additions for the Gimdow lock, if not I will do it, lol!! But seriously, please do so we can all contribute patches etc. |
I didn’t try the bluetooth integration because I want to use it with accessories (keypad and button). Also I am afraid to unpair it from Smart Life because I have read on their Facebook page that I won’t be able to pair it again, only with Gimdow app and I don’t think that can be integrated in Home Assistant. There are some people who posted that they can’t pair their lock anymore. 😢 Until now I was using the Google SDK to use the lock in Home Assistant (send voice command to unlock + PIN) but for the past couple of days it has stopped working. I think maybe because they are removing support. So I started looking for an alternative and I’m glad I found the integration you mentioned. 😊 |
@ReNeGaDe124 I was able to re-pair my locks to Tuya Smart (essentially the same as Smart Life) app after removing them, during some testing. But I have encountered that I am now unable to pair the keypad I have, or the keyfob button, back with the locks - not sure if that was particularly what you were referring to. It used to work, and I can't say when exactly it stopped working, because I practically didn't use them anyway. It sucks now though, because I actually would like to use them again, particularly the keypad. It's a nice piece of hardware, and would be a great alarm panel if I could get the events in HA, so if I could at least pair it with my lock I could infer to disarm whenever the lock is unlocked. I also was using the Alexa integration to lock/unlock from HA, so glad to now have an integration that works directly with cloud api, since the Alexa way was soo slow and buggy. Reliable use of the direct BLE integration would be 11/10 though, especially if there was some way to read events of the keypad/keyfob. |
Hello everyone! Who can describe how to integrate custom_components created by @dmickeyus (step by step)? I created a folder with custom_components, placed files there. After the reboot, a new Tuya integration appeared. In the first dialog box, I entered the Access ID and Take It Access Secret, Account, Password from Take It Platform. As a result, I got a lock with buttons, but they are not all active. Logger: custom_components.Gimdow.tuya_ble.tuya_ble DC:23:4E:D1:E5:2A: timeout receiving response, RSSI: -21 This error originated from a custom integration. Logger: custom_components.Gimdow.tuya_ble.tuya_ble DC:23:4E:D1:E5:2A: Sending device info request failed This error originated from a custom integration. Logger: homeassistant Error doing job: Task exception was never retrieved Logger: homeassistant Error doing job: Task exception was never retrieved |
Hello, as you know there was many evolutions in tuya and problems were reported with tuya_ble. @dmickeyus : can your please share your updated code ? |
Hello, I am ok to share my currently functional version but I cannot guarantee it works to you guys. Since tuya changed its sdk api version, old api won't work in the near future. I am done to rely on the cloud to retrieve the secret keys. I believe I should be the key owner, not the cloud. That means, my code removed the cloud login to retreive the device info. Instead, one needs to get the them manually and put it into the file. This version reads the local file and control everything locally. Once discovered your BLE smart lock that matches your file MAC address and keys, it will add to your inventory automatically. I also replaced using button entities with lock entity to control and update status. As usual, unpack the file to custom_components and create the secret file /config/tuya_local_ble/devices.json with the following format: If you are lucky enough, your could find these information from the old home assistant bakcup in /config/.storage/core.config_entries. If not, find them via your tuya account. They are waiting for you. |
Thanks a lot once again @dmickeyus !! Do you know the python script tinytuya ? I installed your script, restarted, then my gimdow lock was discovered immediately and installed. When I clicked on "configure" on any of those devices I got:
and in my logs: Later 4 entities appeared on the first lock and it started to work fine :) When I click on "configure" I still get the same error. |
Hi @liouma , I didn't try tinytuya yet but I suggest the lock should bundle with a CD driver with this script included. Per your question, it seems to be charset and python version issue, could you try add 'r' to declare as rawstring. ie pattern=r"^((\d{1,2}|100)(/\d{1,2})?)(;(........ Or, the lock does not use text.py, I guess delete this file could also eliminate the error. The patch also featured a jam detection timer, I set to 12 seconds as default. You may test and change the value per your needs. Read the lock.py and you will find it out. |
@brunoblazer : I have the same problem and did not solve it. @dmickeyus asked me to check my logs but I didnt have time. @dmickeyus : did not have time to analyse my logs as you asked that's why I did not answer yet, sorry. |
Hello @brunoblazer, the devices file extension shoud be .json, not .py |
|
@efranulic, unfortunately, the code is focused for A1 MAX smart lock only. For other tuya devices, I think it needs someone to find the datapoints for those devices to make it works. @brunoblazer, it seems the devices.json placed in incorrect folder, it should not be inside the /config/custom_components/tuya_local_ble, instead, try to make a folder in /config/tuya_local_ble and put devices.json into. |
only signal......... AT1 (rlyxv7pe) |
@dmickeyus 1000 thanks, it was as simple as that, copy/paste xD |
@comandor1967, rlyxv7pe should work and category should be jtmspro. did you install also tuya in home assistant? it could be a reason to get conflict. |
Я всё-таки его завел ,надо заводить правильно uuid и отцепить его от шлюза
пн, 27 мая 2024 г., 23:08 dmickeyus ***@***.***>:
… @comandor1967 <https://github.com/comandor1967>, rlyxv7pe should work,
did you install also tuya in home assistant? it could be a reason to get
conflict.
—
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGC3K7C2YSGJLTPFHTJZNC3ZEOHDLAVCNFSM6AAAAAA2NW4636VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZUGAYDCOBSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'm very sleepy but to add more than one piece of equipment, shouldn't the code be like this? [ |
I guess the code should work but I didn't test as I don't have multiple devices in hands. Maybe without extra bruckets like this: { |
Работает ,uuid надо ставить
пн, 27 мая 2024 г., 23:08 dmickeyus ***@***.***>:
… @comandor1967 <https://github.com/comandor1967>, rlyxv7pe should work,
did you install also tuya in home assistant? it could be a reason to get
conflict.
—
Reply to this email directly, view it on GitHub
<#46 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGC3K7C2YSGJLTPFHTJZNC3ZEOHDLAVCNFSM6AAAAAA2NW4636VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZUGAYDCOBSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello everybody, |
The foundation of the current development should be ready for most tuya ble devices. However, in order to support other devices, the device spec or reverse engineering is required to add sensors and controls. This is manufacturer independant. |
@dmickeyus HAOS on RPI4, using local BT, setting on BT is "passive scan - V" (ive tried to remove it and stil nothing. Core 2024.6.1 Thanks! |
@anonine9899 I guess you may already know that if you are using ESP32 proxy, there is a limitation that each could maximum connect to 3 BLE devices. Good luck. |
@anonine9899 |
There is a "A1 Pro Max Bluetooth Smart Door Lock Tuya" on aliexpress. Anyone knows if that works with this integration? Dont wanna buy one and a esp32 proxy, just to find out it does not work :-) Thanks. |
This is the one I use and it's working fine |
@liouma Thanks! Can I use the bluetooth keyfob after integration with HA? Or is it like the keypad and it needs cloud integration? |
I don't know, I will let other persons answer your question |
I suggest not even buying the keyfob. When I first got the A1 pro max, before this integration worked for it, I ordered 2 keyfobs on Aliexpress. I thought I could use them day-to-day or make an esp device that triggered it so home Assistant works. In order to use it, you have to go through the Tuya app and pair them. After doing that, they worked, but really bad. There was always a long delay waiting for the lock to respond to the button press. Same happened on both keyfobs I tried. I ended up returning them. I'm thinking now it was probably because the lock has trouble dealing with multiple clients and when it was connected to the Tuya hub, it had a hard time listening to the fob. Given that this integration is for Home Assistant, I'm assuming you have that. There are WAYYYY better options home Assistant gives you. For example...Instead of having to carry around the fob, I just stuck an NFC tag by my door. When I come home, I just tap and it opens instantly. No lag or delay. And that tag is secure because you can only use it with a phone that has HA installed, is logged-in and that account has permission to access this automation. I have a contact sensor on the door, so it auto-locks when I close it. Also, you now have the power of using anything that works with Home Assistant. You can buy any one of those little keychain buttons and get that to work or even make an ESPHome keypad. |
That is the one I bought that I've used with this integration for over a year now |
I bought this one, haven't got a fob. |
Really? Mine lasted a year with heavy use. Are you using rechargeable batteries? |
yes, ikea HR06 AA 1.2V, 2450mAh |
That's why. When I tried using rechargeable batteries, it even started off saying the battery level was medium at best with a fresh set. It starts off 1.2V lower than normal, and drops fast from there. Put four fresh disposable alkaline batteries (1.5v) in there and see how long they last. |
I agree with both of you:: we need 1.5v batteries, 1.2v don't last enough. And i don't like using disposable batteries. |
Yeah, I wish I also mentioned that an alternative rechargeable battery chemistry would be a solution too, if you really INSIST on rechargeable batteries. My 2¢ is that this is the least ideal situation for using rechargeable batteries. The benefit of alkaline is they are dirt cheap and will last about a year here. Those lithium batteries won't come close to lasting as long and cost orders of magnitudes more. And I want to be clear, I'm a huge fan of rechargeable batteries. I didn't even have any alkalines in my house when I got this lock. Back then, Lithium batteries were like $30 for a 4 pack (so I would need 2 to be able to swap and not have downtime while charging) I bought a 20 pack of alkalines from Amazon for $9 and they will last me literally 5 years with minimum changes. (They're guaranteed to hold their charge for more than 10 years) Lithium batteries make more sense for things like game controllers because they drain the battery quickly. Again, this is just my reasoning/logic and if you have access to cheap lithium batteries and don't mind changing them out every few months, then have at it. |
Your device was detected successfully at least. Check again the json file including its format, values, and path. I believe you will make it eventually. Good Luck! |
Hi! I want to start by thanking you for the amazing work. I was also born in Ukraine, so I personally feel the terror you're going through. I'm hoping you can help integrate the Gimdow A1 Max smart lock here. I love this lock, and it's my really my only option for my rental apartment because it goes right over the included door lock. Here's a link to the product page https://www.gimdow.com/GIMDOW-A1.html
Product: A1 PRO MAX
Device Information
Product Name
M515EGWT V2
Product Category
cl
Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: