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

Can you please add the smart curtain robots #126

Open
Majestic7979 opened this issue May 22, 2024 · 43 comments
Open

Can you please add the smart curtain robots #126

Majestic7979 opened this issue May 22, 2024 · 43 comments

Comments

@Majestic7979
Copy link

There are literally about a hundred of different brands for this exact same motor: https://www.ebay.co.uk/itm/315278086403

They work via BLE and it would be amazing to get it working directly in HA without using a hub.

Could you please add? Let me know what details you need and I'll be happy to help by providing. Thank you.

@Rak3tenmann
Copy link

got this Curtain Rotot too.
Would be great to get it work with Home Assistant.

@hiagocosta
Copy link

I Just bought one today, excited to gain control via home assistant

@hiagocosta
Copy link

mine have arrived today, does any fork was succesfully on integrating this device?

@pantherale0
Copy link

@Majestic7979 if you enable debug logging for the integration you should get a log similar to:

2024-07-29 19:48:19.859 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Retrieved: uuid: xxxxxxxxxxxxxxxx, local_key: xxxxxxxxxxxxxxxx, device_id: xxxxxxxxxxxxxxxx, category: cl, product_id: 4pbr8eig, device_name: Bluetooth Rope Motor, product_model: BC-LS, product_name: Bluetooth Rope Motor

Send that over and I'll see if I can find a matching device with datapoints. I've started adding cover support here:
https://github.com/pantherale0/ha_tuya_ble

@hiagocosta
Copy link

@Majestic7979 if you enable debug logging for the integration you should get a log similar to:

2024-07-29 19:48:19.859 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Retrieved: uuid: xxxxxxxxxxxxxxxx, local_key: xxxxxxxxxxxxxxxx, device_id: xxxxxxxxxxxxxxxx, category: cl, product_id: 4pbr8eig, device_name: Bluetooth Rope Motor, product_model: BC-LS, product_name: Bluetooth Rope Motor

Send that over and I'll see if I can find a matching device with datapoints. I've started adding cover support here: https://github.com/pantherale0/ha_tuya_ble

i'll get that ASAP, and open an issue in your fork to make it work, thank you!!

@hiagocosta
Copy link

hiagocosta commented Nov 15, 2024

unfortunately, after add your repo on the hacs, I couldnt make it work, and the logs I get this:

2024-11-15 01:10:37.083 ERROR (MainThread) [custom_components.hacs] Download failed - Got status code 404 when trying to download https://github.com/pantherale0/ha_tuya_ble/archive/refs/heads/6b749fe.zip Traceback (most recent call last): File "/config/custom_components/hacs/base.py", line 709, in async_download_file raise HacsException( custom_components.hacs.exceptions.HacsException: Got status code 404 when trying to download https://github.com/pantherale0/ha_tuya_ble/archive/refs/heads/6b749fe.zip 2024-11-15 01:10:37.087 ERROR (MainThread) [custom_components.hacs] [<Integration pantherale0/ha_tuya_ble>] Failed to download zipball Traceback (most recent call last): File "/config/custom_components/hacs/repositories/base.py", line 631, in download_content await self.download_repository_zip() File "/config/custom_components/hacs/repositories/base.py", line 677, in download_repository_zip raise HacsException(f"[{self}] Failed to download zipball") custom_components.hacs.exceptions.HacsException: [] Failed to download zipball

@hiagocosta
Copy link

@Majestic7979 if you enable debug logging for the integration you should get a log similar to:

2024-07-29 19:48:19.859 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Retrieved: uuid: xxxxxxxxxxxxxxxx, local_key: xxxxxxxxxxxxxxxx, device_id: xxxxxxxxxxxxxxxx, category: cl, product_id: 4pbr8eig, device_name: Bluetooth Rope Motor, product_model: BC-LS, product_name: Bluetooth Rope Motor

Send that over and I'll see if I can find a matching device with datapoints. I've started adding cover support here: https://github.com/pantherale0/ha_tuya_ble

I got this information by tuya developer tools, is usable?

{
"result": {
"active_time": 1731647021,
"bind_space_id": "57868568",
"category": "cl",
"create_time": 1718737092,
"custom_name": "Cortina",
"icon": "smart/icon/bay15953254745298oj3/cf5f88eed839c0136540b7482c2afae1.png",
"id": "REMOVED FOR SECURITY",
"ip": "",
"is_online": true,
"lat": "-20.73",
"local_key": "REMOVED FOR SECURITY",
"lon": "-41.61",
"model": "本地定时",
"name": "Robô de cortina inteligente",
"product_id": "kcy0x4pi",
"product_name": "智能窗帘机器人",
"sub": true,
"time_zone": "-03:00",
"update_time": 1731647061,
"uuid": "1df0535850688eff"
},
"success": true,
"t": 1732622235760,
"tid": "94665505abed11efb0b89e5820c93cc8"
}

@pantherale0
Copy link

@hiagocosta haven't seen your messages, sorry. I've updated my fork. You will need to download the repository as a zip and manually install.

@hiagocosta
Copy link

@pantherale0 no problem, I hope that we can add this smart curtains to HA by your integration with this data, let me know if you need more information

@pantherale0
Copy link

I might just change the fork so that its specific for covers. Unfortunately I don't know what fork is actually actively maintained, head (this one) hasn't had any updates since last year, and some of the forks mentioned in #127 don't seem to be active either.

Plus the codebase seems quite complex (at least in my mind). I think a better way would be to store all the datapoints, product ids and configs in a single separate location rather than embedded inside each HA platform.

@hiagocosta
Copy link

Plus the codebase seems quite complex (at least in my mind). I think a better way would be to store all the datapoints, product ids and configs in a single separate location rather than embedded inside each HA platform.

do you mean create a new integration based only in curtains and let this one for fingerbots?

@pantherale0
Copy link

Yep, exactly that. Tuya devices have far too many product ids, datapoints etc and there is no easy central source to get them from.

@hiagocosta
Copy link

hi, after downloading and add to home assistant, I can't get the device to be paired with home assistant... always shows no unconfigured device found, and does not seems to find the curtains and the fingerbot that I usually used before,

@hiagocosta
Copy link

I get this entity only, with your fork:

image

@hiagocosta
Copy link

Hi, I got the problem, is an typo on the device ID, fixing on my instance and checking if it works

@pantherale0
Copy link

updated the fork now with the right IDs :)

@hiagocosta
Copy link

good, tried and get the device, but can't control it:

debug error:

2024-12-08 15:09:03.611 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Missing packet (number 0) in notifications, received 6

@pantherale0
Copy link

does it report the state ok? Probably a case that the datapoints needed to control are different (or accept different messages)

@hiagocosta
Copy link

now, after re-add the device Ican control, but I would like to know what is this attribute:

image

@pantherale0
Copy link

Should be motor speed, the entity name hasn't been set though.

@hiagocosta
Copy link

changing the number doesn't affect in anything, for now the important is working, thanks for the development!!
I hope we keep this integration updating and working

@hiagocosta
Copy link

I figured out a weird behavior now with the curtains, everytime that I restart HA or the integration, it closes the curtain, get the log:

