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

Does the TuyAPI have the ability to check device state of embedded tuya based devices?
I have 2 ceiling fans that use embedded tuya devices. I connect to these with the smart life app and use Homey to broadlink to send RF commands to turn the fan and lights attached on or off. But I have no way of knowing the state when I’m out via Homey…

Tried installing the app with the included ID, key and IP for both my devices but the app crashes soon after. I added them as a coolcam device to test.

The only devices i have tested are those coolcam plugs. I think that those devices should work with most on / off devices. I need to get my hands on a dimmable device before i can test if i can set those parameters from within the TuyAPI.

As i haven’t written that API myself i don’t really know what devices are supported and what parameters. Battery devices are a no go because they don’t keep there connection long enough to do anything usefull with the use of a local key.

@Rens_Brandwijk I was able to get the ID & KEY using the android phone from the neightbours (Iphone was not working fot me).

Now that I have the key, I assume that I have to use the private IP address of the plug?

I have an Action LSC on/off plug and tried to added it as a “NEO SmartPlug 2000W”. I was able to add it, but nothing happens when using the on/off function.

When I try to add it as a “NEO SmartPlug 3600W” i get an error (Pair … not found).

Ordered and recieved a NEO SmartPlug 2000W. Added that device in Homey and it was working fine :slight_smile:

1 Like

App is updated for some LSC devices

1 Like

Is there a way tot get the key without using an laptop?.

Kudos on creating this app for Homey! Just discovered the LSC products today at Action. Bought a few and they are very nice for its very low price. Also the filament bulbs are really great. Very nice color output. Hopefully these will also be added to the app.

Great work!

1 Like

Little update.

Yesterday i released version 1.0.4 to the stable channel. In this version i have moved some code around so there is less clutter and duplication in the driver files and i updated the TuyAPI dependency to the latest version. That should adding more devices in the future more easy and should also make the app a more stable. (version 1.0.3 for me crashed once every 48 hours 1.04 runs now for 4 days without incident so hope same goes for you to).

Then some questions:

About Key, IP and ID.
I get a lot of questions regarding the key, IP and ID. A little background information. Tuya uses a ID in combination with a key to connect there devices with the Tuya cloud service. The key is a secret 16 digit code that secures the connection between the device and the Tuya cloud. The key can also be used to connect with the devices localy and that is what the TuyAPI does. For the record this is not the way Tuya thinks there devices should be used but it works and its faster than the IFTT integration.
For this reason getting the key is not shown anywhere in the "smartlife " app and the only way you can get it is by cheating a little bit in the readme you can find different ways how. I know its not ideal but unless Athom makes a phonecall to Tuya in China and makes direct integration possible this is the only way to go apart from IFTT and Alexa / Google home options.

Therefore filling in the key is mandatory.

As for ID and IP. One of the two needs to be filled, you can chose the one you like best.
Personally i connect all devices based on ID. Why? well first of all because the ID can be found in the app and that makes it more easy to know what device is what and i don’t have to look in my router what IP address it decided to assign to the plug today. Also if the IP address for whatever reason changes it keeps working. Note. The IP address shown in the "smartlife " app is your external IP address, so that is no use for use with this app.

The only reason i added the IP address option is because its a requirement for the Athom appstore to be able to add the devices based on IP address.

Can you add “this” device / Your app sucks because my device is not in the list
To say the supported devices list is incomplete is an understatement. Tuya supports thousands of
devices by hundreds of brands almost nobody has ever heard of and most of them are dirt cheap from China.

So no, i’m not going to buy every device on the market just to make this app support more devices. And no i’m not going to make the devices more generic because that would not honour the wish of Athom to make and test drivers specificity for every type of device and will fill up my mailbox with app crashes in no time at all.


Yes, i am willing to add more devices provided i get the right information and someone is willing tot test it.

Its a battery powerd device forget it, the TuyAPI can’t connect with those because they don’t power up long enough.

Wallplugs or any on/off device If you have a wallplug without power meter. Just add it as the LSC smartplug or NEO Coolcam 2000W version. (They are the same). If you have one with power meter add it as NEO Coolcam 3600W.

RGB Devices Add the device as LSC Smart LED Light Strip.

