Tuya-BLE icon indicating copy to clipboard operation
Tuya-BLE copied to clipboard

Support request: H8 pro lock (jtmspro, wwbdbt3h) – FD50 link drops after DEVICE_INFO

Open benfpalmer opened this issue 2 weeks ago • 2 comments

Device: H8 pro BLE smart lock (Tuya), paired directly to the Smart Life app (no gateway) Category: jtmspro Product ID: wwbdbt3h HA: 2026.11.2, HAOS 18.4, ESPHome Bluetooth proxy ~2 m away

DP schema (from Tuya cloud) matches the other jtmspro FD50 locks: DP8 residual_electricity, DP31 beep_volume, DP33 automatic_lock, DP36 auto_lock_time, DP46 manual_lock, DP47 lock_motor_state, DP54 synch_method, DP69 record, DP70 check_code_set, DP71 ble_unlock_check, DP79 e_anti_lock

I added wwbdbt3h locally to devices.py, lock.py (same mapping as vsf3sqif/c6hfl8bt: unlock 6, lock 46, state 47, value_means_locked=False) and sensor.py (battery DP8), and set it up with local_key, uuid, device_id and ble_unlock_check.

It connects on the FD50 channel, then the lock drops the link about 250 ms after FUN_SENDER_DEVICE_INFO, the same symptom as the new-security locks in the README:

DEBUG ... DC:23:53:07:AC:D7: Connecting; RSSI: -83 DEBUG ... DC:23:53:07:AC:D7: Connected; RSSI: -83 DEBUG ... DC:23:53:07:AC:D7: legacy characteristics not present, using FD50 GATT channel DEBUG ... DC:23:53:07:AC:D7: Sending device info request DEBUG ... DC:23:53:07:AC:D7: Sending packet: #3 FUN_SENDER_DEVICE_INFO DEBUG ... DC:23:53:07:AC:D7: Device unexpectedly disconnected; RSSI: -83

So it probably needs sec_key. The HA Tuya integration's sharing API (/v1.0/m/life/ha/devices/detail) returns local_key but no secKey.

I'm trying to get it from the mobile app API; I'll report back with the result.

Happy to test builds or capture more logs.

benfpalmer avatar Nov 22 '26 17:11 benfpalmer

Sorry if I'm sounding like a broken record here, But as stated many times before, device support requests should go through pull requests using confirmed working code.

Debugging device support should happen in an issue on your own fork of this repo, not here.

Issues should be strictly for reporting general or supported device specific bugs with this integration.

I don't mean to sound rude, but I'm just sick and tired of people using LLMs for making good looking issues instead of using those same LLMs to create pull requests for the code they already have.

I'm just a single maintainer here with a single supported device to my name, I can't just test code for devices I do not (and will not) own, so please keep that in mind the next time you want a new device to be supported by this integration.

ShonP40 avatar Nov 22 '26 17:11 ShonP40

Update: got it working locally. Three things were needed.

  1. sec_key (new-security login) The HA Tuya sharing API (/v1.0/m/life/ha/devices/detail) does not return secKey, but the mobile app API does. I signed in with tuya-mobile 1.2.0 (TuyaPasswordClient, smart_life profile, EU endpoint) and called thing.m.device.get (v4.1) for the device: it returned secKey (16 chars) and the same localKey as the OpenAPI. With sec_key set, DEVICE_INFO and PAIR both return result 0 and the link stays up.

  2. Treat wwbdbt3h like qymgyczo (FD50 + sec_key) Added "wwbdbt3h" everywhere "qymgyczo" is listed:

  • tuya_ble.py: ADVERTISEMENT_GATED_PRODUCTS, RELEASE_IDLE_LINK_PRODUCTS, the _parse_datapoints_v4 FD50 branch, the protocol check around line 2082, and the DP6 / DP46 branches in _send_datapoints
  • lock.py: the available() override Before this, _send_datapoints fell through to raise TuyaBLEDeviceError(0). Plus a devices.py entry, and a lock.py mapping identical to qymgyczo (unlock 6, lock 46, state 47, value_means_locked=False, keep_connect=False), and battery DP8 in sensor.py.
  1. Report header is 00000001, not 00000000 This lock's V4 reports start with 00000001, so _decode_fd50_v4_report rejected them and they fell through to "Ignoring unsupported Raykube V4 payload". Otherwise the layout is exactly the documented one (seq:1 | flags:2 | dp_id type len:2 value), e.g.: 00000001 aa 0000 2f 01 0001 00 -> DP47 False (locked) 00000001 ab 0000 08 02 0004 00000064 -> DP8 100 (battery) 00000001 a9 8000 2e 00 0001 01 -> DP46 I relaxed the check to: if len(data) < 11 or data[:3] != b"\x00\x00\x00" or data[3] > 1:

Result, verified on hardware through an ESPHome proxy:

  • remote lock: OK
  • remote unlock (DP71 V4 from ble_unlock_check): OK, auto-relocks after 5 s
  • DP47 state updates the lock entity (unlocked, then locked)
  • battery 100%
  • also decoded: DP31 beep_volume, DP33 automatic_lock, DP36 auto_lock_time, DP79 e_anti_lock

One frame was still ignored, on FUN_RECEIVE_TIME_DP_V4 right after the unlock: 00000001b40000016b0329391302000400000001 which looks like a timestamped unlock record (DP19 unlock_ble = 1?).

Happy to test a build with official support for wwbdbt3h.

benfpalmer avatar Nov 22 '26 17:11 benfpalmer