2024-12-09 21:49:35.605 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Connected; RSSI: -56 2024-12-09 21:49:35.606 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Connecting; RSSI: -81 2024-12-09 21:49:35.794 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending device info request 2024-12-09 21:49:35.794 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #1 FUN_SENDER_DEVICE_INFO 2024-12-09 21:49:35.943 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 008101300441dbdc5bcc1277c692a194a90948fb 2024-12-09 21:49:35.993 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 01c443daad6fd1c340cd0fdb7c21eb349f1eed02 2024-12-09 21:49:36.043 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 024ec4d1a0e83b3a9ecdf8bc1dc5219d579ccea4 2024-12-09 21:49:36.093 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 03f8e6e30b16d935549d17d8742002a0d413b09a 2024-12-09 21:49:36.144 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 041bff5a3a7410aabc7905747fbfd8a2e86c87a9 2024-12-09 21:49:36.193 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 05cb899a93b07e51afb2091cb6035a67dc752060 2024-12-09 21:49:36.243 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 06b8b071b3505baaaaa313b545a3236e23a69b 2024-12-09 21:49:36.243 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #1 FUN_SENDER_DEVICE_INFO, response to #1 2024-12-09 21:49:36.244 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received expected response to #1, result: 0 2024-12-09 21:49:36.244 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending pairing request 2024-12-09 21:49:36.244 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #2 FUN_SENDER_PAIR 2024-12-09 21:49:36.593 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 0021300529c783d7e3dec1a20d4d37e5d1d40760 2024-12-09 21:49:36.643 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 01f52e43f696359b52e3d7520530902941 2024-12-09 21:49:36.643 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #2 FUN_SENDER_PAIR, response to #2 2024-12-09 21:49:36.644 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Device is already paired 2024-12-09 21:49:36.644 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received expected response to #2, result: 0 2024-12-09 21:49:36.644 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Successfully connected 2024-12-09 21:49:36.646 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #3 FUN_SENDER_DEVICE_STATUS 2024-12-09 21:49:36.693 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 00213005a3331ed3a92aeafeb17986a19fe06a7c 2024-12-09 21:49:37.093 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 013224137224dbd41487ad1b23c264678d 2024-12-09 21:49:37.094 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #3 FUN_RECEIVE_TIME1_REQ 2024-12-09 21:49:37.096 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #4 FUN_RECEIVE_TIME1_REQ in response to #3 2024-12-09 21:49:37.243 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 003130055e1f9d4f4bf663da2f2570dda36c9518 2024-12-09 21:49:37.293 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 01e3badca69d026f687fdfc6529c61c2377d5edb 2024-12-09 21:49:37.344 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 0281ba62b271d2c32334729803ce 2024-12-09 21:49:37.345 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #4 FUN_RECEIVE_DP 2024-12-09 21:49:37.345 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 19, type: DT_VALUE: value: 0 2024-12-09 21:49:37.345 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:37.347 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #5 FUN_RECEIVE_DP in response to #4 2024-12-09 21:49:37.393 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 003130050a8bef4bfc429c363651e6990c78f734 2024-12-09 21:49:37.443 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 01eaaf568544b11deaea98b28c0a8094f7471270 2024-12-09 21:49:37.493 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 0272d3f38b9371ab3d97bf25e21e 2024-12-09 21:49:37.494 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #5 FUN_RECEIVE_DP 2024-12-09 21:49:37.494 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 16, type: DT_VALUE: value: 0 2024-12-09 21:49:37.494 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:37.497 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #6 FUN_RECEIVE_DP in response to #5 2024-12-09 21:49:37.543 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 00313005587704c7ea0e041276fdd7d50b0400d0 2024-12-09 21:49:37.593 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 01267ab06dc733c2d895f36e7497f651e72cbc9c 2024-12-09 21:49:37.645 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 02f2ec8d56e46e78936c9a4389d8 2024-12-09 21:49:37.645 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #6 FUN_RECEIVE_DP 2024-12-09 21:49:37.645 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 13, type: DT_VALUE: value: 0 2024-12-09 21:49:37.646 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:37.646 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #7 FUN_RECEIVE_DP in response to #6 2024-12-09 21:49:37.744 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 00313005f7e3cdc3455a0b6ea1293491cf1021ec 2024-12-09 21:49:37.843 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 01235518a1cd61c7de9dc97fb525e5af107b28ab 2024-12-09 21:49:37.843 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 0294edb8499e0008d4d2f268a191 2024-12-09 21:49:37.844 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #7 FUN_RECEIVE_DP 2024-12-09 21:49:37.844 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 18, type: DT_ENUM: value: 0 2024-12-09 21:49:37.844 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:37.848 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #8 FUN_RECEIVE_DP in response to #7 2024-12-09 21:49:37.851 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 0021300598cf3a3f3e26224a64d5eccd889cca88 2024-12-09 21:49:37.852 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 018f4b7e9f13af7fa652ed8b87903251b8 2024-12-09 21:49:37.852 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #8 FUN_SENDER_DEVICE_STATUS, response to #3 2024-12-09 21:49:37.853 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received expected response to #3, result: 0 2024-12-09 21:49:37.853 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 00513005eb3b3a3b0472b8a67201f08967a86aa4 2024-12-09 21:49:37.853 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 0198dc9788f81ae99925c20bb9fc5fcf733ffad3 2024-12-09 21:49:37.893 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 022fdb61934209f81b3b84258dde9f89c25b1d89 2024-12-09 21:49:37.945 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 03bd3d04896ebe299d686201c26ec5eb556c8071 2024-12-09 21:49:37.993 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 04eaab57013575b3 2024-12-09 21:49:37.994 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #9 FUN_RECEIVE_DP 2024-12-09 21:49:37.994 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 1, type: DT_BOOL: value: True 2024-12-09 21:49:37.995 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 2, type: DT_ENUM: value: 0 2024-12-09 21:49:37.995 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 4, type: DT_ENUM: value: 0 2024-12-09 21:49:37.995 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 7, type: DT_ENUM: value: 0 2024-12-09 21:49:37.995 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 6, type: DT_VALUE: value: 100 2024-12-09 21:49:37.995 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 5, type: DT_VALUE: value: 0 2024-12-09 21:49:37.996 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 3, type: DT_VALUE: value: 0 2024-12-09 21:49:37.996 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 8, type: DT_VALUE: value: 70 2024-12-09 21:49:37.996 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:38.008 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #9 FUN_RECEIVE_DP in response to #9 2024-12-09 21:49:40.781 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Connected; RSSI: -72 2024-12-09 21:49:41.519 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending device info request 2024-12-09 21:49:41.519 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #1 FUN_SENDER_DEVICE_INFO 2024-12-09 21:49:41.819 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 00810130046eb8a6740e75a721b98ad4250506b3 2024-12-09 21:49:41.820 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01dbd4c73c02027e58c1bad6c05e935b0fc1669d 2024-12-09 21:49:41.821 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 02f1dd0ceca41bd08461491484565027f2593b7c 2024-12-09 21:49:41.823 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 032cd8da3c7e6b24b3bc91dff6812464dcacd7be 2024-12-09 21:49:41.824 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 0494d7697b56076a708bb468f802c7a02cd2a1e1 2024-12-09 21:49:41.824 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 05125849a60f4d79208854c3a218e899cdc410b5 2024-12-09 21:49:41.824 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 061572d0c6c1cc34f9114e18bd92d1286e7fbc 2024-12-09 21:49:41.825 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #1 FUN_SENDER_DEVICE_INFO, response to #1 2024-12-09 21:49:41.826 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received expected response to #1, result: 0 2024-12-09 21:49:41.829 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending pairing request 2024-12-09 21:49:41.829 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #2 FUN_SENDER_PAIR 2024-12-09 21:49:42.270 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 002130052a35a12f4e28313f51dfc5931479ec49 2024-12-09 21:49:42.351 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01b09c3af89102b319a845974fa8108fa1 2024-12-09 21:49:42.351 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #2 FUN_SENDER_PAIR, response to #2 2024-12-09 21:49:42.351 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Device is already paired 2024-12-09 21:49:42.351 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received expected response to #2, result: 0 2024-12-09 21:49:42.352 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Successfully connected 2024-12-09 21:49:42.353 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:42.354 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #3 FUN_SENDER_DEVICE_STATUS 2024-12-09 21:49:42.419 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 00213105e88deb400963d3700be7f5dd9418357f 2024-12-09 21:49:42.420 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 0130f4d93f8f16b2746b133f6c19092635 2024-12-09 21:49:42.420 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #3 FUN_RECEIVE_TIME1_REQ 2024-12-09 21:49:42.421 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #4 FUN_RECEIVE_TIME1_REQ in response to #3 2024-12-09 21:49:42.496 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 002130053537621c69b5836713cbc66d5b9ed717 2024-12-09 21:49:42.569 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01613f00c1f177ed15790b9c6bf4a726fa 2024-12-09 21:49:42.570 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #4 FUN_SENDER_DPS, response to #3 2024-12-09 21:49:42.570 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received expected response to #3, result: 0 2024-12-09 21:49:42.644 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 003131050668c671a5ca7430fd52d910180a64f1 2024-12-09 21:49:42.719 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01155804ac68c93a29038e0cb25005ea6f0e72b3 2024-12-09 21:49:42.719 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 02a3714680cdca4ba28f67d1eac0 2024-12-09 21:49:42.720 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #5 FUN_RECEIVE_DP 2024-12-09 21:49:42.720 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 1, type: DT_ENUM: value: 2 2024-12-09 21:49:42.720 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:42.720 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:42.721 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 00313205f8e87b0987607a0b96f323d6a9479195 2024-12-09 21:49:42.721 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #5 FUN_RECEIVE_DP in response to #5 2024-12-09 21:49:42.723 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01d0d1caf49d7658425cb62f32ea4c328fba9d87 2024-12-09 21:49:42.723 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 022d2d4b696dccafcf9b65fa2223 2024-12-09 21:49:42.723 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #6 FUN_RECEIVE_DP 2024-12-09 21:49:42.723 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 3, type: DT_VALUE: value: 100 2024-12-09 21:49:42.723 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:42.723 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:42.724 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 00313005d3f9884b91ecdfac82a98bb08769998c 2024-12-09 21:49:42.725 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #6 FUN_RECEIVE_DP in response to #6 2024-12-09 21:49:42.726 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Operation already in progress, waiting for it to complete; RSSI: -72 2024-12-09 21:49:42.727 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01772d9024cb5de56ebf0f315589cc6059d456a0 2024-12-09 21:49:42.727 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 0222f2af4666ed5dfd839c809bc5 2024-12-09 21:49:42.727 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #7 FUN_RECEIVE_DP 2024-12-09 21:49:42.727 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 7, type: DT_ENUM: value: 2 2024-12-09 21:49:42.727 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:42.727 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:42.730 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #7 FUN_RECEIVE_DP in response to #7 2024-12-09 21:49:42.730 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Operation already in progress, waiting for it to complete; RSSI: -72 2024-12-09 21:49:42.796 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 0031310510ba1329f09786682869a78f54973f7b 2024-12-09 21:49:42.869 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01a1377ab13499b0b08ff05167f1b2c51488bdf6 2024-12-09 21:49:42.945 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 02b7a6c05c8b3d7c71ae3cfb47f2 2024-12-09 21:49:42.946 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #8 FUN_RECEIVE_DP 2024-12-09 21:49:42.946 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 12, type: DT_BITMAP: value: b'\x00' 2024-12-09 21:49:42.946 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:42.947 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:42.951 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #8 FUN_RECEIVE_DP in response to #8 2024-12-09 21:49:43.019 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 00313205c0094a5fee1beaab07122cc174610cc8 2024-12-09 21:49:43.020 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 013b77ff1cb1565ef9b2a0f542de022093de7b46 2024-12-09 21:49:43.023 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 02a1a89ae6845131899b8a05c427 2024-12-09 21:49:43.024 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #9 FUN_RECEIVE_DP 2024-12-09 21:49:43.024 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 13, type: DT_VALUE: value: 80 2024-12-09 21:49:43.024 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:43.025 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:43.026 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 00313305c08dd3a77f45c02ad2b8429471f0c984 2024-12-09 21:49:43.026 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 0152daab4f821b474cafc659baf1858daf1d17a2 2024-12-09 21:49:43.026 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 02555e797cf82c96a033268e4559 2024-12-09 21:49:43.027 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #10 FUN_RECEIVE_DP 2024-12-09 21:49:43.027 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 101, type: DT_ENUM: value: 0 2024-12-09 21:49:43.027 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:43.028 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:43.028 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #9 FUN_RECEIVE_DP in response to #9 2024-12-09 21:49:43.029 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #10 FUN_RECEIVE_DP in response to #10 2024-12-09 21:49:43.030 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Operation already in progress, waiting for it to complete; RSSI: -72 2024-12-09 21:49:43.030 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 003130056f82763728833b0c134cf3005978a31c 2024-12-09 21:49:43.030 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01004acd7b64bee324d93feb165e3e74931a22e4 2024-12-09 21:49:43.031 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 0289cd6b2b2489a3cff77efe04f9 2024-12-09 21:49:43.031 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #11 FUN_RECEIVE_DP 2024-12-09 21:49:43.031 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 102, type: DT_ENUM: value: 0 2024-12-09 21:49:43.031 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:43.032 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:43.036 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #11 FUN_RECEIVE_DP in response to #11 2024-12-09 21:49:43.037 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Operation already in progress, waiting for it to complete; RSSI: -72 2024-12-09 21:49:43.094 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 0031300588bc88261841b59c8c2b63799b2e6fb5 2024-12-09 21:49:43.170 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01a9955eb0b9ac35d4e8e05cbb13d415785359b9 2024-12-09 21:49:43.244 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 029f866b511857ddcf84c5404a49 2024-12-09 21:49:43.245 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #12 FUN_RECEIVE_DP 2024-12-09 21:49:43.245 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 103, type: DT_VALUE: value: 28 2024-12-09 21:49:43.245 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:43.246 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:43.247 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #12 FUN_RECEIVE_DP in response to #12 2024-12-09 21:49:43.319 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 00313005791a12c7d9fcaaac8832e5b724d175f1 2024-12-09 21:49:43.319 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01f5bc222d4d2d54d92d25e8506c5984df10fdc0 2024-12-09 21:49:43.321 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 02d1bb36ba0be0d04718be459527 2024-12-09 21:49:43.321 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #13 FUN_RECEIVE_DP 2024-12-09 21:49:43.322 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 104, type: DT_VALUE: value: 5 2024-12-09 21:49:43.322 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:43.322 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:43.322 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 00313005aed44a42e1b47f3baf217a4111ee3f13 2024-12-09 21:49:43.323 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #13 FUN_RECEIVE_DP in response to #13 2024-12-09 21:49:43.326 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 019e40091b6ab7dede79ae6464e246e5b7c82a07 2024-12-09 21:49:43.327 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 029635e9782642196a144cce72fc 2024-12-09 21:49:43.327 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #14 FUN_RECEIVE_DP 2024-12-09 21:49:43.327 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 105, type: DT_VALUE: value: 10 2024-12-09 21:49:43.327 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:43.327 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:43.327 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 003130052fa66be3de428721ab6054f8c8a5c8af 2024-12-09 21:49:43.328 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 01a525c6c0cb7f979af6626b1fd1ba295f81e634 2024-12-09 21:49:43.328 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 021927e7c0be71ab87d9a1ef1f1f 2024-12-09 21:49:43.328 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #15 FUN_RECEIVE_DP 2024-12-09 21:49:43.328 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 106, type: DT_VALUE: value: 10 2024-12-09 21:49:43.328 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:43.328 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:43.330 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #14 FUN_RECEIVE_DP in response to #14 2024-12-09 21:49:43.330 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Operation already in progress, waiting for it to complete; RSSI: -72 2024-12-09 21:49:43.331 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #15 FUN_RECEIVE_DP in response to #15 2024-12-09 21:49:43.331 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Operation already in progress, waiting for it to complete; RSSI: -72 2024-12-09 21:49:43.394 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 0031300518f6c886098c5adfa40617c6b59a9acc 2024-12-09 21:49:43.470 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 0164180947898d97614ec25e156234b327f260f8 2024-12-09 21:49:43.543 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Packet received: 02fec00dd9be3d265bb9af3d723f 2024-12-09 21:49:43.544 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received: #16 FUN_RECEIVE_DP 2024-12-09 21:49:43.544 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Received datapoint update, id: 108, type: DT_RAW: value: b'\x00\x00\x00\x00\x00\x00\x00' 2024-12-09 21:49:43.544 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:43.544 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Cortina: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoints object at 0x7f233d1d9d10> 2024-12-09 21:49:43.544 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:36:92:7B: Sending packet: #16 FUN_RECEIVE_DP in response to #16 2024-12-09 21:49:44.744 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 003130059f27bdb7c83e3e8278ad2fc59c347240 2024-12-09 21:49:44.794 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 0164076ccb6c858b2d757aaeed862f28f933d2b9 2024-12-09 21:49:44.843 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Packet received: 02c55d15ac40232ac79961b0fd65 2024-12-09 21:49:44.844 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received: #10 FUN_RECEIVE_DP 2024-12-09 21:49:44.844 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Received datapoint update, id: 8, type: DT_VALUE: value: 70 2024-12-09 21:49:44.844 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data 2024-12-09 21:49:44.847 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4F:5C:80:08: Sending packet: #10 FUN_RECEIVE_DP in response to #10

