Comments (8)
Hi,
First of all, more info from log is required to resolve the error. It could be just an issue caused by the range of your BT adapter, but could be something else.
I need also, product_id and product_name, list of device's datapoints from "Device Debug" page (name and properties of each) and most important IDs of these datapoints. Here is described how to obtain IDs:
from ha_tuya_ble.
Hi,
Thanks so much for your prompt reply.
For the log, those are all pretty much everything, it repeats until it failed. The device is in the same room as HA.
2023-05-09 21:04:14.722 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending device info request failed
2023-05-09 21:05:14.765 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: timeout receiving response, RSSI: None
2023-05-09 21:05:14.771 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending device info request failed
2023-05-09 21:06:14.818 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: timeout receiving response, RSSI: None
2023-05-09 21:06:14.825 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Sending device info request failed
2023-05-09 21:06:14.831 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] XX:XX:XX:XX:XX:XX: Connecting, all attempts failed; RSSI: None
2023-05-09 21:06:14.837 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Smart Water Timer 2F1205 for tuya_ble
File "/config/custom_components/tuya_ble/init.py", line 44, in async_setup_entry
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 272, in initialize
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 312, in update
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 843, in _send_packet
File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 588, in _ensure_connected
product_id: nxquc5lb
product_name: "Smart Water Timer"
DataPoints:
1 - Valve Switch
7 - Battery Level
There are other non important dp such as Cycle Timer, Weather Delay, etc..., but i dont think we care at this point, do we?
from ha_tuya_ble.
i'm happy to report that with your pointers, i was able to copy/paste your codes to make it work for me, the switch and the battery.
however, i do see this in the log, presuming that the device get disconnected when sleep?
[custom_components.tuya_ble.tuya_ble.tuya_ble] {MACID}: Device unexpectedly disconnected; RSSI: -80
and sometimes i see this in HA logs:
home-assistant | 2023-05-11 00:12:33.027 ERROR (MainThread) [root] A message handler raised an exception: 32789 is not a valid TuyaBLECode.
home-assistant | Traceback (most recent call last):
home-assistant | File "src/dbus_fast/message_bus.py", line 811, in dbus_fast.message_bus.BaseMessageBus._process_message
home-assistant | File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 874, in _parse_msg
home-assistant | on_value_changed(message.path, self_interface["Value"])
home-assistant | File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 172, in on_value_changed
home-assistant | callback(bytearray(value))
home-assistant | File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 1284, in _notification_handler
home-assistant | self._parse_input()
home-assistant | File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 1205, in _parse_input
home-assistant | code: TuyaBLECode = TuyaBLECode(_code)
home-assistant | File "/usr/local/lib/python3.10/enum.py", line 385, in call
home-assistant | return cls.new(cls, value)
home-assistant | File "/usr/local/lib/python3.10/enum.py", line 710, in new
home-assistant | raise ve_exc
home-assistant | ValueError: 32789 is not a valid TuyaBLECode
from ha_tuya_ble.
About first error. I still haven't decided what is the true reason of such disconnects. If one BT device is placed near to BT adapter, disconnects is quite seldom. More devices and longer range produces more disconnects.
A second error means that the device has sent a message which is not described in the documentation. Could you please collect more logging before this error?
from ha_tuya_ble.
So, i've enabled debug and knock on woods, haven't seen the disconnect error.
Here is my entire log after i started the integration over from scratch. Looks like the error occured after DP 17, which is "Timer". Although the next time when DP 17 is updated, there is no error.
** update: i'm sorry, the # sign from the log inadvertenly referenced every single Issue. I dont know how to fix it. I apologize.
18:25:22.469 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Successful login for [email protected]
18:25:22.482 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Retrieved: uuid: xxxxxxxxxxxxxxxx, local_key: xxxxxxxxxxxxxxxx, device_id: xxxxxxxxxxxxxxxx, category: sfkzq, product_id: nxquc5lb, device_name: Smart Water Timer, product_model: SOP10, product_name: Smart Water Timer
18:25:29.027 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Retrieved: uuid: xxxxxxxxxxxxxxxx, local_key: xxxxxxxxxxxxxxxx, device_id: xxxxxxxxxxxxxxxx, category: sfkzq, product_id: nxquc5lb, device_name: Smart Water Timer, product_model: SOP10, product_name: Smart Water Timer
18:25:29.028 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Retrieved: uuid: xxxxxxxxxxxxxxxx, local_key: xxxxxxxxxxxxxxxx, device_id: xxxxxxxxxxxxxxxx, category: sfkzq, product_id: nxquc5lb, device_name: Smart Water Timer, product_model: SOP10, product_name: Smart Water Timer
18:25:29.043 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Initializing
18:25:29.044 DEBUG (MainThread) [custom_components.tuya_ble.cloud] Retrieved: uuid: xxxxxxxxxxxxxxxx, local_key: xxxxxxxxxxxxxxxx, device_id: xxxxxxxxxxxxxxxx, category: sfkzq, product_id: nxquc5lb, device_name: Smart Water Timer, product_model: SOP10, product_name: Smart Water Timer
18:25:29.044 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Updating
18:25:29.058 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Connecting; RSSI: None
18:25:34.394 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Connected; RSSI: None
18:25:35.457 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending device info request
18:25:35.458 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 1 FUN_SENDER_DEVICE_INFO
18:25:35.761 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 1 FUN_SENDER_DEVICE_INFO, response to # 1
18:25:35.761 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received expected response to # 1, result: 0
18:25:35.763 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending pairing request
18:25:35.763 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 2 FUN_SENDER_PAIR
18:25:35.981 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 2 FUN_SENDER_PAIR, response to # 2
18:25:35.982 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Device is already paired
18:25:35.983 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received expected response to # 2, result: 0
18:25:35.986 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Successfully connected
18:25:35.987 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 3 FUN_SENDER_DEVICE_STATUS
18:25:35.991 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 3 FUN_RECEIVE_TIME1_REQ
18:25:35.993 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 4 FUN_RECEIVE_TIME1_REQ in response to # 3
18:25:35.996 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: None
18:25:36.208 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 4 FUN_SENDER_DPS, response to # 3
18:25:36.209 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received expected response to # 3, result: 0
18:25:36.212 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Updating
18:25:36.212 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 5 FUN_SENDER_DEVICE_STATUS
18:25:36.287 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 5 FUN_RECEIVE_DP
18:25:36.288 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 1, type: DT_BOOL: value: False
18:25:36.289 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.292 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 6 FUN_RECEIVE_DP
18:25:36.293 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 12, type: DT_ENUM: value: 2
18:25:36.294 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.297 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 6 FUN_RECEIVE_DP in response to # 5
18:25:36.300 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 7 FUN_RECEIVE_DP in response to # 6
18:25:36.302 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: None
18:25:36.312 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 7 FUN_RECEIVE_DP
18:25:36.312 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 7, type: DT_VALUE: value: 49
18:25:36.313 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.315 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 8 FUN_RECEIVE_DP in response to # 7
18:25:36.316 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: None
18:25:36.353 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 8 FUN_RECEIVE_DP
18:25:36.354 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 9, type: DT_VALUE: value: 139993
18:25:36.354 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.357 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 9 FUN_RECEIVE_DP in response to # 8
18:25:36.359 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: None
18:25:36.428 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 9 FUN_RECEIVE_DP
18:25:36.428 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 10, type: DT_ENUM: value: 0
18:25:36.429 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.430 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 10 FUN_RECEIVE_DP in response to # 9
18:25:36.507 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 10 FUN_RECEIVE_DP
18:25:36.508 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 12, type: DT_ENUM: value: 2
18:25:36.509 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.517 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 11 FUN_RECEIVE_DP
18:25:36.518 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 14, type: DT_BOOL: value: False
18:25:36.519 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.522 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 12 FUN_RECEIVE_DP
18:25:36.523 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 16, type: DT_RAW: value: b'\x00'
18:25:36.523 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.525 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 11 FUN_RECEIVE_DP in response to # 10
18:25:36.529 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 12 FUN_RECEIVE_DP in response to # 11
18:25:36.531 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: None
18:25:36.532 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 13 FUN_RECEIVE_DP in response to # 12
18:25:36.534 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: None
18:25:36.589 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 13 FUN_RECEIVE_DP
18:25:36.591 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 17, type: DT_RAW: value: b'\x00\x00\x01h\x00\x1e\x7fd\x00\x00\x00\x00\x00\x00'
18:25:36.592 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.633 ERROR (MainThread) [root] A message handler raised an exception: 32789 is not a valid TuyaBLECode.
home-assistant | Traceback (most recent call last):
home-assistant | File "src/dbus_fast/message_bus.py", line 811, in dbus_fast.message_bus.BaseMessageBus._process_message
home-assistant | File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py", line 874, in _parse_msg
home-assistant | on_value_changed(message.path, self_interface["Value"])
home-assistant | File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 172, in on_value_changed
home-assistant | callback(bytearray(value))
home-assistant | File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 1284, in _notification_handler
home-assistant | self._parse_input()
home-assistant | File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 1205, in _parse_input
home-assistant | code: TuyaBLECode = TuyaBLECode(_code)
home-assistant | File "/usr/local/lib/python3.10/enum.py", line 385, in call
home-assistant | return cls.new(cls, value)
home-assistant | File "/usr/local/lib/python3.10/enum.py", line 710, in new
home-assistant | raise ve_exc
home-assistant | ValueError: 32789 is not a valid TuyaBLECode
home-assistant |
18:25:36.642 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 15 FUN_SENDER_DPS, response to # 5
18:25:36.643 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received expected response to # 5, result: 0
18:25:36.644 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 16 FUN_RECEIVE_DP
18:25:36.645 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 1, type: DT_BOOL: value: False
18:25:36.645 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.646 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 17 FUN_RECEIVE_DP
18:25:36.646 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 12, type: DT_ENUM: value: 2
18:25:36.647 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.648 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 14 FUN_RECEIVE_DP in response to # 13
18:25:36.649 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: None
18:25:36.649 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 15 FUN_RECEIVE_DP in response to # 16
18:25:36.650 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: None
18:25:36.651 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 16 FUN_RECEIVE_DP in response to # 17
18:25:36.655 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: None
18:25:36.659 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 18 FUN_RECEIVE_DP
18:25:36.659 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 7, type: DT_VALUE: value: 49
18:25:36.660 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.662 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 19 FUN_RECEIVE_DP
18:25:36.662 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 9, type: DT_VALUE: value: 139993
18:25:36.662 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.664 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 20 FUN_RECEIVE_DP
18:25:36.664 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 10, type: DT_ENUM: value: 0
18:25:36.665 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.780 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 17 FUN_RECEIVE_DP in response to # 18
18:25:36.781 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: -68
18:25:36.782 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 18 FUN_RECEIVE_DP in response to # 19
18:25:36.783 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: -68
18:25:36.783 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 19 FUN_RECEIVE_DP in response to # 20
18:25:36.784 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: -68
18:25:36.825 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 21 FUN_RECEIVE_DP
18:25:36.826 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 12, type: DT_ENUM: value: 2
18:25:36.826 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.834 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 20 FUN_RECEIVE_DP in response to # 21
18:25:36.835 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: -68
18:25:36.879 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 22 FUN_RECEIVE_DP
18:25:36.879 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 14, type: DT_BOOL: value: False
18:25:36.880 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.881 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 21 FUN_RECEIVE_DP in response to # 22
18:25:36.881 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: -68
18:25:36.956 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 23 FUN_RECEIVE_DP
18:25:36.956 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 16, type: DT_RAW: value: b'\x00'
18:25:36.956 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.962 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received: # 24 FUN_RECEIVE_DP
18:25:36.962 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Received datapoint update, id: 17, type: DT_RAW: value: b'\x00\x00\x01h\x00\x1e\x7fd\x00\x00\x00\x00\x00\x00'
18:25:36.962 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
18:25:36.969 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 22 FUN_RECEIVE_DP in response to # 23
18:25:36.971 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Sending packet: # 23 FUN_RECEIVE_DP in response to # 24
18:25:36.972 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] [Mac-Addr]: Operation already in progress, waiting for it to complete; RSSI: -68
from ha_tuya_ble.
upgraded HA to 23.5.3 and esphome 2023.5.1 for proxy and the issue seems to go away for a couple of days already, so i will close the issue. thanks so much for your help and your work.
from ha_tuya_ble.
@kaizday Could you share your code changes you did to integrate the Smart Water Valve. I have also one of them in use and would like to integrate it into my home assistant.
from ha_tuya_ble.
@kaizday Could you share your code changes you did to integrate the Smart Water Valve. I have also one of them in use and would like to integrate it into my home assistant.
Hello. What i did was to modify at least 2 files, devices.py (devices database) and the switch.py to add the valve switch. You can also modify sensor.py to read other values such as battery level.
devices.py - prepend to line 156
"sfkzq": TuyaBLECategoryInfo(
products={
"nxquc5lb": # device product_id
TuyaBLEProductInfo(
name="Smart Water Timer",
),
},
),
switch.py - prepend to mapping in line 78
"sfkzq": TuyaBLECategorySwitchMapping(
products={
"nxquc5lb": # Smart Water Timer
[
TuyaBLESwitchMapping(
dp_id=1,
description=SwitchEntityDescription(
key="water_valve",
),
),
]
}
),
Good luck.
from ha_tuya_ble.
Related Issues (20)
- Support for BLE Temperature and Humidity Sensor PT216 & PT19DB-2
- Error after updating to Home Assistant 2024.2.0 update HOT 40
- Is there anybody who can merge the Pull requests?? HOT 5
- Will This work with a ESPHome Bluetooth Proxy, or does it need to connect to the Bluetooth radio on my device running home assistant? HOT 1
- How to setup this integration? HOT 3
- installation issue HOT 1
- Possible error in _handle_command_or_response()
- Device is not registered in Tuya cloud HOT 9
- Not working after update to 2024.4.0 HOT 6
- Not working: "requirements": ["tuya-iot-py-sdk==0.6.6", "pycountry>23.0.0"], HOT 11
- Error Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble HOT 11
- Question: Determine if a Fingerbot action actually completed HOT 2
- Update to tuya_sharing SDK HOT 1
- Can you please add the smart curtain robots HOT 3
- Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble HOT 3
- Error integration HOT 1
- Setup Account and Password HOT 1
- Tuya Protocol 3.4 for TH05 Support
- SGS01 (gvygg3m8) exposes soil moisture as humidity HOT 1
- Support for Divoo WT-03W
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha_tuya_ble.