TUYA BLE: Error on install: {"message":"Invalid handler specified"}

Hello, in the past this integration was working fine and I’d love to have it again.
After uninstalling it and reinstalling it on HACS, I can not install it in the integration dashboard.
When I try to install it, I get the following message:

Erreur
Le flux de configuration n'a pas pu être chargé: {"message":"Invalid handler specified"}

It means “Error. The configuration stream could not be loaded”

How can I make sure the uninstallation is clean?
I removed all entries in “integration”, uninstalled it in HACS, checked that the folder was removed in “config/custom_components”.

Any help would be more than welcome !!!

Did you try to contact the author? Maybe an issue on their Git or where ever they state they support from?
Other people using this would be the most likely to be able to help you with this issue.

Thanks for the advice, I just did. Unfortunately I read that this integration is “dev forgotten”. Too bad, it is so usefull !!!

For anyone facing the same problem, I just found the solution here:

Oh no! I did this fix last time and it worked, unfortunetly, there’s another new update (2024.2) and when I updated I Tuya BLE broke again. Here’s the error…
Error occurred loading flow for integration tuya_ble: cannot import name ‘CONF_ACCESS_ID’ from ‘homeassistant.components.tuya.const’ (/usr/src/homeassistant/homeassistant/components/tuya/const.py)

Hope it’s a simple fix like last time

1 Like

Are you sure?
Last change was 7 month ago.
See here:

There was no update in 2024 for this integration.
Or did you manualy overwritte the folder? maybe using hacs?

Yeah, they didn’t update the integration, they posted instructions on github on the few changes to make to some text files. This new issue looks like a similar thing

It’s a big mess. As nobody maintain the integration, everyone make his own mods and post it.
In the past I used one of those mods to get a device working.
Then I had a bug and to correct it I applied the mods that I shared in this thread.
And now a new issue described here:

I hope someone will update the github and merge all the modifications.

1 Like

Ok. let’s not complain. I’m no expert with the code, I’m only 2 months old into home asst, so I appreciate learning from everyone else.

I coincidentally installed this like three days ago so it was working BEAUTIFULLY until last night. frustrated the heck out of me all day, esp after all that effort taken to figure out how to get it installed.

Anyway here’s one thing I realised. 2024.2 has some backward incompatible things, and one of the things is the way Tuya authenticates (which explains why CONF_Access_ID is no longer a valid… I’m guessing, variable?). But there’s an upside to it - you no longer need a developer account to integrate Tuya into HA which is awesome. Now the problem remains as to whether deleting the old login credentials is sufficient for tuya_ble to access the device, or does it need to get the new login credentials?

Anyway documentation on what I found here. I’m going to stare at the code for a bit and see if I can make any sense of it but I’m hoping someone can come in and build upon what I’ve got so far.

3 Likes

If anyone comes out with a solution that would be great.

I could get it working (for the moment…) using this:

Thank you @Moe555, I confirm it is working. I’m just surprised it can work in parallel with the new Tuya Integration… I hope it can remain stable and keep working. Thanks for the hint!

1 Like

I keep getting ‘incorrect username or password’. HA has detected a device but I cant configure it.

hello @donparlor , what did you pit in access it and username password field?

same here, did you find a solution?

First, I must clarify, I have the new Tuya integration running, the one released with 2024.2

Here are the steps I went through to install Tuya BLE integration:

  1. Remove Tuya BLE completely. If it claims integration is being in use, force removal.
  2. Go to your HACS tab and download this custom repository by @markusg1234
  3. Install the custom repository in your HACS
  4. Go to your HA integration window, install Tuya BLE
  5. When asked to enter your credentials, it will be the old credential page from the old Tuya integration (before 2024.2). Use your Tuya Developer IoT credentials.

So you still need to have all your Tuya Developer IoT credentials at hands. This is why I said I’m surprised the Tuya BLE integration can work in parallel with the new Tuya Integration…

Hi,

I’ve changed the cloud.py and config.py files and still getting the below error message when trying to first time start the Integration.

Config flow could not be loaded: {“message”:“Invalid handler specified”}

Running latest version of HA 2024.2.5

1 Like

I too have the same problem. I have changed all the entries in the required files.
Has anyone found the solution?

Hi,

Thanks for those steps.

Unfortunately I’m stuck as step 5, I enter my old tuya developer credentials but it just reports “Login error (2401): username or password wrong”

Using the same username and password I can log into the tuya developer web platform fine, so a bit lost.

Note I do not have the new Tuya integration running, I only have this single cubetouch device.

You had your Access ID/Client ID and Access Secret/Client Secret?
If so, I’m as lost as you, I don’t know how I got lucky and that it worked…
The original programmer has left the development team, I guess a damn good programmer needs to take the lead and help with this integration…

Yes I had the secrets.

I think I will give up with this integration and get a zigbee based fingerbot instead.