@hiagocosta
Copy link

hiagocosta commented Dec 17, 2024

I got the properties of the device inside tuya dev account, can you modify the code to working?

{
"result": {
"properties": [
{
"code": "control",
"custom_name": "",
"dp_id": 1,
"time": 1734049842831,
"type": "enum",
"value": "open"
},
{
"code": "percent_control",
"custom_name": "",
"dp_id": 2,
"time": 1734050042610,
"type": "value",
"value": 0
},
{
"code": "percent_state",
"custom_name": "",
"dp_id": 3,
"time": 1734050060899,
"type": "value",
"value": 0
},
{
"code": "work_state",
"custom_name": "",
"dp_id": 7,
"time": 1734048970012,
"type": "enum",
"value": "success"
},
{
"code": "fault",
"custom_name": "",
"dp_id": 12,
"time": 1734048970025,
"type": "bitmap",
"value": 0
},
{
"code": "battery_percentage",
"custom_name": "",
"dp_id": 13,
"time": 1734048970109,
"type": "value",
"value": 70
},
{
"code": "timer",
"custom_name": "",
"dp_id": 22,
"time": 1731647021721,
"type": "raw"
},
{
"code": "end_default",
"custom_name": "",
"dp_id": 101,
"time": 1734048970147,
"type": "enum",
"value": "left"
},
{
"code": "learning",
"custom_name": "",
"dp_id": 102,
"time": 1720666750845,
"type": "enum",
"value": "start"
},
{
"code": "temp_current",
"custom_name": "",
"dp_id": 103,
"time": 1734380270792,
"type": "value",
"value": 28
},
{
"code": "light_current",
"custom_name": "",
"dp_id": 104,
"time": 1734048970425,
"type": "value",
"value": 5
},
{
"code": "temp_set",
"custom_name": "",
"dp_id": 105,
"time": 1734050063143,
"type": "value",
"value": 60
},
{
"code": "light_set",
"custom_name": "",
"dp_id": 106,
"time": 1734050054742,
"type": "value",
"value": 90
},
{
"code": "reset",
"custom_name": "",
"dp_id": 107,
"time": 1720666750845,
"type": "enum",
"value": "reset"
},
{
"code": "pair",
"custom_name": "",
"dp_id": 108,
"time": 1734380271080,
"type": "raw",
"value": "AAAAAAAAAA=="
},
{
"code": "check",
"custom_name": "",
"dp_id": 109,
"time": 1720666750845,
"type": "enum",
"value": "check"
}
]
},
"success": true,
"t": 1734440570920,
"tid": "389fc76bbc7711efa7b102287b10c90f"
}

