[APP] Tuya - Smart Life. Smart Living

The HA integration is official (not “Homey official”, but really official, as in actually created and maintained by Tuya).

But that doesn’t mean that they can’t block it. The official Tuya Homey app (the first app, not the Drenso one) was also created in collaboration with Tuya. How else do you think Homey got their OAuth client ID/secret?

Athom/Drenso uses Home Assistant’s client ID, which could make it difficult to differentiate between requests made from the official HA integration and the Homey app.

I meant the old official app. Tuya also shut that down, but Homey did have an official Client ID and Secret so the app was built in collaboration with Tuya

I understand, but I’m trying to explain that the current app will probably be much more difficult to block because Homey shares its credentials with HA.

Why would it be more difficult to block? If they want to move toward an ad-filled app and kill all third party integrations to prevent people from using third party apps, then it’s just as easy to block as the other official Homey app.

Many Chinese smart home vendors have already implemented ads also, especially the camera apps like V360 Pro, V380/V380 Pro (same app, different name), XMEye, iCSee, Clever Dog, Yi iot, Yoosee, 365Cam, Ease Life and many others.

Yes, they can turn off their API’s altogether if they want :man_shrugging:t3: But as it stands, Tuya officially supports Home Assistant, and as such, they cannot block their API’s unless they want to retract that support. And until they do, they cannot (at least, from that I’m seeing) retract support specifically for the Homey app.

They can’t, but that’s the case with many more Homey apps and other reverse engineered protocols. At least for many of my own apps (primarily the apps that sign their requests using some algorithm embedded in the Android app, since that often means they’re actively trying to stop reverse engineering), I copy the Android app user agent along as well, so they can’t determine if it’s Homey or the Android app. This makes it harder for the companies to detect or block the Homey app.

Also, if Tuya didn’t want other systems like Homey copying the Home Assistant Client ID and Secret, then they could have just left it in the environment variables as well :wink:

Just a thought:
Maybe publishing a “Known issues” overview is an idea?
Like updating the first post of this topic, or somewhere on the app page @ app store?
Maybe Athom can consider adding a “Known issues” section to the app store.

There is no way to “hide” credentials with HA as everything is open source.

Well, if they also keep the client credentials online for everyone to use, then I wonder why they’re even there in the first place since it’s pointless to have client credentials when everyone can just freely copy and use them however they like. So I don’t understand why Tuya even requires a Client ID and Secret for that API then.

And even if they weren’t available, it would still be possible to find them in the network requests when you intercept those.

From what I can see, it only uses a client ID (and a “user code”, which the user can find in the Smart Life/Tuya Smart app), not a secret.

Another update from our side! It has proven hard to find where the exact problem comes from: it is related to token refreshing and possibly concurrency in relation to the recent ESM update, but as you might know a token does not need to be refreshed that often. That’s why we need your help!

We’ve just pushed version 1.5.1 to the store, and made it available for testing. Can you guys try this version? You can use https://homey.app/a/com.tuya2/test/ to install the test version.

Note that depending on the internal app state, you might still need to repair a single device after installing the update before it start working again. We’re mostly interested as to whether it remains stable afterwards!

I’ve installed the test version and did not have to repair a device to fix the problem, they just work now. Will let you know if/when they stop working.

image

I installed the V1.5.1, restarted but if activate a dvice I get this.

I also repaired the device first.

And if restart the APP in the devices list I see lot of changes available, not available like a christmas tree and after 10 seconds or so it is stable and some still show not availalable and the ones that seem to be available do not react and after 10 seconds this time out problem.

Note that I am using smartlife and not the TUYA app and in Homey I also installed the Tuya Zigbee app for my zigbee devices.

I just restarted the app and all seems OK for half a minute, able to activate lights but now all show not available. So not stable.

After installing the update, the unavailable devices became available again without a re-login. I’ll see if it keeps working

I installed 1.5.1 to and for an hour no problems detected yet

We believe you’ve hit a very nice race condition! Can you try again with version 1.5.2?

huh, without checking i clicked on install, noticed that 1.5.2 was already installed, and now im back at 1.5.0

Devices were unavailable again (1.5.1). I just noticed 1.5.2 was available and after updating, the devices are available again.