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

Cannot setup

Open Wheemer opened this issue 1 year ago • 22 comments

Hello;

Was hoping to try the automatic detection for a few bluetooth soil sensors I have. However I can't add the integration, it gives me the "not_implemented" error.

Thanks for your help.

Wheemer avatar Jul 31 '25 11:07 Wheemer

Read the README, its not fully automatic, you need to create a devices.json file

ShonP40 avatar Aug 18 '25 11:08 ShonP40

Hi. Thanks for this integration.

I created a "devices.json" file in "./config/custom_components/tuya_local_ble/" with the provided format : (I also tried "./config/local_tuya_ble/" after creating this directory) { "aa:bb:cc:dd:ee:ff": { "address": "aa:bb:cc:dd:ee:ff", "uuid": "1234567890abcdef", "local_key": "blahblahblah", "device_id": "fedcba0987654321", "category": "jtmspro", "product_id": "rlyxv7pe", "device_name": "My Door", "product_model": "TY196-DL", "product_name": "Smart lock" } }

No matter what I do, I get a "not_implemented" error.

alexandreaudrain avatar Aug 18 '25 20:08 alexandreaudrain

Can you show the device info page from the Tuya app?

ShonP40 avatar Aug 19 '25 03:08 ShonP40

Virtual ID : bf9......e0w MAC : DC:23:xx:xx:xx:xx Time zone : Europe/Paris Connected via : gateway/mobile phone Status : not connected

It connects when I get my phone near it. And my RPi5 can detect bluetooth signal, and find MAC address

alexandreaudrain avatar Aug 19 '25 08:08 alexandreaudrain

It might be a low signal issue... where and when should "devices.json" be created ?

alexandreaudrain avatar Aug 19 '25 12:08 alexandreaudrain

As stated in the README.md, you need to create that file in /config/tuya_local_ble