@pantherale0
Copy link

@hiagocosta I will give it a go for you, give me a couple of hours

@pantherale0
Copy link

Hi @hiagocosta - could you update the integration and enable debug logs again please?

I'm not 100% sure why it would be closing when the integration is setup as those DPs are the same as the blind motor, but I've improved the logging of the datapoints we do receive.

Plus it now maps to a curtain motor rather than a blind motor.

I have attempted to try and create an integration for covers only, but it seems that this integration has had so many changes and contributors over time it will take me a while to figure out what is going on.

@hiagocosta
Copy link

yeah, sure, I'm on vacation right now, but when I come back I'll do it

@cbrand
Copy link

cbrand commented Jan 1, 2025

@pantherale0 Thank you for the adjustments for the cover! I have the same motor as @hiagocosta and did play a bit with it around.

Basically the integration seems to work half way right now:

  • Can close the curtain if it is open.
  • Cannot currently open the cover (greyed out) when it is closed.
  • Does not report the curtain position (stuck at 34% and the state "opening" at the moment).
  • Does also not when I manually open or close the curtains via a slight pull report the state to HA.
Screenshot 2025-01-01 at 16 49 11

Please tell me if I can help in any way debugging it.

@pantherale0
Copy link

@cbrand thanks for testing what is working and what isn't, can you enable debug logging on the integration please and perform some tests? I'll need the logs to see what the datapoints are returning.

