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

Sorry, was aware of that one. It works partly for this LED strip. I can control it, but cannot change the colors.
And the developer of the app made quite clear that is most likely not going to be added

I also often get annoyed that Tuya often has interesting devices that I cannot use with Homey. I often help myself to register the devices in Home Assistant via the Tuya Cloud. Then I import the whole thing via the Homey HA app. But this is not a practical solution for the normal user. Athom should urgently do something about this.

1 Like

Yeah, this is bizarrely the way I’m looking at… Thing is, once I start down the Home Assistant path I imagine it’ll be non stop from there

Where can one put in a request for an app? I recon quite a lot of people have already done so?

I’m using ha for a few devices but just don’t have enough time to invest into ha , so I disagree, :wink:

Would be nice if they had something like this for WiFi devices as well:

That’s a tall if not impossible order, a WiFi device could use any API etc, where as ZigBee is a defined protocol

I thought it would be similar.
And especially Tuya seems to be changing and updating their API every once in a while

Hallo @Rens_Brandwijk

Ik heb met succes een LSC Smart Plug toegevoegd op basis van het lokale IP, key en Device ID.
Het toegevoegde apparaat in Homey doet echter niets, weet jij hoe dit kan?
Alvast bedankt en groeten,
Michiel

Hi Rens, I have a little question…
I used your app to add my tuya smartplugs, but it keeps indicating β€œDit apparaat is tijdelijk onbereikbaar.”
FYI: it’s the device called β€œEU02-JX ε…¬η‰ˆβ€ (think I saw the same issue on nl.rebtor.tuya - githubmate)
the strange thing is that your app get’s it when I turn a device of (manually or with the tuya app), but I can’t control it using homey (the power consumption is working without a problem)

atribute log:
{β€œdps”:{β€œ18”:53,β€œ19”:62,β€œ20”:2345},β€œt”:1641746426}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:57,β€œ19”:69},β€œt”:1641746458}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:53,β€œ19”:62,β€œ20”:2337},β€œt”:1641746490}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ19”:69},β€œt”:1641746493}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ19”:62},β€œt”:1641746533}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:56,β€œ19”:69},β€œt”:1641746589}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:53,β€œ19”:61,β€œ20”:2333},β€œt”:1641746613}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:54,β€œ19”:68,β€œ20”:2337},β€œt”:1641746623}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:53,β€œ19”:61,β€œ20”:2333},β€œt”:1641747399}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:55,β€œ19”:68,β€œ20”:2325},β€œt”:1641747418}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:54,β€œ19”:61,β€œ20”:2333},β€œt”:1641747585}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:55,β€œ19”:68},β€œt”:1641747588}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ17”:4},β€œt”:1641747750}

I turned it off and on remotely and than I get these:

{β€œdps”:{β€œ18”:54,β€œ19”:61},β€œt”:1641750080}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:55,β€œ19”:69},β€œt”:1641750082}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ19”:61},β€œt”:1641750091}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ19”:68},β€œt”:1641750101}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:53,β€œ19”:61,β€œ20”:2345},β€œt”:1641750126}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:55,β€œ19”:68},β€œt”:1641750135}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ1”:false},β€œt”:1641750150}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ1”:true},β€œt”:1641750154}

NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:4,β€œ19”:66,β€œ20”:2337},β€œt”:1641750155}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:55,β€œ19”:64},β€œt”:1641750157}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ19”:74},β€œt”:1641750160}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ18”:53,β€œ19”:63,β€œ20”:2345},β€œt”:1641750167}

where the β€œdps”:{β€œ17”:4}" came from… I don’t know
but I found this on Function Definition-Documentation-Tuya Developer

  • 17 Increase power add_ele Send and report value Value range: 0 to 50000, interval: 100
    (maybe the interval of 100 is why sometimes it works for a while and stops after… time)
    kind regards,

also finding

NEW DATA ATRIBUTE: {β€œdps”:{β€œ9”:0},β€œt”:1641751481}
NEW DATA ATRIBUTE: {β€œdps”:{β€œ17”:3},β€œt”:1641753150}

9 = Switch 1 countdown countdown_1 Send and report value Value range: 0 to 86400, interval: 1, multiple: 0, unit: s Required

maybe your script fails when it receives one of these values?

9= Switch 1 countdown
17= Increase power

cfr: Function Definition-Documentation-Tuya Developer

Try without IP

Well, the script indeed does not process these parameters (as homey does not have anywhere to store it) but i check the availability of every parameter before processing it. So i don’t see why the script would crash on this.

Best way to find the reason would be to have a log / connect a terminal and see what’s crashing.

It should just read the line, find no data elements to process and move to the next line.

        // onoff devices

        // verwerk onoff
        if (data.dps.hasOwnProperty('1') == true && type == 'onoff') {
            device.setCapabilityValue('onoff', data.dps['1'])
            .catch(err => {
                console.error(err);
            });
        }

        // verwerk parameter 18 current
        if (data.dps.hasOwnProperty('18') == true && type == 'onoff') {
            device.setCapabilityValue('measure_current', data.dps['18'] / 1000)
            .catch(err => {
                console.error(err);
            });
        }

        // verwerk parameter 19 measure power
        if (data.dps.hasOwnProperty('19') == true && type == 'onoff') {
            device.setCapabilityValue('measure_power', data.dps['19'] / 10)
            .catch(err => {
                console.error(err);
            });
        }

        // verwerk parameter 20 voltage
        if (data.dps.hasOwnProperty('20') == true && type == 'onoff') {
            device.setCapabilityValue('measure_voltage', data.dps['20'] / 10)
            .catch(err => {
                console.error(err);
            });
        }

Hi Rens, did some extra testing…
so when homey is rebooting, you see the smartplugs working for some seconds (even indicating the power usage for a second)…
afterwards this is what is mentioned in the dps
NEW DATA ATRIBUTE: {β€œdps”:{β€œ1”:null,β€œ2”:null,β€œ3”:null,β€œ101”:null,β€œ102”:null,β€œ103”:null}}

the strange thing is that if I use the β€œweb app” (browserversion)
with the standard view it’s indicated it’s unavailable (and can’t operate it)
image

but if I change the view to big items (or whatever it’s called), I can use the slider to turn the device on/off…
image

maybe this helps to troubleshoot?

kind regards

I have same problem I think. This device has worked for a couple of weeks then suddenly it stopped working. Looking in logs gives the same response as above NEW DATA ATRIBUTE: {β€œdps”:{β€œ1”:null,β€œ2”:null,β€œ3”:null,β€œ101”:null,β€œ102”:null,β€œ103”:null}}.

I have now tried and re-add the device, and everything seems to be right except I cannot control the device. Device works through SmartLife app. The device is an Deltaco outdoor plug with powermeetering.

I have got some smart plugs from Kruidvat. Do they pair with this app?

I get an error as shown i attached picture when adding a device. I have tried both leaving Version-field empty and enteirng β€œ3.1”. But always same error.

image

Joep, should alse work, because Kruidvat uses tuya :wink:

Are you sure they will work? Did anyone test this? There is a review of someone stating he was able to link directly to Google home. So maybe they are not even Zigbee but WiFi…