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

Request for Moes R2 smart lock (Tuya) #50

Closed
Sairon92 opened this issue Jul 23, 2023 · 6 comments
Closed

Request for Moes R2 smart lock (Tuya) #50

Sairon92 opened this issue Jul 23, 2023 · 6 comments

Comments

@Sairon92
Copy link

Hi. Thanks for your work.
Could you please add a Tuya R2 smart lock ( https://moeshouse.com/products/eu-version-bluetooth-smart-door-lock-bank-grade-aes128-bit-and-tls-encryption-keypad-bundle-bluetooth-sensor-unlocking-tuya-smart-app-remote-unlocking )
"category": "jtmspro",
"model": "BDL-BG-2-US",
"name": "R2 Smart Lock",
"product_id": "s6amdvmm",
"product_name": "ZC-BG 美式改装门锁R2"

@Sairon92
Copy link
Author

Standart instruction set:
{
"result": {
"category": "jtmspro",
"functions": [
{
"code": "unlock_method_create",
"desc": "unlock method create",
"name": "unlock method create",
"type": "Raw",
"values": "{}"
},
{
"code": "unlock_method_delete",
"desc": "unlock method delete",
"name": "unlock method delete",
"type": "Raw",
"values": "{}"
},
{
"code": "unlock_method_modify",
"desc": "unlock method modify",
"name": "unlock method modify",
"type": "Raw",
"values": "{}"
},
{
"code": "lock_record",
"desc": "lock record",
"name": "lock record",
"type": "Raw",
"values": "{}"
},
{
"code": "beep_volume",
"desc": "beep volume",
"name": "beep volume",
"type": "Enum",
"values": "{"range":["mute","normal"]}"
},
{
"code": "automatic_lock",
"desc": "automatic lock",
"name": "automatic lock",
"type": "Boolean",
"values": "{}"
},
{
"code": "auto_lock_time",
"desc": "auto lock time",
"name": "auto lock time",
"type": "Integer",
"values": "{"unit":"","min":1,"max":1800,"scale":0,"step":1}"
},
{
"code": "rtc_lock",
"desc": "rtc lock",
"name": "rtc lock",
"type": "Boolean",
"values": "{}"
},
{
"code": "manual_lock",
"desc": "manual lock",
"name": "manual lock",
"type": "Boolean",
"values": "{}"
},
{
"code": "synch_method",
"desc": "synch method",
"name": "synch method",
"type": "Raw",
"values": "{}"
},
{
"code": "guide_page_act",
"desc": "guide page act",
"name": "guide page act",
"type": "Raw",
"values": "{}"
},
{
"code": "remote_no_dp_key",
"desc": "remote no dp key",
"name": "remote no dp key",
"type": "Raw",
"values": "{}"
},
{
"code": "record",
"desc": "record",
"name": "record",
"type": "Raw",
"values": "{}"
},
{
"code": "check_code_set",
"desc": "check code set",
"name": "check code set",
"type": "Raw",
"values": "{}"
},
{
"code": "ble_unlock_check",
"desc": "ble unlock check",
"name": "ble unlock check",
"type": "Raw",
"values": "{}"
},
{
"code": "remote_pd_setkey_check",
"desc": "remote pd setkey check",
"name": "remote pd setkey check",
"type": "Raw",
"values": "{}"
},
{
"code": "special_control",
"desc": "special control",
"name": "special control",
"type": "Boolean",
"values": "{}"
},
{
"code": "unlock_ble_ibeacon",
"desc": "unlock ble ibeacon",
"name": "unlock ble ibeacon",
"type": "Integer",
"values": "{"min":0,"max":999,"scale":0,"step":1}"
},
{
"code": "ibeacon_scan_mode",
"desc": "ibeacon scan mode",
"name": "ibeacon scan mode",
"type": "Enum",
"values": "{"range":["always","5min","10min","20min","40min","60min","90min","120min"]}"
},
{
"code": "rssi_sensitivity_level",
"desc": "rssi sensitivity level",
"name": "rssi sensitivity level",
"type": "Enum",
"values": "{"range":["inactive","90db","80db","70db","60db","50db","40db","30db","20db"]}"
},
{
"code": "autolock_delay_level",
"desc": "autolock delay level",
"name": "autolock delay level",
"type": "Enum",
"values": "{"range":["inactive","4s","6s","8s","10s","12s"]}"
},
{
"code": "ibeacon_switch",
"desc": "ibeacon switch",
"name": "ibeacon switch",
"type": "Boolean",
"values": "{}"
}
]
},

@alexxx113
Copy link

https://github.com/alexxx113/ha_tuya_ble/tree/main
It seems to work...

@Sairon92
Copy link
Author

Sairon92 commented Aug 26, 2023

@alexxx113
Hi Alex, Thank you for your job.
I try to setup my lock with your file
I can add the lock, with 24 entities
I use esp32 bluetooth proxy. Set it near the lock (1m).
But all of this entities is unavailable.
image

and get this error:
image
image

Logger: custom_components.tuya_ble.tuya_ble.tuya_ble
Source: custom_components/tuya_ble/tuya_ble/tuya_ble.py:503
Integration: Tuya BLE
First occurred: 12:58:14 PM (7 occurrences)
Last logged: 1:04:28 PM

DC:23:4D:8E:7B:2C: Device unexpectedly disconnected; RSSI: -73
DC:23:4D:8E:7B:2C: Device unexpectedly disconnected; RSSI: -74
DC:23:4D:8E:7B:2C: Device unexpectedly disconnected; RSSI: -72

Logger: custom_components.tuya_ble.tuya_ble.tuya_ble
Source: custom_components/tuya_ble/tuya_ble/tuya_ble.py:294
Integration: Tuya BLE
First occurred: 12:58:45 PM (12 occurrences)
Last logged: 1:03:56 PM

DC:23:4D:8E:7B:2C: timeout receiving response, RSSI: -74
DC:23:4D:8E:7B:2C: Sending device info request failed
DC:23:4D:8E:7B:2C: timeout receiving response, RSSI: -73
DC:23:4D:8E:7B:2C: timeout receiving response, RSSI: -72

Logger: homeassistant.components.number
Source: helpers/entity_platform.py:613
Integration: Number (documentation, issues)
First occurred: 12:57:40 PM (1 occurrences)
Last logged: 12:57:40 PM

Platform tuya_ble does not generate unique IDs. ID bfab57vjl86zi3jm-unlock_phone_remote is already used by number.bfab57vjl86zi3jm_unlock_phone_remote - ignoring sensor.bfab57vjl86zi3jm_unlock_phone_remote

@Sairon92
Copy link
Author

2023-08-26 12:21:01.201 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Device unexpectedly disconnected; RSSI: -74
2023-08-26 12:21:31.245 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: timeout receiving response, RSSI: -73
2023-08-26 12:21:31.246 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Sending device info request failed
2023-08-26 12:21:31.247 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Connecting; RSSI: -73
2023-08-26 12:21:41.283 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Connected; RSSI: -73
2023-08-26 12:21:41.341 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Sending device info request
2023-08-26 12:21:41.341 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Sending packet: #24 FUN_SENDER_DEVICE_INFO
2023-08-26 12:22:11.233 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Device unexpectedly disconnected; RSSI: -73
2023-08-26 12:22:41.343 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: timeout receiving response, RSSI: -71
2023-08-26 12:22:41.344 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Sending device info request failed
2023-08-26 12:22:41.345 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Connecting; RSSI: -71
2023-08-26 12:22:42.474 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Connected; RSSI: -71
2023-08-26 12:22:42.512 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Sending device info request
2023-08-26 12:22:42.512 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:8E:7B:2C: Sending packet: #25 FUN_SENDER_DEVICE_INFO

@alexxx113
Copy link

Connect lock app android or ios, not gateway!
Remove lock geteway!
Or delete device app and gateway
Disconect power gateway!
And new connect in app
Turn off bluetooth in device
Add in home assistant.
Reconect battery

esp32 bluetooth proxy no test....

@Sairon92
Copy link
Author

@alexxx113 , Thank you. Everything is working!

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

No branches or pull requests

2 participants