Ideally need some tests done from within HA (use cover.open and cover.close services), and also same tests performed from the device itself.

@cbrand
Copy link

cbrand commented Jan 1, 2025

@pantherale0 Here you go:

2025-01-01 18:34:02.990 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:02.990 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #28 FUN_SENDER_DPS
2025-01-01 18:34:03.390 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005fd0243a5e4546a2b95aa7a6a22c06c05
2025-01-01 18:34:03.390 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01a993eec21287768587c440853a8124b8
2025-01-01 18:34:03.391 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #28 FUN_SENDER_DPS, response to #28
2025-01-01 18:34:03.391 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #28, result: 0
2025-01-01 18:34:21.304 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:21.304 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #29 FUN_SENDER_DPS
2025-01-01 18:34:21.669 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 002130057c75015cb9a5290efe11deaa892e51d8
2025-01-01 18:34:21.716 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01e59bb75a40c794898b8dce7fb158dc83
2025-01-01 18:34:21.716 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #29 FUN_SENDER_DPS, response to #29
2025-01-01 18:34:21.716 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #29, result: 0
2025-01-01 18:34:21.803 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:21.803 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #30 FUN_SENDER_DPS
2025-01-01 18:34:21.951 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:21.951 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #31 FUN_SENDER_DPS
2025-01-01 18:34:22.127 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:22.127 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #32 FUN_SENDER_DPS
2025-01-01 18:34:22.282 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:22.282 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #33 FUN_SENDER_DPS
2025-01-01 18:34:22.284 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0021300526d0348c706fd94ea68834adff1f52f8
2025-01-01 18:34:22.286 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01c1027c575d86d9c58651505a151f908f
2025-01-01 18:34:22.286 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #30 FUN_SENDER_DPS, response to #30
2025-01-01 18:34:22.286 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #30, result: 0
2025-01-01 18:34:22.328 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0021300571598845ab15be996d9ea6bbc191b4c5
2025-01-01 18:34:22.329 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0131f4a378b84a96fcb95bceb8e4df80b5
2025-01-01 18:34:22.330 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #31 FUN_SENDER_DPS, response to #31
2025-01-01 18:34:22.330 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #31, result: 0
2025-01-01 18:34:22.450 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:22.450 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #34 FUN_SENDER_DPS
2025-01-01 18:34:22.608 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:22.608 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #35 FUN_SENDER_DPS
2025-01-01 18:34:22.733 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005a3219f46019533fef04717638522db15
2025-01-01 18:34:22.745 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01a12ca2cc396f545d0f9b18ded4f9ba9f
2025-01-01 18:34:22.745 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #32 FUN_SENDER_DPS, response to #32
2025-01-01 18:34:22.746 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #32, result: 0
2025-01-01 18:34:22.767 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:22.767 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #36 FUN_SENDER_DPS
2025-01-01 18:34:22.798 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005505728626182cef5f2d436ce714d64df
2025-01-01 18:34:22.811 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01757c22472b4ed01382d03738129c27f9
2025-01-01 18:34:22.811 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #33 FUN_SENDER_DPS, response to #33
2025-01-01 18:34:22.811 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #33, result: 0
2025-01-01 18:34:22.845 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005196ce5bf96bed426bff7371740e9347d
2025-01-01 18:34:22.846 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01bc9b7cbe8b59954493a4d4b62d282f0f
2025-01-01 18:34:22.847 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #34 FUN_SENDER_DPS, response to #34
2025-01-01 18:34:22.847 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #34, result: 0
2025-01-01 18:34:22.937 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:22.937 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #37 FUN_SENDER_DPS
2025-01-01 18:34:23.101 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:23.101 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #38 FUN_SENDER_DPS
2025-01-01 18:34:23.142 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0021300531530ec78ca95911b7586e21cd7f1ca1
2025-01-01 18:34:23.148 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01a1b2cfb07d97ffc9167b41356a10bc96
2025-01-01 18:34:23.148 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #35 FUN_SENDER_DPS, response to #35
2025-01-01 18:34:23.148 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #35, result: 0
2025-01-01 18:34:23.305 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005fe1642666bc79893fb2ac17a4023fb57
2025-01-01 18:34:23.323 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01a04fa7b23d6d4db54479f595af76c152
2025-01-01 18:34:23.323 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #36 FUN_SENDER_DPS, response to #36
2025-01-01 18:34:23.323 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #36, result: 0
2025-01-01 18:34:23.357 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 002130052dc5fd9ed4b32ab9b95d92c258bebfe6
2025-01-01 18:34:23.358 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0152b2d1284c0eefbd4f90dca4e0239ba5
2025-01-01 18:34:23.359 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #37 FUN_SENDER_DPS, response to #37
2025-01-01 18:34:23.359 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #37, result: 0
2025-01-01 18:34:23.516 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005d3f1442c1831c7a56c384e95a5365b17
2025-01-01 18:34:23.520 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01be2cb8f0ad6d2de742806166bac2397c
2025-01-01 18:34:23.520 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #38 FUN_SENDER_DPS, response to #38
2025-01-01 18:34:23.521 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #38, result: 0
2025-01-01 18:34:23.946 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 1, type: DT_ENUM: value: 1
2025-01-01 18:34:23.946 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #39 FUN_SENDER_DPS
2025-01-01 18:34:24.330 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0021300581058307183a8f521e6ddad2ffb04427
2025-01-01 18:34:24.331 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 018e85c9a9e454b35a9e0362c290b2fdcb
2025-01-01 18:34:24.332 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #39 FUN_SENDER_DPS, response to #39
2025-01-01 18:34:24.332 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #39, result: 0
2025-01-01 18:34:24.483 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:24.483 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #40 FUN_SENDER_DPS
2025-01-01 18:34:24.639 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:34:24.639 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #41 FUN_SENDER_DPS
2025-01-01 18:34:24.885 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005089cae3c11811c585a3ae3f7cdf7e65c
2025-01-01 18:34:24.886 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01352ec272429089f6c3b82920b2303f46
2025-01-01 18:34:24.886 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #40 FUN_SENDER_DPS, response to #40
2025-01-01 18:34:24.886 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #40, result: 0
2025-01-01 18:34:24.945 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0021300578beb7e06e803767635e28ce24c7d98e
2025-01-01 18:34:24.958 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0129dfdcca3a2bf21eee7a4a6d486a3cce
2025-01-01 18:34:24.959 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #41 FUN_SENDER_DPS, response to #41
2025-01-01 18:34:24.959 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #41, result: 0
  • First action: open_cover via home assistant. Then close_cover via home assistant. Then doing open and close on the device itself.
  • When I run on the device the open and close action I do not see any logged messages in the log. It seems to only log when I issue a command on the HA itself.

