[App][Pro] Tuya Cloud

@Hannes85
The one marked in your screenshot is likely not text but a boolean. Just quickly browsed the code an text should work fine. Else its not properly or at all send by tuya.

Instead of looking at the logs its likely better to look at the other tab “device debug” key/value pairs show in there reflect what the tuya cloud app actually recieves. If device debug tab is empty set it to DP control mode.

2 Likes

@ all:

A hint.
When you didn’t know already:
ANY event is being received with the “text message received” card.

The only purpose of the “number / boolean message received” cards , is to directly provide for a numeric or boolean tag to use in your flows.
(boolean = yes/no or true/false)

So, when you’re unsure of the format, always start with the “text message received” card, to see what data is sent by your Tuya devices.

1 Like

You sir, are a rock star! Checking the device debug tab showed a couple of options (the ones that actually were received successfully in Homey). I then switched to DP mode and it gave a lot more functions. Going back to Homey instantly it showed loads of extra info coming in.

Thanks so much for this belated Christmas gift Jepke!

So, I have checked the messages that are being sent on the Tuya Developer platform. As long as the socket is turned on, it sends every bit of information as per the screenshot.

However, if it is switched off, it only sends the voltage data. No power related (0 W one would assume) data is being sent, nor current one. As a result, the app still thinks the power consumption is what it was when the device was on. See below.

My educated guess is, for some reason the app lacks the if condition like this:

if the device is switched off, set power and current to 0

Not sure if the communication protocol has changed or this is just a bug in the app. Now, as I understood, there’s no-one to amend the app, isn’t there?

Its more of a thing for the socket itself. The homey tuya app relies on data being send by tuya. If new wattage or amps values aren’t send there are no trigger to update those vlues.

From my early pre homey days I had a few wifi plugs in my collection that did the same in the tuya app.

Like Jepke wrote, this can’t be fixed @ Homey level, only Tuya can fix by sending “0” values when that socket is turned off.
You can request @ Tuya support and wait.

Or, use this workaround:
You can use Advanced Virtual Device to replace the original socket device (which you can “hide” by moving it to a zone called “zombie” or whatever).

You can control the AVD, and use the values with use of the ‘reflect’ functionality.
It makes values of other devices available to the AVD without the use of flows.

To set the power and current reading to zero when the socket is turned off, you can use a flow to update the power & current fields with the value “0”

In case you’re thinking WTF? I’m happy to make an example AVD.
Also you can take a look here for many examples;
And here’s all posts about “reflect

1 Like

@Jepke - Well, the trigger would be DP ID Switch = 0 as it is working in Homey app. Haven’t written Homey app yet (although am planning to), but any programming language should allow to do this.

@Peter_Kawa - I will try asking Tuya support and also check the AVD option. It’s just I would like to have the same look and feel as the socket device e.g. all the icons, insights, etc.

Not saying it isnt possible in the code but its a work around of a flaw from the device itself.

It’s as simple as adding write measurement capability value 0 async with sending the command to tuya to turn of the device.

Problem with adding work arounds to code of pretty much everything as when you start doing so you’ll end up with unstable code sooner or later. Especially with devices originating from Tuya your workaround that fixes it for you will break someone elses device. The correct flow of messages and triggers would be that tuya cloud sends 0 watts/amps over the WS so it correctly triggers the flow within the tuya cloud app upon received messages.

Good day all,
I have a reoccurring bug around twice a month.
At a certain point the Tuya Cloud app doesn’t receive any new updates on status, values etc.
Restarting the app will fix it and then it works again for a few weeks.

Does anyone experience this same issue and/or does someone know a fix/workaround?
I am thinking just to schedule a weekly restart of the app, but not sure if there are better solutions…

Thanks

Hi @Jurgen_Heine, I sent you a DM. Have you seen these?

Hello,

Is it possible to add a (Weau) pool heat pump in the Homey Tuya app?

I’ve already made a Tuya account and added the device in the IoT Platform. It’s visible and online, but can’t add the device in the Homey app.

Homey Tuya app settings are also filled in.

Can you help me?

Thanks in advance.

No (explained below), unless you can find someone who can add it to the app code.
But, no tears! Workarounds are mentioned in post #1, look for tap-to-run / RAW commands to get your heat pump controlled by Homey!

1 Like

Good morning,

I have a door sensor that integrates with Homey but does not change status.

I tried this method:

But I don’t receive any notification when I activate the sensor.

Does anyone have an idea?

Can you see a status change at your iot.tuya.com project page ?
Here’s an earlier posted screenshot:

Yes :slight_smile:

OK. Then it should send RAW commands. Always use ‘text message received’ cards when testing, ánd also the sensor sends literally the words ON and off.
Do the other devices work OK?

Yes the others but I go through Tuya scenes.

I can’t find this “text message received” card

I should point out that if I restart the Tuya app in Homey the status becomes good.

Another clarification if it helps, for example my “well valve”

If I turn on Homey I see the information in Tuya and even on my Tuya mobile app.

If I turn on from the Tuya mobile app, I don’t see it in homey.

I meant the flow card you showed :wink:
But…
It’s good you showed your flow, it gave me a hint of what might be the culprit:
keep in mind the “push notifications” can get rate limited (this disables the notifications), because the “text event received” card can trigger the flow a lot, an awful lot.
Please use Simple Log logcards for this, it saves log messages at Homey storage, no rate limits involved.
(Hint: using timeline notifications is also a bad idea, while they also can get rate limited).

Rate limits lasts for 24 hours, or until a Homey reboot.

Most annoying part: this happens without any warning whatsoever. You can only see an error message when you test run the flow.

I have no other ideas for now, it’s always a challenge to find out what’s wrong when things partly work and partly don’t

I got my kids some LSC Battletron ball lights. Nice stuff!
I am able to add them to Homey through Tuya cloud. However, whereas I can fully control the LSC light strip (dimming and color are all I need) the Battletron ball lights can be switched on and off, but not dimmed. And although it does show a color picker, it doesn’t change the color at all.

Hello Jurgen
Hope you are well, I am just messaging as I am knew to Homey and am struggling with some bits, this Tuya Official api acces id, for more information: is required
I have created another login to the Tuya IoT Platform Config site but I cannot see where to go from there, its probably sitting in front of me but could you please help.