[App][Pro] Tuya Cloud

Instead of [Functionvalue], use this:
{{ round( [Functionvalue] / 10 ) }}

And whats round meaning in this raw cmd? I need 0.1 accurate celsius for my tuya temperature sensor and now if its 23.4 (right now) the virtual device temperature sensor says 23. In this way round means actual round?

Search for Math or mathjs at the forum, to find out about the possibilities.

To avoid numbers like 24.1111111111111111 or similar, I often use the round function.

Indeed, round without options means: round to 0 digits.
When you need it rounded to 1 digit, use
{{ round( [Functionvalue] / 10 ,1 ) }}

Round to 2 digits, use
{{ round( [Functionvalue] / 10 ,2 ) }}

Thank you so much. I was able to make everything and now i learn raw styled flows with tuya devices and seems like every devices working. Made a virtual humidity sensor too from the tuya temp and humidity sensor so thank you again. :slight_smile:

1 Like

You can do that in one flow - and actually also for all devices - or at least - that is what I did.

You create one virtual device that includes battery, temperature and humidity and just validate whatever is in the message. I have over 10 sensors in one advanced flow and it works like a charm.

@Robert_Szilagyi @Vincent_Verbon and others,

To keep all sensors of a device together, you can create just one virtual device with multiple sensors, with an advanced virtual device of the Device Capabilities app

One of many examples:
(Click on the link or the v symbol)

1 Like

Hello. Iā€™m very new to the Homey PRO, Iā€™ve only had mine for a week. i try to configure tuya cloud but get error code 2406. i have restarted the app, relinked tuya smart with my tuya cloud develerment. deleted the account and started from scratch. refresh settings but nothing works, what am I doing wrong? Please help me!

2 posts were merged into an existing topic: Trouble configuring Tuya Cloud on Homey PRO 2023

Hello Frida,

Did you read the 1st post of this app thread?
Most apps have their own topic, with FAQ and howtoā€™s, which can be found at the bottom of the homey.app store app page.
And / or use the search function, you could have searched for ā€œ2406ā€.

But, as I already found it for you, here you go:



My guess right now: in the app settings, make sure you use the Tuya Smart or SmartLife app account to log in, and use the emailaddress instead of the username; see screenshot



And also, do NOT use your iot.tuya.com login. Thatā€™s only for authenticating to the iot platform site.

I have made a tuya project, linked my tuya app account, set the variables in de homey tuya cloud app but still my devices are not visible within Homey Pro.

All settings are correct as described. Restarted the app and the Homey itself but still no luck. Anyone who can help me out??

Hi Peter and thanks for your reply!

I didnā€™t know that most apps have their own topic. Thanks. But Iā€™m not getting any wiser about my problem.
Iā€™m still using Tuya Smart, Iā€™ve also tried using SmartLife and my region is correct. The link between App and Cloud seems to work and I have relinked it as many times as possible with no results. My Cloud Project was created a week ago so after May 25, 2021.
I log in with my e-mail address (which is not linked to Facebook, google or the like) and the e-mail address I log in to the app, not the e-mail address I log in to the IoT platform with. I have also selected Use official only on Choose desired API(S). I have uninstalled, deleted and redone both app in phone, in homey and on IoT. I have also removed devices and added them againā€¦

I now saw that I have received a message in Homey that ā€œYou are still using the old deprecated API and drivers, please switch to new drivers only.ā€
After some googling, I looked up information about API keys. So I made a new one and put it in homeyscript.
I am very grateful for any feedback you can provide!

The message youā€™re getting is related to this setting probably:
image

Set it in the app configuration to ā€˜use official onlyā€™
I know you mentioned you did configure that, but the message youā€™re receiving indicates using older API.

@Peter_Kawa, maybe Iā€™m not getting your advice exactly as I do have one virtual device with all sensors configured - with the virtual devices app, I didnā€™t need the device capabilities app for that. How does using ā€˜advanced virtual deviceā€™ have a benefit over that config ?
In the device capabilities I just selected the three values the sensor supports (temp, humidity and battery) and it works.

I see. While Iā€™m not actively using the Virtual Devices app anymore, I was thinking one can use only one capability each VD, my bad!

Iā€™d say just read the Advanced virtual device and device capabilities topics, to discover the possibilities.

YW!

  1. I assume youā€™ve read all of post #1 ?

  2. What country number did you enter?

  1. Did you select ā€œTuyaā€ as well in the dropdown ā€œMobile Appā€ (below the country number entry)?

Did you find the YT vid in this thread? maybe it helps while you can watch almost all config steps:

  1. Can you share a screenshot of the app config screen (pls hide personal info)?

Iā€™ll read up on AD anyway, wouldnā€™t have thought of that without your post :-). , I figured idd that you thought I had a device defined per capability.

1 Like

Hello again! I canā€™t figure out what Iā€™m doing wrong. I have watched YT several times, follow all the instructions, still it doesnā€™t work. Same error code all the time. My Homey PRO, Tuya and devices were purchased less than a month ago. Iā€™m starting to feel really stupidā€¦

trying to send a picture of the settings in the Homey app

I forgot, what do you mean by country number? I am central Europe. +46

Ah, that might be it. Only enter 46 in the ā€˜Telephone country codeā€™ field (Youā€™re from Sweden, right?).
And youā€™re not the only one having a hard time configuring this. Thereā€™s just many things which can go wrong.

Wow!!! Its working!!! Thank you so much!!!

1 Like