@cbrand
Copy link

cbrand commented Jan 1, 2025

1 more thing: The curtain controller also reports "learning" state. Don't know if it is relevant but for compelteness sake here is a screenshot of the devices state in my HA installation
Screenshot 2025-01-01 at 19 39 02

@pantherale0
Copy link

Thank you. Can you do the same but perhaps stop the cover once its half open please? I think DP ID 2 contains the current position (reversed, so 100=closed, 0=open), DP ID 1 is the control, my understanding leads me to believe this is the enum mapping for that datapoint:

0 | OPEN
1 | STOP
2 | CLOSE

Open and close might be the other way round though.

DP ID 3 should be the current status according to the definition provided by @hiagocosta as I can't see it reported in the debug logs

@cbrand
Copy link

cbrand commented Jan 1, 2025

Yeah it seems to me that I do not get any reports on the DP ID3 according to the logs.

The "Stop" command works however as I could stop it directly in the middle. Now "open" and "close" are greyed out in the home assistant UI. Also cover: open and cover: close seem to do nothing when executing it in Home Assistant (outside of logging that data has been sent and received).

I also restarted home assistant once to get the complete message log through:

2025-01-01 18:49:51.758 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Initializing
2025-01-01 18:49:51.758 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Retrieved: uuid: xxxxxxxxxxxxxxxx, local_key: xxxxxxxxxxxxxxxx, device_id: xxxxxxxxxxxxxxxx, category: cl, product_id: kcy0x4pi, device_name: Smart curtain robot, product_model: 本地定时, product_name: Smart curtain robot
2025-01-01 18:49:52.449 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Updating
2025-01-01 18:49:52.473 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Connecting; RSSI: -60
2025-01-01 18:50:23.549 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Connected; RSSI: -60
2025-01-01 18:50:23.721 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending device info request
2025-01-01 18:50:23.721 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #1 FUN_SENDER_DEVICE_INFO
2025-01-01 18:50:24.034 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0081013004951c7fc45e1be1ed5dcbe1c74e8e7f
2025-01-01 18:50:24.057 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0104e95d3f1ba82ac2f57cb3434c55e4f07edccf
2025-01-01 18:50:24.059 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 027632d1faa86353c5b9dae838bc9fbf3707821e
2025-01-01 18:50:24.070 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0393483e86e7c43416649d0f3213d8bc7ae3380c
2025-01-01 18:50:24.081 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0427d550645322379159678ab56e77e94772d720
2025-01-01 18:50:24.257 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 055682e644a2e500761d567a362cc6aaa73ec42b
2025-01-01 18:50:24.368 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 06fd3429dde277093b797a7f3d6f77f8c76003
2025-01-01 18:50:24.369 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #1 FUN_SENDER_DEVICE_INFO, response to #1
2025-01-01 18:50:24.369 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #1, result: 0
2025-01-01 18:50:24.369 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending pairing request
2025-01-01 18:50:24.369 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #2 FUN_SENDER_PAIR
2025-01-01 18:50:24.666 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005a6fd87ebb75b347c00cffba72ed90104
2025-01-01 18:50:24.670 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01d33f8753434631ecaf1155a798bb691a
2025-01-01 18:50:24.670 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #2 FUN_SENDER_PAIR, response to #2
2025-01-01 18:50:24.670 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Device is already paired
2025-01-01 18:50:24.670 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #2, result: 0
2025-01-01 18:50:24.670 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Successfully connected
2025-01-01 18:50:24.671 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Smart curtain robot: {}
2025-01-01 18:50:24.671 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #3 FUN_SENDER_DEVICE_STATUS
2025-01-01 18:50:24.672 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 002131057bc7f41d0edaf9cc0af8b278dbe50833
2025-01-01 18:50:24.673 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0147a2741cf6f26d3eb21c9049ddacd268
2025-01-01 18:50:24.674 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #3 FUN_RECEIVE_TIME1_REQ
2025-01-01 18:50:24.674 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #4 FUN_RECEIVE_TIME1_REQ in response to #3
2025-01-01 18:50:24.959 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005decaaf5ab51d0b2686614715837d43b9
2025-01-01 18:50:25.154 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 010f843d6425ba2b337ec7ea2d52d1fde8
2025-01-01 18:50:25.154 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #4 FUN_SENDER_DPS, response to #3
2025-01-01 18:50:25.154 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #3, result: 0
2025-01-01 18:50:25.259 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0031300592ad8220a7df383e0d737e54e19a362a
2025-01-01 18:50:25.360 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 017db6c9345bfa8ba9124d4488e3815d2b89be61
2025-01-01 18:50:25.381 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 02f4bdcf00a45f2ef07ceb216ce1
2025-01-01 18:50:25.381 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #5 FUN_RECEIVE_DP
2025-01-01 18:50:25.382 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received datapoint update, id: 1, type: DT_ENUM: value: 2
2025-01-01 18:50:25.382 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
2025-01-01 18:50:25.382 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Smart curtain robot: {1: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x7265371aa7b0>}
2025-01-01 18:50:25.382 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #5 FUN_RECEIVE_DP in response to #5
2025-01-01 18:50:25.384 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00313105e90ddebffe3617e1fd66388ac68826c0
2025-01-01 18:50:25.390 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01dbedf5c543f0087c6da3d3cda1c5d4dfdf747d
2025-01-01 18:50:25.391 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 029008819fc88294f3723fc00ebf
2025-01-01 18:50:25.392 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #6 FUN_RECEIVE_DP
2025-01-01 18:50:25.392 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received datapoint update, id: 3, type: DT_VALUE: value: 100
2025-01-01 18:50:25.392 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
2025-01-01 18:50:25.392 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Smart curtain robot: {1: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x7265371aa7b0>, 3: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652e62de50>}
2025-01-01 18:50:25.393 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #6 FUN_RECEIVE_DP in response to #6
2025-01-01 18:50:25.415 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 003132052392886ce7abf3fadee7cac1e8dbc02c
2025-01-01 18:50:25.564 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01f3ba3a9f1b6c0727f5cb1e1e81777b82bf253a
2025-01-01 18:50:25.573 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 020f873daf2b4550e40ebd79edd8
2025-01-01 18:50:25.573 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #7 FUN_RECEIVE_DP
2025-01-01 18:50:25.574 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received datapoint update, id: 7, type: DT_ENUM: value: 2
2025-01-01 18:50:25.574 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
2025-01-01 18:50:25.574 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Smart curtain robot: {1: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x7265371aa7b0>, 3: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652e62de50>, 7: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652e62e490>}
2025-01-01 18:50:25.574 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #7 FUN_RECEIVE_DP in response to #7
2025-01-01 18:50:25.582 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00313305f3333c6f7ab747782292efe200bdc96b
2025-01-01 18:50:25.595 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0121290198e256dfaacdbc96a985df428dc470c8
2025-01-01 18:50:25.669 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 02a5074d671721912dbd03fb62a1
2025-01-01 18:50:25.669 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #8 FUN_RECEIVE_DP
2025-01-01 18:50:25.669 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received datapoint update, id: 12, type: DT_BITMAP: value: b'\x00'
2025-01-01 18:50:25.669 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
2025-01-01 18:50:25.670 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Smart curtain robot: {1: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x7265371aa7b0>, 3: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652e62de50>, 7: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652e62e490>, 12: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652ff5f360>}
2025-01-01 18:50:25.670 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #8 FUN_RECEIVE_DP in response to #8
2025-01-01 18:50:25.691 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00313405b59ad9eec4cb6bc222baf77cbf7ef3f6
2025-01-01 18:50:25.698 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01eb35a86ba099ef83d3ce2493f7424ed3fe6cab
2025-01-01 18:50:25.705 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 02585036951106fbbc67f980f70b
2025-01-01 18:50:25.705 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #9 FUN_RECEIVE_DP
2025-01-01 18:50:25.705 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received datapoint update, id: 13, type: DT_VALUE: value: 100
2025-01-01 18:50:25.705 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
2025-01-01 18:50:25.705 DEBUG (MainThread) [custom_components.tuya_ble.cover] Updated data for Smart curtain robot: {1: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x7265371aa7b0>, 3: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652e62de50>, 7: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652e62e490>, 12: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652ff5f360>, 13: <custom_components.tuya_ble.tuya_ble.tuya_ble.TuyaBLEDataPoint object at 0x72652ffec180>}
2025-01-01 18:50:25.706 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #9 FUN_RECEIVE_DP in response to #9
2025-01-01 18:50:25.707 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0031350530d36ef8a664f1e1a16dce478cb6707b
2025-01-01 18:50:25.714 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0123ece6d3b3c7f0de51d1f3414c7accea0f5fa8
2025-01-01 18:50:25.876 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 02672ec906405529ad7c7353edba
  File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 1286, in _notification_handler
  File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 1205, in _parse_input
