Skip to content
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

Add smart lock support. #120

Merged
merged 6 commits into from
Feb 24, 2023
Merged

Add smart lock support. #120

merged 6 commits into from
Feb 24, 2023

Conversation

0x5e
Copy link
Owner

@0x5e 0x5e commented Nov 24, 2022

Need user to test.

@0x5e 0x5e added this to the 1.7.0 milestone Nov 24, 2022
0x5e added 2 commits February 6, 2023 15:14
# Conflicts:
#	src/accessory/AccessoryFactory.ts
@pfgimutao
Copy link

Hi I was able to create a working lock accessory that utilizes the smart lock open service APIs. Can you include this in your code? I have tested this using a jtmspro device which is a retrofit smart door lock that uses bluetooth. Here is my fork of your code. https://github.com/pfgimutao/homebridge-tuya-platform-lock

@0x5e
Copy link
Owner Author

0x5e commented Feb 24, 2023

@pfgimutao thanks! I will merge it soon.

@0x5e 0x5e marked this pull request as ready for review February 24, 2023 06:11
@0x5e 0x5e changed the title Add initial lock support (only current state work) Add smart lock support. Feb 24, 2023
@0x5e 0x5e linked an issue Feb 24, 2023 that may be closed by this pull request
@0x5e 0x5e merged commit da08568 into develop_1.7.0 Feb 24, 2023
@0x5e 0x5e deleted the feature/lock branch February 24, 2023 06:37
@0x5e
Copy link
Owner Author

0x5e commented Feb 24, 2023

@pfgimutao released in 1.7.0-beta.29. if it's not working please let me know.

@pfgimutao
Copy link

@0x5e thanks for the merge. I've tested it and it is working for me. By any chance, do you have any support for wnykq?

@0x5e
Copy link
Owner Author

0x5e commented Feb 24, 2023

@0x5e thanks for the merge. I've tested it and it is working for me. By any chance, do you have any support for wnykq?

wnkyq is supported now, but only for IR device, RF device not supported by cloud api.

@felipehjcosta
Copy link

felipehjcosta commented Feb 24, 2023

@0x5e

I've tested here and its workin now!

I would like to share that I have been trying to use this smart lock via my Zemismart HomeKit Hub but it never have worked... It only shows the smart lock status open or close on HomeKit. Now, I can control it and check battery level as well!

Thank you very much!

@gonzaechev
Copy link

Hello, I have the zigbee version with Zemismart Hub and another with Wifi chip (Product Category
ms) This plugin work with wifi version? I added to homebridge, this is the result:

[19/03/2023, 13:31:27] [@0x5e/homebridge-tuya-platform] [Acceso] Product Category: ms
[19/03/2023, 13:31:27] [@0x5e/homebridge-tuya-platform] [Acceso] Missing one of the required schema: [ 'lock_motor_state' ]
[19/03/2023, 13:31:27] [@0x5e/homebridge-tuya-platform] [Acceso] Please switch device control mode to "DP Insctrution", and set deviceOverrides manually.
[19/03/2023, 13:31:27] [@0x5e/homebridge-tuya-platform] [Acceso] Detail information: https://github.com/0x5e/homebridge-tuya-platform#faq
[19/03/2023, 13:31:27] [@0x5e/homebridge-tuya-platform] [Acceso] Existing schema: [
{
code: 'alarm_lock',
mode: 'ro',
type: 'Enum',
property: {
range: [
'wrong_finger', 'wrong_password',
'wrong_card', 'wrong_face',
'tongue_bad', 'too_hot',
'unclosed_time', 'tongue_not_out',
'pry', 'key_in',
'low_battery', 'power_off',
'shock', [length]: 13
]
}
},
{
code: 'battery_state',
mode: 'ro',
type: 'Enum',
property: { range: [ 'high', 'medium', 'low', 'poweroff', [length]: 4 ] }
},
{ code: 'doorbell', mode: 'ro', type: 'Boolean', property: {} },
{ code: 'hijack', mode: 'ro', type: 'Boolean', property: {} },
{
code: 'reply_unlock_request',
mode: 'wo',
type: 'Boolean',
property: {}
},
{
code: 'unlock_app',
mode: 'ro',
type: 'Integer',
property: { min: 0, max: 999, scale: 0, step: 1 }
},
{
code: 'unlock_card',
mode: 'ro',
type: 'Integer',
property: { min: 0, max: 999, scale: 0, step: 1 }
},
{
code: 'unlock_dynamic',
mode: 'ro',
type: 'Integer',
property: { min: 0, max: 999, scale: 0, step: 1 }
},
{
code: 'unlock_fingerprint',
mode: 'ro',
type: 'Integer',
property: { min: 0, max: 999, scale: 0, step: 1 }
},
{
code: 'unlock_password',
mode: 'ro',
type: 'Integer',
property: { min: 0, max: 999, scale: 0, step: 1 }
},
{
code: 'unlock_request',
mode: 'ro',
type: 'Integer',
property: { min: 0, max: 90, scale: 0, step: 1 }
},
{
code: 'unlock_temporary',
mode: 'ro',
type: 'Integer',
property: { min: 0, max: 999, scale: 0, step: 1 }
},
[length]: 12

@0x5e
Copy link
Owner Author

0x5e commented Apr 3, 2023

@gonzaechev please refer to readme, change device control mode and test if it solves your problem?

@nevirous
Copy link

@gonzaechev please refer to readme, change device control mode and test if it solves your problem?

hey, i already change to DP Mode, and overrides the device via plugin but it didn't solve the problem, can you help me with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Lock Mechanism
5 participants