home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.72k stars 28.87k forks source link

Tuya Support for G30 Lock #119136

Open chrineuh opened 3 weeks ago

chrineuh commented 3 weeks ago

The problem

Hello,

Can anyone add the Lockin G30 to Homeassitant. The device is connected via Tuya but it is not supported.

image

What version of Home Assistant Core has the issue?

2024.6.1

What was the last working version of Home Assistant Core?

2024.6.1

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Tuya

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 3 weeks ago

Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `tuya` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tuya` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tuya documentation tuya source (message by IssueLinks)

mib1185 commented 3 weeks ago

Hi @chrineuh

This sounds more like an feature request? Please use the feature request section of our forum to contribute on existing or create new feature requests. For sure, contributions are always welcome, so please feel free to create a PR on your own.

Thanks! 👍

chrineuh commented 3 weeks ago

@mib1185

Thanks, so you think its an feature request? I was thinking features are new things and not new devices...

Thanks

azerty9971 commented 2 weeks ago

Hello, Can you post the diagnostic information (the link below the Tuya logo in your initial screenshot) ?

From there I might be able to help you :).

Have a nice evening, Azerty

chrineuh commented 1 week ago

Hello

@azerty9971

Here are the diagnostic information i only have cleared the device id. tuya-2994b2449940a67fcc166a7aaf333ae6-Haustür Schloss -c6aeea1159de87334bc3c1537afc0e1c (3).json

In the meantime, I have tested something myself and was able to connect the device with the addon [https://github.com/make-all/tuya-local](Local Tuya).

I simply created a new file under the devices folder which is used for the G30. But there are still problems I can't lock and unlock the lock via homeassitant and the battery status etc is only shown when I have the tuya app open on my mobile phone... I have also tried in the lock.py to do the status messages correctly so that it matches the DPs of the lock but it is not optimal that locking is not possible at all. In Tuya Dev portal have activated an additional api for locks with thatI can unlock the lock in the api explorer but not always lock it. I have the files here :

lock.py.txt

lockin_g30_lock.yaml.txt

image

azerty9971 commented 4 days ago

Hello, Can you try installing this custom component (that's my extension of the tuya integration). If everything works as expected then I'll make the PR to include these changes into the main Tuya integration...

(the latest version should be fine for you) https://github.com/azerty9971/xtend_tuya

Let me know if that helped :)

Have a nice day, Azerty