custom_components.tuya_ble.tuya_ble.exceptions.TuyaBLEDataCRCError: Incoming packet has invalid CRC
2025-01-01 18:50:25.896 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Device unexpectedly disconnected; RSSI: -60
2025-01-01 18:50:25.896 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Scheduling reconnect; RSSI: -60
2025-01-01 18:50:25.897 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Reconnect, ensuring connection
2025-01-01 18:50:25.907 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Connecting; RSSI: -60
2025-01-01 18:51:23.422 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Connected; RSSI: -59
2025-01-01 18:51:23.522 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending device info request
2025-01-01 18:51:23.523 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #1 FUN_SENDER_DEVICE_INFO
2025-01-01 18:51:23.860 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00810130047a8553715998fc5441e32c94dbcbe7
2025-01-01 18:51:23.865 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0127e4d1b5a36f51a30e9ac829067dcd3cf4134e
2025-01-01 18:51:23.865 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 02827c4a2837f3055e2f3367352b295109915488
2025-01-01 18:51:23.866 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 03016f2066bc59fe9d72807c0c75a88883e1fd2c
2025-01-01 18:51:23.969 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 04c868576656964df56b85ae5fa8b57827a4faf2
2025-01-01 18:51:23.972 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 05816461ebf76b0a0386629abfa3db79f2abbaab
2025-01-01 18:51:24.038 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 06ddf87dfa857713883f92af9e9ba683fdbd1f
2025-01-01 18:51:24.039 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #1 FUN_SENDER_DEVICE_INFO, response to #1
2025-01-01 18:51:24.039 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #1, result: 0
2025-01-01 18:51:24.039 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending pairing request
2025-01-01 18:51:24.039 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #2 FUN_SENDER_PAIR
2025-01-01 18:51:24.374 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 002130058967ed5359cfa14d5050a402cdd6d09f
2025-01-01 18:51:24.376 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01b75be0c58f8b0c95317dbda27bc29ce3
2025-01-01 18:51:24.376 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #2 FUN_SENDER_PAIR, response to #2
2025-01-01 18:51:24.376 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Device is already paired
2025-01-01 18:51:24.376 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #2, result: 0
2025-01-01 18:51:24.376 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Successfully connected
2025-01-01 18:51:24.376 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Reconnect, connection ensured
2025-01-01 18:51:24.389 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0021310504115cc0fa3dfd70ec10559eee01b123
2025-01-01 18:51:24.390 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0189e37024bc58ab6f11079805668feb22
2025-01-01 18:51:24.390 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #3 FUN_RECEIVE_TIME1_REQ
2025-01-01 18:51:24.391 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #3 FUN_RECEIVE_TIME1_REQ in response to #3
2025-01-01 18:57:00.745 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 0
2025-01-01 18:57:00.746 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #4 FUN_SENDER_DPS
2025-01-01 18:57:01.040 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 002130059ca351fe0b206aa4b69e8987496d4f50
2025-01-01 18:57:01.072 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01afc82e4e7b7b6b7535d8788d4386b6e2
2025-01-01 18:57:01.073 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #4 FUN_SENDER_DPS, response to #4
2025-01-01 18:57:01.073 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #4, result: 0
2025-01-01 18:57:09.296 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 1, type: DT_ENUM: value: 1
2025-01-01 18:57:09.296 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #5 FUN_SENDER_DPS
2025-01-01 18:57:09.769 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005f11d058b6aaf2417d173393d94f9c514
2025-01-01 18:57:09.773 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01ab5cabc7dfd4573eaf05d489c3a619d7
2025-01-01 18:57:09.774 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #5 FUN_SENDER_DPS, response to #5
2025-01-01 18:57:09.774 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #5, result: 0
2025-01-01 18:57:12.369 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 1, type: DT_ENUM: value: 1
2025-01-01 18:57:12.369 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #6 FUN_SENDER_DPS
2025-01-01 18:57:12.819 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005f822ad28a6b85f965c177fc0cc7c366f
2025-01-01 18:57:12.820 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 01ad3eed21b9df36524e90e06411a3b53f
2025-01-01 18:57:12.820 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #6 FUN_SENDER_DPS, response to #6
2025-01-01 18:57:12.820 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #6, result: 0
2025-01-01 18:57:18.133 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 1, type: DT_ENUM: value: 1
2025-01-01 18:57:18.134 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #7 FUN_SENDER_DPS
2025-01-01 18:57:18.497 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0021300588186fcfc3f86dcdfe016f7dc46fd477
2025-01-01 18:57:18.546 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 019158b5ba7ff15752e5464394ca4267a2
2025-01-01 18:57:18.546 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #7 FUN_SENDER_DPS, response to #7
2025-01-01 18:57:18.547 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #7, result: 0
2025-01-01 18:57:25.958 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 1, type: DT_ENUM: value: 1
2025-01-01 18:57:25.958 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #8 FUN_SENDER_DPS
2025-01-01 18:57:26.238 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 002130057f559ae96dc29acf8b73605788af4b78
2025-01-01 18:57:26.243 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0181b79d3720f672a15eb458887ed043c1
2025-01-01 18:57:26.244 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #8 FUN_SENDER_DPS, response to #8
2025-01-01 18:57:26.244 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #8, result: 0
2025-01-01 18:59:30.891 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 0
2025-01-01 18:59:30.891 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #9 FUN_SENDER_DPS
2025-01-01 18:59:31.100 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005ef54f12f070f8eb0d723f16851c470a6
2025-01-01 18:59:31.199 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 016eb8c017113e0cf1b41017bd8abcf908
2025-01-01 18:59:31.199 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #9 FUN_SENDER_DPS, response to #9
2025-01-01 18:59:31.199 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #9, result: 0
2025-01-01 18:59:36.891 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending datapoint update, id: 2, type: DT_VALUE: value: 100
2025-01-01 18:59:36.891 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending packet: #10 FUN_SENDER_DPS
2025-01-01 18:59:37.343 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 00213005b8cf8924751582233d110612b344b102
2025-01-01 18:59:37.405 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Packet received: 0184017b971d38ceaa33ffad07c2a13f3e
2025-01-01 18:59:37.405 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received: #10 FUN_SENDER_DPS, response to #10
2025-01-01 18:59:37.405 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Received expected response to #10, result: 0

