[App][Pro] Tuya Cloud

I checked your device details again and the device is reporting the temperature and all values (min/max/step) with factor 10.

temp_set	Integer	
{
  "unit": "℃",
  "min": 50,
  "max": 400,
  "scale": 1,
  "step": 5
}

I have to adjust all values/capabilities with a new version…

@Jurgen_Heine Do you know if that’s device dependent or API dependent? The (my) heater uses normal °C values. The air conditioning device uses factor 10 values like this thermostat.

I think it’s device category specific.

I made a PR for Jurgen. The next test version will have corrected temperature scale for the thermostat.

@Renzo After installing the test version (when Jurgen uploaded it), please delete the thermostate and add again because the capability options will be kept in the device otherwise (min/max/step).

1 Like

New version with temperature fix is published to test now, thanks @RonnyW for quick fix :+1:.

2 Likes

I’ve installed the version @Jurgen_Heine uploaded.
There is indeed an updated temperature thing! Just one small nitpicky thing: the current temperature now says “20.50°“. The device will only report in .0 or .5. So if you could round to one decimal, that would be awesome.

If there is a newest version, just tell me what to do! :slight_smile: Happy to help.

temp_set	Integer	
{
  "unit": "℃",
  "min": 50,
  "max": 400,
  "scale": 1,
  "step": 5
}

Does anyone know whether the “scale” parameter in device details represents the decimals for the temperature?
If yes, I can take this on pairint to set the capability options. If not, I can only set decimals fixed to 1.

That is exactly how Z-Wave works with number values, so I would assume that is indeed the decimal factor.
The step is also a mandatory value, only allowing **.0 and **.5 values, kinda weird they gave it the value 5, I guess the scale should also be applied to that value.

1 Like

I compared this setting with a device using no scale factor.

temp_set	Integer	
{
  "unit": "℃",
  "min": 18,
  "max": 30,
  "scale": 0,
  "step": 1
}

This device only uses integer values without decimals. I thinks that’s why it doesn’t use a scale factor.
In this examplemple, the “scale” option is 0. So it seems, it represents the scaling factor for the values (10^scale).

I’m wondering if it could be device dependent (with/without decimals).

@Jurgen_Heine
I made a new PR including a scale factor for heater/thermostat devices.
This way, every device can use its scale factor which defines the amount of decimal places and the correction factor for read/set values.
The scale factor seems to be dependent on the amount of decimals defined by the device manufacturer.

@all users using heater or thermostat device:
This change will break all devices not using the default 1 decimal version (e.g. Duux heater). If you are experiencing no changes of current/target temperatures, you have to delete and add the device again - after installing the upcoming test version.

@Renzo Please delete and add the thermostat again after Jurgen has uploaded the new test version.

Btw. Even if the device has set decimals=1, the current temperature is shown with 2 decimals.
This example uses step=1 (only full °C values) and decimals=0 and still decimals are shown in Homey WebApp.
grafik

2 Likes

Thanks again @RonnyW, good one to use device scale :slight_smile: :+1: The changes are live in test now.

1 Like

Yeah, thought a bit generic device handling would be nice :slight_smile:
Same could be added to the airconditioning device. But that’s older and there are more possible user devices this would be broken.

Hi Jurgen,

I cannot get it back working again… what happend? I keep getting the ‘please configure app first’ message while trying to add a device.

I used the app before a month ago for a test with an Woox R6113 Smart plug with energy meter. These devices are added in the Tuya app and I can see them in the Tuya IoT portal.

Suddenly the device was unresponsive. And I got messages of that I still used the old API. So I tried re-adding the device and some more… then got stuck.

To be sure I did this:

  • Removed old device in Homey
  • Removed the app
  • Restart Homey Pro
  • Installed the app latest version 1.1.12
  • Set the config:
    – Official API (else I get messages to do so)
    – credentials for the Tuya app
    – API and acces key
    – landcode 31
    – checked the Tuya Cloud region is set to Central Europe
    – mobile app Tuya
    – SAVE
  • This goes fine (message says settings saved, etc)
  • Restart the app
  • Add device → socket → install
  • After a second I get a message: Please configure app first

I read all the faq’s in the starting post… but what am I missing?

Thanks for the reply

Pieter

I’ve added the device and Incan now control iets temperature. Not it’s mode.

But the temperature scale goes up to 400. That seems a lot. And it’s Celsius :sob:

nvrmnd, I see you use the current stable app version
Pls make sure your Access ID and Access Secret are copied exactly 1-on-1. Blind whitespaces, is the first letter turned into capital by some auto-correct?

Else,
Change your pw of the tuya smart phone app, copy it to the Tuya Cloud app’s User pw field, and try again.

1 Like

Hi @Renzo
sorry, I made a little copy/paste mistake. I have to make a new PR and Jurgen a new test version to correct the max value for the scale.

And your thermostat doesn’t offer a mode, only temp_set.

You can see the difference between your device attributes and my example above with a mode.
Perhaps so can use a kind of mode in the Tuya app. The heater hase something similar. But that’s something which is not transferres via Tuya cloud service. It a kind of scene used in Tuya app, but that’s nothing we can use over the cloud API.

And what’s about Celsius? Homey is internally using °C and °F only for displaying. But perhaps that’s caused by the invalid boundary of 400° :slight_smile:
So please wait (again, sorry) for a new version. Yeah, that’s the disadvantage of a beta tester.

Don’t apologize! I am already greatful for your efforts. And also happy to help!

I mentioned the Celsius for the value of 400. For debugging purpose.

Isn’t that weird? I would say that a mode change would pass through the Tuya cloud.

Sure, but not via cloud API used by this app.
See my posts above about the Duux heater and its heatin level. It’s contralable via Tuya app, but it’s not provided in the device details/debugging in Tuya cloud page.

I have been using the Tuya Cloud app for months now. It seems since a few days, I cannot control my Tuya based lights anymore.
I have restarted the app a few times (that usually does the trick), but it still doesn’t work.
If I go to the configuration of the app, change nothing and hit save, I get:“Error: Error: Code: 2406; msg: skill id invalid”

1 Like

Hi Rudi, since today I have exactly the same message. Nothing has been changed in devices, setup or flows.
Hopefully the devs know what this means :slight_smile:
Grtz Eric

I’ve got the same problem.