[APP][Pro] TuyAPI / Neo Coolcam wall plug WIFI app

After a day of trying to find the keys and secret on an android device, i decided to use an old ubuntu laptop that did the trick. So 2 smart plugs included in Rens Tuya app.
It is possible to switch them on and off in homey, but no energy metering is possible. They only state the voltage of the time I entered them. So no real time metering.
Changing in the settings to A, W or V back: nothing changes.
I closed both the tuya and smart life app.
Possible defects of new devices or an existing thing to live with?

First of all thank you for creating this app.

I created an account with Tuya when I ordered the Homey Pro 2023.
Now it is delivered, and I try get it to work.

I’ve created the keys ( the instructions in readme.md seem to be outdated as the menu structure completely different, and the cloud development plan is no longer available).

When I enter my Client ID / Secret etc, I’ll only get a message:

28841002: No Premission. Your subscription to cloud development plan expired.

When I try to get something to work, they want me to pay the insane amount of 25.000 USD to continue.

I can of course create a new email address, and create a different account, however if it will stop working after 1 month…

Or am I completely mistaken, and am I doing something else wrong?

Is there any ETA yet for when the USB port toggle flowcard will be working again?
I mean, the UI button works still. It’s just the flowcard not doing its job for whatever reason.

somebody please help, i can not get this thing to work…
I created a Homey Project did everything from the guthub tuy page, then i activated it with my Smart Life app and used eu region on both places… no I can not get it to work.
Keeping ‘1106: Permission denied’
Tried a new project, change ID’s when using invalid API password or key it gives me not the same error so it does something but i can not get acces.
Also gave access to all devices and with all permissions.

tried:

  • new tuya account
  • change password
  • deinstall and install app again
  • tried to use Smart Life ID as Random ID
  • Smart Life App id as API id

Nothing seems to work, is there somebody that got it working?

EDIT: Stupid mistake with the device ID, everything seems to be working ok…

have some random issues with not updating powerusage and my power strip is not recognized as powerstrip but as power plug which is a bomber but i can imagine with the growth of a lot of manufactors and stuff it is difficult to keep it good. but i hope it will someday be found not as 1 powerplug (only master) but i would be able to change all 4 power and usb as different switches (smart power strip 44EU-W).

I’m trying to get this app working with my light bulbs. They bulbs work well via the Smart Life app, as well as via Tuya cloud App for Homey | Homey, but the latter has a delay when turning them on/off, which I was hoping to get rid of with local control.

I’ve followed the instructions in https://github.com/codetheweb/tuyapi/blob/master/docs/SETUP.md and can enumerate the devices with their keys and ids via tuya-cli wizard. When adding a device in Homey, it’s also able to enumerate and add my bulbs.

But nothing happens when I try to turn on/off a bulb. Is there a log somewhere I can look at to see what could be going wrong?

Using tuya-cli get with the id and key of a device just gives undefined. And with --full I get some raw data, not plain JSON.

The device in Homey has this for the data attribute log:

NEW DATA ATRIBUTE: {"dps":{"20":false,"21":"white","22":297,"23":250,"25":"000e0d0000000000000000c80000","26":0,"101":true}}

What am I doing wrong, or how can I help debug this? Thanks!

Using tuyapi get --id XXX --key YYY directly, I get:

{
  '20': true,
  '21': 'white',
  '22': 297,
  '23': 250,
  '25': '000e0d0000000000000000c80000',
  '26': 0,
  '101': true
}

And passing --dps 20 to set allows me to turn on and off the bulb. How do I teach this app to use that for bulb control? Same goes for the other properties like white balance and level.

DPS 22 is the brightness, from 10-1000 (10 the lowest the Smart Life will set it to)
DPS 23 is the color temprature, from 0-1000 (orange->white)
DPS 25 is a scene mode (not something I use)

Edit: Actually this explains it all Function Definition of Lighting Products-Tuya IoT Development Platform-Tuya Developer :slight_smile:

Okey, adding the bulb as an RGB Ledstrip at least lets me control on/off.

I’ll try to run GitHub - rebtor/nl.rebtor.tuya: TuyAPI implementation for homey locally and provide a patch to fix this.

Edit:

@Rens_Brandwijk I’ve pushed various fixes and cleanups to Repository cleanups, smaller fixes, and clarification of random device ID vs device key by torarnv · Pull Request #36 · rebtor/nl.rebtor.tuya · GitHub

Please let me know if you’d like to incorporate these. Cheers!

1 Like