@cbrand
Copy link

cbrand commented Jan 1, 2025

Hm okay with your hint I could get a bit further and testing that stop works.
It seems like setting the position on these robots does not always work or just in specific circumstances and the code here:
https://github.com/pantherale0/ha_tuya_ble/blob/main/custom_components/tuya_ble/cover.py#L173

and here: https://github.com/pantherale0/ha_tuya_ble/blob/main/custom_components/tuya_ble/cover.py#L192
Uses to set dp 2 to the expected position.

I adjusted the code base very hacky and now I can relyably trigger open and close and also do get DP updates for id 3.
It just seems like my robot does not really like updating anything on id 2 (or only in very specific circumstances).

    async def async_open_cover(self, **kwargs) -> None:
        """Open a cover."""
        await self.async_set_cover_position(position=100)
        datapoint = self._device.datapoints.get_or_create(
            self._mapping.cover_state_dp_id,
            TuyaBLEDataPointType.DT_VALUE,
            0,
        )
        if datapoint:
            self._hass.create_task(datapoint.set_value(0))
        # sometimes the device does not update DP 1 so force the current state
        if self._attr_current_cover_position != 100:
            self._attr_is_opening = True
            self.async_write_ha_state()

    async def async_stop_cover(self, **kwargs: logging.Any) -> None:
        """Stop a cover."""
        if self._mapping.cover_state_dp_id != 0:
            datapoint = self._device.datapoints.get_or_create(
                self._mapping.cover_state_dp_id,
                TuyaBLEDataPointType.DT_VALUE,
                1,
            )
            if datapoint:
                self._hass.create_task(datapoint.set_value(1))

    async def async_close_cover(self, **kwargs) -> None:
        """Set new target temperature."""
        await self.async_set_cover_position(position=0)
        datapoint = self._device.datapoints.get_or_create(
            self._mapping.cover_state_dp_id,
            TuyaBLEDataPointType.DT_VALUE,
            2,
        )
        if datapoint:
            self._hass.create_task(datapoint.set_value(2))
        # sometimes the device does not update DP 1 so force the current state
        if self._attr_current_cover_position != 0:
            self._attr_is_closing = True
            self.async_write_ha_state()

But I can say that you are right that DP1 is set as you described:

  • Value 0 = Open
  • Value 1 = Stop
  • Value 2 = Close

The question for me is if the other curtain controllers also can "just" take the state set on dp1 which would allow using only the cover_state_dp_id to trigger the updates.

@pantherale0
Copy link

Hmmm very interesting, whereas my blind controller doesn't seem to do anything when I update DP 1 lol... Tuya devices certainly have their quirks lol.

I will "hack" around with my blind controller a bit more and see what happens.

@cbrand
Copy link

cbrand commented Jan 1, 2025

The plot thickens.. It works till the library throws an invalid data length error and then I presume no new notifications are being consumed at all till I restart home assistant completely.

If I add a generic exception handler in the main ble library and just issue a log error it works continuously.

I fork your version and do the adjustments I did / open a PR. I can confirm that the changes work on the cover manager. The exception handler seems to then allow to bypass (transmission?) errors.

@cbrand
Copy link

cbrand commented Jan 1, 2025

With the error handler in place the robot also works with set_cover_pos. It seems to be some transfer issue. However, the status update still does not quite work as the state update does keep the state on "opening" or "closing" and not on "open" or "closed".

The error handler which I would recommend to add anyhow is here: pantherale0#1
The (tested) compatibility with the curtain robot can be found here: pantherale0#2

@pantherale0
Copy link

Ok merged in, I'm going to test againt my blinds as they didn't respond when using DP 1 so may have to change the config a bit to account for that. I'll pick these changes into my preview branch too.

https://github.com/pantherale0/ha_tuya_ble/tree/preview

@cbrand
Copy link

cbrand commented Jan 2, 2025

I did today had a bit more time to debug the behavior of the robot and could trigger the issue of the robot not doing anything after sending a command.
It turns out that the robot sometimes needs a manual data update request when triggering changes. This is why I added a "watchdog" to the cover implementation which manually asks for a data update if none has been reported a second after the curtain robot should have opened or closed.

This change is in: pantherale0#5

Also I did some refactorings on the code base and fixed a state reporting issue which can be found here:
https://github.com/pantherale0/ha_tuya_ble/pull/4/files

It seems after playing half an hour around with opening / closing the cover and setting the position to a specific percentage degree that I cannot reproduce this "deadlock" anymore with the changes in the two PRs.

@pantherale0
Copy link

Gotten round to testing this out finally.. Unfortunately it does not work on my controller (AM-43-0.45/40-ES-EB).

Set position works, so will have to make some more adjustments to work with both...

Damn I hate Tuya devices hahaha

@pantherale0
Copy link

Finally got round to looking at this again - suddenly it started working while I was testing.. But the connection isn't overly stable.. It will do for me though because I don't plan to buy another Tuya BLE device again - this experience has been awful.

Image

@cbrand
Copy link

cbrand commented Jan 18, 2025

@pantherale0 Yeah that really requires a lot of unintuitive debugging from the device side which does not really make it easy to integrate. The amount of "hacks" added to get my motor running with refetching data etc. does not give me the biggest comfort on it either.

Anyway thank you so much for providing the code base for the covers even though the experience is not that great. Without your work I guess I would not have window curtains which can be integrated into home assistant now. So I really appreciate the work!

@pantherale0
Copy link

No problem, it all started when I thought I brought a zigbee blind controller lol.

I understand why forks come and go with this integration though - a lot of code and exactly like you say, very difficult to debug / get working cleanly.

I've tried to update my fork with some of the PRs from different forks in case there are folks who need features from one and the other.

@hiagocosta
Copy link

hi guys, I came back.
I have the same ideas, I'll never buy anymore bluetooth devices, even with tuya gateway, sometimes it does not respond to commands unfortunately...
but any progress made for this to work at least for open and close is very helpful for who cannot change this device, my country elevated the taxes for buying things from china or other countries, and we have to use as is, even with the bugs lol

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

5 participants