Tuya Fingerbot / Cubetouch Bot Support

I’ve just flashed my ESP32 using the site, no modification or tuning. I don’t know how HA Bluetooth subsystem chose a way to connect the device.

My HA runs on an old AMD x64 based mini-PC with built-in Bluetooth adapter. When I setup soil moisture sensor which is in 15 meters from PC and in 5 meters from ESP32 proxy, HA connects it via proxy.

I have the same problem. I have BTProxy setup and running without issues but it doesn’t seem to actually do anything.

In my case I have builtin bluetooth on the PC running Home Assistant but it isn’t detected at all by Hassio (likely a bluetooth driver issue) PLUS the BTProxy (which is running fine).

I wonder if we need to have a working BT dongle besides the BTProxy for it to actually work?

As far as I know - no. During development of the integration, sometime the virtual computer with HA wasn’t connected to the BT adapter, but a device connected via proxy continued to work properly.

hi, can we add also the device below? it get’s discovered but ends in a communication error because the device type is not compatible ( “category”: “sfkzq”,)

“category”: “sfkzq”,
“category_name”: “Water valve controller”,
“create_time”: 1683009867,
“gateway_id”: “”,
“icon”: “smart/icon/ay15662905541765SKtA/e224728a22bc95a6a30670dd4abf6422.png”,
“id”: “bf279flbwkdubwz3”,
“ip”: “”,
“lat”: “44.4500”,
“local_key”: “790fbfd9b179ddad”,
“lon”: “25.9700”,
“model”: “TTV102B”,
“name”: “valve gate”,
“online”: false,
“owner_id”: “152082xxx”,
“product_id”: “e1poaiwa”,
“product_name”: “Valve Controller”,
“sub”: false,
“time_zone”: “+03:00”,
“update_time”: 1683009895,
“uuid”: “8fd6e7f42043190e”

Struggling to set this up through esphome Bluetooth proxies, works fine when its in range of the BT adapter plugged in to my HomeAssistant, but goes offline when i try and reach it through a proxy. (Also fills the logs with lots of errors that should probably be trapped by the integration)

Error setting up entry CubeTouch II 1D4F4D for tuya_ble
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/__init__.py", line 344, in establish_connection
    await client.connect(
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 253, in connect
    wrapped_backend = self._async_get_best_available_backend_and_device(manager)
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py", line 355, in _async_get_best_available_backend_and_device
    raise BleakError(
bleak.exc.BleakError: No backend with an available connection slot that can reach address DC:23:4F:1D:4F:4D was found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/tuya_ble/__init__.py", line 44, in async_setup_entry
    await device.initialize()
  File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 272, in initialize
    await self.update()
  File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 312, in update
    await self._send_packet(TuyaBLECode.FUN_SENDER_DEVICE_STATUS, bytes())
  File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 843, in _send_packet
    await self._ensure_connected()
  File "/config/custom_components/tuya_ble/tuya_ble/tuya_ble.py", line 593, in _ensure_connected
    client = await establish_connection(
  File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/__init__.py", line 420, in establish_connection
    await wait_for_disconnect(device, backoff_time)
  File "/usr/local/lib/python3.10/site-packages/bleak_retry_connector/bluez.py", line 286, in wait_for_disconnect
    await asyncio.sleep(min_wait_time)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 605, in sleep
    return await future
asyncio.exceptions.CancelledError

There is a HACS solution, finally!

Controlling Tuya Fingerbot over Bluetooth BLE (locally, no cloud, no bluetooth gateway)

1 Like

Out of curiosity, has anyone noticed some Tuya devices popup in their notifications after installing ha_tuya_ble? I have a device appearing but can’t find it anywhere… It’s not in my cloud either.
Capture d’écran, le 2023-05-08 à 14.57.48

Hi, there are hard limitations for BLE proxy, first of all to number of devices which could be connected simultaneously. Have you tried to restart the proxy?

It might be Tuya gateway with BLE support, mine one also appears as discovered, but it’s impossible to connect it.

To my knowledge I don’t have a BLE Proxy… This mysterious devices still needs to be uncovered but I haven’t figured out yet… :man_shrugging:

It may also be a device of some of your neighbors.

Yeah, I thought of that also… But it is hard to verify… I’m not in an apartment, I’m in a house and since I have a BT-Proxy in my garage, signal coverage can probably reach my neighboors… Good one!

@PlusPlus-ua
Thank you for profividng this integration. I have a small problem:

I have just received my Fingerbot Plus and already had an ESP32-bleproxy going for other products.

HA detected the device automatically but when trying to configure the one-off Tuya access it says no such device is registered on Tuya Cloud…??

I have checked my Tuya-IOT credentials in the integration against the IOT platform authorisations and they appear correct.

The device does appear to have been registered correctly with Tuya Cloud…

Should I perhaps wait a bit longer for the new device to “propagate” through the Tuya system or do you think something is not right with my access to the Tuya IOT platform ?

Try to reload the Tuya integration

Thanks.
Just tried to reload main Tuya integration , followed by HA restart…nope.no luck
Tuya BLE integration is still telling me that no such device is registered…

I hope that the device is part of the supported ones in the TuyaBLE integration as listed here: FingerBot Plus- Its Device ID seems to start with “bf6952bl” so it is not clear to me whether that might be the issue if this id relates to the product_ids listed as supported:
image

I was about to buy this Fingerbot, I hope it’s not the same as yours…

I think it might well be…

Yes. Confirmation: that’s the one I just received this morning…same vendor/number of reviews etc…

Now, saying that, the fact that the integration detects it as potential tuyaBLE device is a good sign that it can be made to work…?

Just for info, I checked that connection to the Europe data centre was working by changing the main Tuya integration to U.S. and of course it refused to connect so that tells me that at least I should have a working server connection when using the intended Europe server.

I also checked what was happening when reloading the TuyaBLE integration and it makes a call to “openapi.tuyaeu.com” which seems sensible since when pointing to the U.S. it makes a call to “openapi.tuyaus.com

I am not certain what is not quite working and will try to re-add some of the other tuya devices that I had deleted (only wanted local control) to see if those would be registered correctly…just incase.

I saw that my Tuya CLoud “IOT core” API component had expired…?? .perhaps I need to create a new project to get some trial API time…let’s see…

I think my issue is more than likely going to be this “IOT core” that expires after just 1 month…Mine had been created back in Nov2022 -

See:Unreachable Tuya devices since last couple updates · Issue #91654 · home-assistant/core · GitHub

So I have now applied for a 6 months extension and woud hope that this will resolve the issue if granted…

I also had my iot core for my tuya account expired. but I was able to list all the device (including the bluetooth and zigbee ones) just fine.

though the only difference is that my fingerbot is paired via a tuya multigateway hub. but pairing it to esphome bt proxy works fine as long as you get the necessary stuff which you can just query using API explorer.

I finally able to pair those fingerbot fully local.

I hope the ha_tuya_ble integration supports other BLE based tuya device (or rather, majority of the tuya devices already have BLE built-in anyway used for board-in configuration and also local control via tuya app using bluetooth).

About “Device is not registered in Tuya cloud” message. It means that integration has successfully opened Tuya IOT API with provided credentials but hasn’t found the device by MAC address. Only reason which I know it the device is still not “added” to mobile application. If the device is added, it must appear on this page:

Check it please.