Comments (9)
Hey, I have the same device and manged to get it working. Was quite easy, thanks to the great code base.
Here is the PR
#40
cheers
from ha_tuya_ble.
HA discover the device with tuya integration, but there are no entities available
from ha_tuya_ble.
Hi, does integration discover the device? If no, most of all, the device is not BLE but Bluetooth Mesh.
from ha_tuya_ble.
I am not sure. Still waiting for the device. Should be here tomorrow.
No information so far if BLE or BLE mesh
from ha_tuya_ble.
Great, it could be integrated. Next step is to define mapping from Tuya datapoints to HA entities.
Next information is needed:
- category, product_id, product_name. These values could be found in /config/.storage/core.config_entries file or in output of https://github.com/redphx/tuya-local-key-extractor
- Names and descriptions of datapoints. It could be obtained on "Device Debugging" page of your "Tuya Cloud Project". Please provide it in format like this:
work_mode | Enum | {"range": ["white","colour","scene","music"]}
- IDs of all datapoints. Here is an instruction how to obtain it https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html . Retrive please IDs of all datapoints, even if it is not listed in previous item of the list.
- Part of log produced by your device, like this:
2023-05-11 20:09:28.568 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:AC:71:AE: Received datapoint update, id: 2, type: DT_BOOL: value: True
2023-05-11 20:09:28.568 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:AC:71:AE: Received datapoint update, id: 8, type: DT_ENUM: value: 0
2023-05-11 20:09:28.568 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:AC:71:AE: Received datapoint update, id: 9, type: DT_VALUE: value: 75
2023-05-11 20:09:28.568 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:AC:71:AE: Received datapoint update, id: 10, type: DT_VALUE: value: 0
2023-05-11 20:09:28.568 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:AC:71:AE: Received datapoint update, id: 11, type: DT_ENUM: value: 1
2023-05-11 20:09:28.568 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:AC:71:AE: Received datapoint update, id: 15, type: DT_VALUE: value: 0
2023-05-11 20:09:28.568 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:AC:71:AE: Received datapoint update, id: 12, type: DT_VALUE: value: 70
2023-05-11 20:09:28.568 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:AC:71:AE: Received datapoint update, id: 101, type: DT_BOOL: value: False
2023-05-11 20:09:28.568 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:AC:71:AE: Received datapoint update, id: 17, type: DT_BOOL: value: True
It's a way to obtain information about datapoints types
Sorry for so many items :)
from ha_tuya_ble.
@PlusPlus-ua Actually, there is one issue remaining. I have two of those device. First one works like a charm, but I keep failing connecting my second device. Somehow, no BT connection can be established even though the device is right next to the RPi running HA. These are the logs I typically get:
2023-07-01 09:19:32.518 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Connected; RSSI: None
2023-07-01 09:19:32.520 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Connecting; RSSI: None
2023-07-01 09:19:32.526 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Connected; RSSI: None
2023-07-01 09:19:32.893 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending device info request
2023-07-01 09:19:32.893 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending packet: #1 FUN_SENDER_DEVICE_INFO
2023-07-01 09:19:32.898 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending device info request
2023-07-01 09:19:32.899 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending packet: #1 FUN_SENDER_DEVICE_INFO
2023-07-01 09:20:02.556 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Device unexpectedly disconnected; RSSI: None
2023-07-01 09:20:02.561 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Device unexpectedly disconnected; RSSI: None
2023-07-01 09:20:16.389 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:2B:82: Packet received: 00313005841d36b3eb97230eb2b23e92dbdfce64
2023-07-01 09:20:16.390 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:2B:82: Packet received: 016e8e21202f8475073a668560fc1da14cc54a9f
2023-07-01 09:20:16.394 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:2B:82: Packet received: 0257c59d31d41e9065722d34c85c
2023-07-01 09:20:16.395 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:2B:82: Received: #193 FUN_RECEIVE_DP
2023-07-01 09:20:16.396 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:2B:82: Received datapoint update, id: 11, type: DT_VALUE: value: 90
2023-07-01 09:20:16.396 DEBUG (MainThread) [custom_components.tuya_ble.devices] Manually updated tuya_ble data
2023-07-01 09:20:16.399 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:2B:82: Sending packet: #193 FUN_RECEIVE_DP in response to #193
2023-07-01 09:20:32.914 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: timeout receiving response, RSSI: None
2023-07-01 09:20:32.918 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending device info request failed
2023-07-01 09:20:32.923 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Connecting; RSSI: None
2023-07-01 09:20:32.926 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: timeout receiving response, RSSI: None
2023-07-01 09:20:32.930 ERROR (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending device info request failed
2023-07-01 09:20:41.031 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Connected; RSSI: None
2023-07-01 09:20:41.034 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Connecting; RSSI: None
2023-07-01 09:20:41.042 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Connected; RSSI: None
2023-07-01 09:20:41.444 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending device info request
2023-07-01 09:20:41.444 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending packet: #2 FUN_SENDER_DEVICE_INFO
2023-07-01 09:20:41.448 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending device info request
2023-07-01 09:20:41.449 DEBUG (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Sending packet: #2 FUN_SENDER_DEVICE_INFO
2023-07-01 09:21:11.069 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Device unexpectedly disconnected; RSSI: None
2023-07-01 09:21:11.074 WARNING (MainThread) [custom_components.tuya_ble.tuya_ble.tuya_ble] DC:23:4D:D1:54:AE: Device unexpectedly disconnected; RSSI: None
... 54:AE is the problematic device
Do you have any idea? Strange thing it keeps trying to connect even though in the UI I aborted and dont see the faulty device anywhere.
Cheers,
SanMiggel
from ha_tuya_ble.
Hi @SanMiggel
Thank you for PR!
I have same problem last week with one of my Fingerbot which I've used for debug for months. Can you connect your problem device directly to the mobile app?
from ha_tuya_ble.
Yes, connection with the mobile app worked fine. Controlling the device via the app was working with no issues. That's what is confusing me...
from ha_tuya_ble.
I've resolved the problem with my Fingerbot by removing and then re-adding it to Tuya IoT Cloud. I have no explanation what was the cause of such behavior.
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.