I had the same problem right from the start.
I didn’t know what to fill in for “Random devicekey”.
Apparently you have to fill in the Device ID of one of your devices. (As can be seen when logged in to the platform or in the Smart Life app)
At least that worked for me. Could be documented a little better I guess :slight_smile:

I have read several times on this forum that the smart plugs with power monitoring do not update their power usage. I have this same problem currently.

I don’t know if it is any help, but I played around a bit with the API explorer on the platform and saw the same behaviour there. When I query the device it says 0 and 0 for the usages, but if I then open the app on my phone and look at the usage I see the actual usage. If after THAT I query it again from the API I get to see that value. But again in “frozen state” … it does not update until I look in the Smart Life app again.

So I think the values I get to see in the API are the last ones that the cloud knows of, and it needs some kind of trigger to get new values from the device. But unfortunately I do not know what the trigger is to get these new values.

(And of course I do not know what the behaviour of this is with actual direct communication to the device instead of through the Tuya API)

I also think the plug has a small internal memory of some kind, because it remembers usage statistics for the current day, the previous days (totals) and the previous months (totals).
I first thought this was kept in the cloud, but when removing the plug from the Nedis app and adding it to the Smart Life app with completely different accounts … the history is still there. So I assume there should also be a way to query this information from the device … but I haven’t found any documentation on this yet.

I might install the CLI on my computer and fiddle around with that for a bit to see if I can find out more.

I’m migrating from Homebridge to Homey Pro and have 4 Tuya sockets - 2 with a power meter and two without. When I’m adding them in the Homey Pro Tuya plugin, I’m getting “The “key” argument must be of type string or an instance of ArrayBuffer, Buffer, TypedArray, DataView, KeyObject, or CryptoKey. Received null”.
I get that message before I can type any API keys (right after I click on “Connect new device”). Has anyone had a similar issue?

1 Like

Hi, I recently got my Homey Pro and I’m trying to get the Tuya app working. I installed the app to my Homey Pro, but when I try to add a new Tuya device I get a time-out and the former the api key and secret does not appear.

Yes, I do have the same problem. Most of the times I get a timeout error, but today I also got this error.

Never mind. I figured it out. I just had to fill in the required api key etc in the app settings via More / Apps / Tuya / Top Right Settings Icon / App Settings.

Does anyone here know about an alternative for a Homey controlled USB power supply, as in like a powerstrip with usb outlets? Sadly it looks like the dev of this app has abdoned the support for it :frowning: and I need a reliable alternative.

@torarnv I seem to have the same problem as you had. I am trying to connect a filament light, it works in the tuya app but not in homey. Adding the light as ledstrip enables me to control on/off too. Also the data attribute log is the same.

Did you manage to get full control over the light in homey?

Meross should have one of those. I used to have one but I did not have a Homey back then, so not sure how well it works.

1 Like

All,

I appreciate the work that Rens and others have done to develop this app, but am striking a challenge trying to use it. I have been able to get all the required parameters for the app configuration, but am not sure what I should be entering in the REGION field of the app settings. The Tuya iot website shows my project as using the “Western America Data Center”, and I have used “us” as the value for REGION in the Homey app, but when I then try and add a device I receive an error message “28841107: No permission. The data center is suspended. Please go the the cloud development platform to enable the data center.”.

I have tried “us”, “Western America Data Center” and other options for REGION but have the same result each time. Is anyone able to please point me to what valid values for REGION are, or if there is something I am missing.

NB: I have used the tuya-cli successfully so the API key and secret as well as the device ID are Ok.

Thanks :slight_smile:

Hi everyone, I have a Smart Music Strip Light connected in the Smart Life app.
I have tried to follow the Setup.md instruction but when I try to connect the device as “Light Strip” it says: “no new device found”. Is my light strip not compatible?

BR
Luca

Hello,
I have several thermostats under Tuya/Smart Life. Is there an easy way to integrate this into Homey Pro? I’ve already seen dozens of tutorials on how to read the API… but either the tutorials are too old or it just doesn’t work (maybe that’s just me :sweat_smile:)

Thanks for this app! It’s not finding my devices, maybe I’m doing something wrong so I have a few questions.

I have set up Tuya Cloud and it’s working in the Tuya Cloud App. So the problem is not there.

Can this app find devices that are not of the type listed when adding new device (Filament device, Light strip etc).

Should my device be in pairing mode when adding? I have already added it to Tuya and I have acquired the deviceid.

Do I have to change deviceid in settings every time I add a new device? I have a few. Or is this setting just for verification of the cloud?

Kind regards