Also, try to place your lock right next to your Bluetooth Adapter (if its an ESPHome proxy, make sure that you have active: true in your config`

ShonP40 avatar Aug 23 '25 19:08 ShonP40

Hello;

Was hoping to try the automatic detection for a few bluetooth soil sensors I have. However I can't add the integration, it gives me the "not_implemented" error.

Thanks for your help.

Hello mate,

did you solve this issue? I have the exact same problem, followed the instructions but keep receiving "Not_Implemented"

thanks!

PerryFabregas avatar Oct 26 '25 09:10 PerryFabregas

Same here. Got the following config in /config/tuya_local_ble/devices.json. The info comes from TinyTuya.

{
    "AA:BB:CC:DD:EE:FF": {
        "address": "AA:BB:CC:DD:EE:FF",
        "uuid": "tuya04abf196af89",
        "device_id": "bf1421nmetonpaji",
        "local_key": "**********",
        "category": "szjqr",
        "product_id": "neq16kgd",
        "device_name": "Fingerbot Plus",
        "product_name": "Fingerbot Plus",
        "product_model": ""
    }
}

Is there any way we can debug what is going wrong?

Timtam avatar Nov 21 '25 22:11 Timtam

@Timtam which device are you trying to connect?

(Send an AliExpress link if you have it)

Also, make sure that your device is close to a Bluetooth adapter/proxy (within ~3 meters)

ShonP40 avatar Nov 26 '25 19:11 ShonP40

I don't have an AliExpress link, its the first Fingerbot Plus, distributed via the original Kickstarter campaign. The Fingerbot is within reach of the Bluetooth built into the Raspberry Pi 4 that my Home Assistant is running on. Is that a problem here, does HA support the BT built into that one? Does it work out of the box, or does it need some other kind of proxy? @ShonP40

Timtam avatar Nov 26 '25 20:11 Timtam

Did you configure the Bluetooth integration on your HA install?

Also, can you try to place it right next to the RPi for initial pairing?

ShonP40 avatar Nov 26 '25 20:11 ShonP40

I didn't configure anything special, no. Can you guide me to any docs or something that tells me how / what I need to do so that Bluetooth works with your add-on?

Timtam avatar Nov 26 '25 20:11 Timtam

https://www.home-assistant.io/integrations/bluetooth/

ShonP40 avatar Nov 26 '25 21:11 ShonP40

OK, I tried this one before already. The Bluetooth adapter is detected by HA and shows up under Settings -> Devices under discovered. I then add it to HA, finish the initialization process and now what? I just tried adding your add-on integration again, still not_implemented. The Fingerbot works flawlessly when triggered by the Tuya Smart app on my iPhone.

Timtam avatar Nov 26 '25 21:11 Timtam

  1. Did you reboot HA after adding your device to the devices config file?
  2. Can you attach logs?

ShonP40 avatar Nov 30 '25 10:11 ShonP40

Same issue here: { "DC:23:50:17:B3:BB": { "address": "DC:23:50:17:B3:BB", "uuid": "658b7bc08e73f60b", "local_key": "******", "device_id": "bf1919yanybfobiw", "category": "wsdcg", "product_id": "ccqhvfjx", "device_name": "Temperature Humidity Sensor", "product_model": "", "product_name": "TH05Y-BLE" } }

It's a new device. Added information locally for this device in

devices_database (devices.py) under category "wsdcg" "ccqhvfjx": TuyaBLEProductInfo( # device product_id name="Temperature Humidity Sensor", ),

select.py "ccqhvfjx": # Temperature Humidity Sensor [ TuyaBLESelectMapping( dp_id=9, description=TemperatureUnitDescription( options=[ UnitOfTemperature.CELSIUS, UnitOfTemperature.FAHRENHEIT, ], entity_registry_enabled_default=False, ) ),

sensor.py "ccqhvfjx": [ # Temperature Humidity Sensor TuyaBLETemperatureMapping( dp_id=1, coefficient=10.0, ), TuyaBLESensorMapping( dp_id=2, description=SensorEntityDescription( key="humidity", device_class=SensorDeviceClass.HUMIDITY, native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, ), ), TuyaBLEBatteryMapping(dp_id=4), ],

switch.py "ccqhvfjx": [ # Temperature Humidity Sensor TuyaBLESwitchMapping( dp_id=11, description=SwitchEntityDescription( key="low_battery_alarm", icon="mdi:battery-alert", entity_category=EntityCategory.CONFIG, entity_registry_enabled_default=False, ), bitmap_mask=b"\x02", ),

On IoT-platform I get two more dp_ids: 23 (temp calibration, 24 humi calibration). I didn't declare those, because I don't know where. dp_id=11 is a guess, because in the app on my phone there is a switch, but I don't see the dp_id on IoT-platform.

No logs in HA, just "not_implemented" when I try to set up the integration.

Any help is greatly appreciated.

kender65 avatar Dec 19 '25 19:12 kender65

I kinda gave up on it to be honest, and moved on to https://github.com/ha-tuya-ble/ha_tuya_ble. Maybe this add-on does support your use-case as well.

Timtam avatar Dec 20 '25 00:12 Timtam

I only ever tested this integration with a jtmspro smart lock (A1 Pro). I don't own any other Tuya devices so I can't test if they connect.

ShonP40 avatar Dec 20 '25 07:12 ShonP40

Same issue here: { "DC:23:50:17:B3:BB": { "address": "DC:23:50:17:B3:BB", "uuid": "658b7bc08e73f60b", "local_key": "******", "device_id": "bf1919yanybfobiw", "category": "wsdcg", "product_id": "ccqhvfjx", "device_name": "Temperature Humidity Sensor", "product_model": "", "product_name": "TH05Y-BLE" } }

It's a new device. Added information locally for this device in

devices_database (devices.py) under category "wsdcg" "ccqhvfjx": TuyaBLEProductInfo( # device product_id name="Temperature Humidity Sensor", ),

select.py "ccqhvfjx": # Temperature Humidity Sensor [ TuyaBLESelectMapping( dp_id=9, description=TemperatureUnitDescription( options=[ UnitOfTemperature.CELSIUS, UnitOfTemperature.FAHRENHEIT, ], entity_registry_enabled_default=False, ) ),

sensor.py "ccqhvfjx": [ # Temperature Humidity Sensor TuyaBLETemperatureMapping( dp_id=1, coefficient=10.0, ), TuyaBLESensorMapping( dp_id=2, description=SensorEntityDescription( key="humidity", device_class=SensorDeviceClass.HUMIDITY, native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, ), ), TuyaBLEBatteryMapping(dp_id=4), ],

switch.py "ccqhvfjx": [ # Temperature Humidity Sensor TuyaBLESwitchMapping( dp_id=11, description=SwitchEntityDescription( key="low_battery_alarm", icon="mdi:battery-alert", entity_category=EntityCategory.CONFIG, entity_registry_enabled_default=False, ), bitmap_mask=b"\x02", ),

On IoT-platform I get two more dp_ids: 23 (temp calibration, 24 humi calibration). I didn't declare those, because I don't know where. dp_id=11 is a guess, because in the app on my phone there is a switch, but I don't see the dp_id on IoT-platform.

No logs in HA, just "not_implemented" when I try to set up the integration.

Any help is greatly appreciated.

You should make a PR instead of modifying it locally

ShonP40 avatar Dec 20 '25 07:12 ShonP40

You should make a PR instead of modifying it locally

I agree to the idea of creating a PR in general but, for me, it just makes sense if you have a working implementation. That's the reason why I set it up and wanted to try it locally. In other projects, like zigbee2mqtt, you can create external_converters locally, test it on your system if it works properly. If so, create a PR to get it integrated for all to use.

Here I think we have a bigger issue, not related to the device's implementation. I don't have another device, already part of the integration, to test it at all. I'll go another route. Nevertheless, thanks for your efforts and work.

kender65 avatar Dec 21 '25 12:12 kender65