White / Fillement leds i haven’t tested these myself but big chance these will work with the LSC Smart LED Light Strip. if so, let me know i will make a device with just a dim option then.

If it does work correctly that’s great. If you like a bulb icon and the right name just PM me the name and brand of the device and what kind of device it is and i will add it to the app for you.

If it does not work or functionality is missing and you like a little bit of tinkering. Just go to https://github.com/codetheweb/tuyapi and run the Asynchronous test code. change some values (min, max different collors ect) in the app and and find out what number in the data component corresponds with what app, PM me those and i try to build a app for it or even better do a pull request and i will merge it when i have the time.

But please remember:
1 - I have a fulltime ++ job, a wife two kids. This is a hobby not a job just have a little bit of patience. I will come back to you as soon as i can. This is a community supported app.
2- Yes getting the key sucks. I did not think of this, complains can be written to Tuya…
3 - If you don’t want to go true the trouble of getting the key, please don’t complain, just spend the extra 10 euro on a KaKu, Zwave or Zigbee plug / lamp.
4- If your not willing or able to provide the information needed to add a new type of device. Wait untill anyone that can does. Or take the advice writen under 3.


Can you test it again / or find out what the date element looks like?

Will try it sometime this week.

Action led strip works great! Thanks!

1 Like

Lets start with cool that you made the app and are maintaining it :D.
I have playing around with it the last couple of hours and cant seem to get it to work.

Wat did work for so far.
I got the Id and the key with your tool.
I could add it to homey.
But the switch does not work. I have a Neo coolcam 3600. (it does work with the china app).
I made sure homey and the switch are on the some wifi network.
i tryed adding the (internal) ip to the setting of the switch in homey

Nothing seems to work…
Are there things i am overlooking?

So the question solved it self. I just tried it again and now it works. Apparently i just had to leave the device in homey for a bit longer. Or something like that.

After adding a new device or restarting the app it takes 10 seconds before it tries to connect to the device. After that some more seconds to connect and exchange data.

Also if the smartlife app is still active it sometimes can’t connect.

as a new user of Homey first let me say thank you for spending so much time creating this App for all Homey users with Tuya devices!
I’m switching from ioBroker to Homey in hope of easier maintaining the system.
I have several Tuya enabled roller shutter switches with three touch buttons “up”, “stop” and “down”. There are several brands on the market with all the same electronics I think. For reference see e.g.:

Would it be possible to add those switches to the App? I must admid that I didn’t try to add the shutter switches as plugs, because they have the important third “stop”-button.

If you see a possibility to add them, what info do you need from me? I could buy one at Amazon and let it send to your address if it helps.

Sorry for my English, but my motherlanguage is German.

I don’t understand how I can get the code.

Will that work on my phone (Android)?

How do i discover the date element?

Update 1.0.6 was released yesterday with a small stability fix and support for the LSC Smart Fillement LED devices.

@mic65: Sure we can add such a device. The only problem is i don’t own one and have no devices to connect it to. But if you follow these steps and give me the parameters i can try to add them for you.

If it does not work or functionality is missing and you like a little bit of tinkering. Just go to https://github.com/codetheweb/tuyapi and run the Asynchronous test code. change some values (min, max different collors ect) in the app and and find out what number in the data component corresponds with what app, PM me those and i try to build a app for it or even better do a pull request and i will merge it when i have the time.

@Mark1541: See the setup instructions at the startposts and the step by stem guide from harry in the beginning of this topic.

@viix: there are 2 ways. First is instruction to mic62: by using the demo code from the TuyAPI in this post but it involves installing nodeJS on your pc and changing some code.
The other way is installing the athom cli on your pc and run the app with console attached add the device as a simpel device eg. the wall plug 2000w and change some values in the app.

It is such a shame athom removed the console from homey…

Thanks for your Response.
I’ll try to follow the steps next weekend and report here.

I just peeked a little deeper in to the github site you mentioned above. Is it correct, that the tool and procedure has to be done on Linux and is not compatible with Windows?
I don’t have any knowedge of Linux and in the moment seems that I do not understand anything of the procedure described on github :frowning:

No it works under windows to (it is a command based application tough).

But see next post.