Tuya Thermostatic Radiator Valves

I’m new to both the world of the Smart Home and also to Apilio and IFTTT but have many years programming experience.

I have a typical UK type Central Heating System with an Oil fired Boiler and Radiators in each room. I have recently purchased Tuya Thermostatic Radiator Valve Heads which I am currently controlling via the Smart Life App.

At present I am using a dumb Room Thermostat/ Programmer to control switching on and off the boiler but I would like to be able to control this from the combined status of the 7 valve heads.

The Smart Life app shows, Selected Temperature, Current Temperature and Percentage Valve Opening. Apilio appears to only give me the first two in addition to Child Lock and Mode of which I have no interest at present.

When shown on the Dashboard/Devices incidentally, these temperatures are inflated by a factor of 10 from their actual values.

In order to achieve my goal I either need to be able to access the Percentage Valve Opening or to be able to calculate the difference between the Selected Temperature and Current temperature of each valve and when all these equate to zero to operate a smart switch to turn the boiler off and when it does not equate to zero and the boiler is turned off, to turn it on again.

I would like to know if this is possible in Apilio or whether I need to look in other directions for a solution.

Due to the nature of Smart Life and how manufacturers have coded their products it can become difficult for companies like Apilio to display all functionality from Smart life correctly so purchasing products can be hit an miss for completability, which hopefully will change with the new standard matter coming out next year. In the mean time all is not lost as @Anna says here New in Apilio: now with more Tuya devices supported!
Now Smart Life are working closely with Home Assistant compatibility issues will improve.
I’m sure if you use the web app and submit a request the team will take a look in case it is an easy fix @pebneter

Which Tuya Thermostat radiator valve did you go for?

1 Like

Great idea and question!! :+1:

As @Drivingforce mentioned correctly, we can only work with what Tuya provides through the public API.
In your case, apparently not all status data is shared via API :unamused:
To implement your workaround, you will need a feature that is not yet implemented but one of the next improvements we are tackling. Currently you can compare Tuya data only with static values - so no way to compare the two temperatures coming from the device for now.

The scaling of the numbers is also on the very short list, so you’d see a nice value display.

To summarise: You might be able to implement your use case in a couple of weeks with Apilio, but we are not there yet.

2 Likes

Thank you for your replies

Does this mean that although some values are available within the Smart Life App, that these values are not shared with all 3rd Party Developers?

1 Like

Yes, unfortunately, though this has improved over time

1 Like

In order to complete this thread for now …

It has been indicated that Tuya do not make the Valve Status available in the API but…

I believe I have found a workaround for for the time being which will enable me to use Apilio as the core of my automation now and in the future.

In my initial statement I said that the value of the Child Lock status was of no concern to me. I have found that in a Smart Life Automation that I can test the value of Valve Status for being either 0 (fully closed) or greater than zero (partially or fully open) and setting the Child Lock on the valve or releasing it accordingly. A Condition in Apilio Web App then tests the Child Lock status for all valves in a simple AND condition, the positive action for which, is to turn the boiler off and the negative is to turn the boiler on.

I have tested this using a lamp connected to my smart switch and it appears to work smoothly.

1 Like

Can you share the brand and model of the thermostat?

Peter, I bought it as Unbranded but research shows an identical item available on Amazon https://www.amazon.co.uk/SKTE-Temperature-Controller-Constant-Thermostatic/dp/B08ZS6SW9X/ref=sr_1_151?crid=20IK6SHHDEBAK&dchild=1&keywords=smart+thermostatic+radiator+valve&qid=1631289161&sprefix=smart+thermostat%2Caps%2C181&sr=8-151

1 Like

Well here is my latest situation and it doesn’t appear to be too good.

My solution worked perfectly well in early Autumn, whilst we were just wanting to get some heat into our lounge in the early evenings. The room would get to set temperature and when the valve status was 50% or less, Tuya set the Child Lock and Apilio told Tuya to Turn the boiler off.

But…

When I had my lounge at its comfortable temperature and decided I wanted to heat the bathroom up a little we hit the snag. The lounge valve is 50% open but the boiler is off so it isn’t receiving any new heat. The bathroom radiator wants heat so it turns the boiler on again and the lounge radiator receives some of tthat new heat too and starts to heat the room up further…

because the valve manufacturers decided to only fully close the valve once the room temperature exceeded set temperature by 2° C

I have asked the supplier to accept return of the valves. I don’t consider a programmed in overshoot of this amount to be acceptable, even dumb TRV’s would give better temperature control but I’m looking to reduce energy usage and to not unnecessarily heat unused areas. So I’m wondering if the REST API is my answer.

I’m familiar with Processing which is a simplified form of Java and can utilise Java libraries so I presume I could use REST API from this environment. If I did this will I be able to access each of the 4 values that Apilio makes available for each of the valves on the Devices Dashboard - Set Temperature, Current Temperature, Child Lock and Mode - and will I be able to set the three of those which can be set from the Smart Life App.

With that power and flexibility I could control the valves from my application by reducing the set temperature by 3 degrees on valves which I want to close and monitoring the room temperature of those valves in my own app to restore them to there original value once heat is rquired by that radiator again. If whilst I have the valve at this level of control its own Set Temperature is changed from the Smart Life App or from its own internal schedule, I can relinquish control until the next event.

Does that sound plausible?

1 Like

I suggest that you sign up for the Tuya Cloud Development services (it is free) to see what would be involved. Accessing Tuya devices is not a case of using a simple API call–you need to generate a time-limited security code that is passed with the call and that is not easy. I certainly don’t see how you could do it within Apilio or IFTTT–you could do it in a full JavaScript environment that supports AJAX and so has access to XMLHttpRequest, but even IFTTT scripts don’t provide that.

How about a simpler solution that you could do in Apilio? If you can read the current temperature and the set temperature, have a condition test for current temp being >= set temp, and if so have a logicblock reduce the set temperature by 2 or 3 degrees and also add a call that is delayed by (I’m guessing here) 15 min to then restore the original set temp value. This way you should not get the overheating problem, and after the delay you again carry on heating until once again you are over the set temperature, and the process repeats. Whether the correct delay should be 15 min (or 5 min?), and the set temperature reduction is 2 or 3 degrees, is something you could experiment with.

Good luck!

1 Like

I did and found it difficult to navigate my way around - I think too much terminology and acronyms that I don’t recognise or understand

I think I looked at this possibility a few weeks ago and established that Apilio can only compare a device status with a constant value. It is not possible to compare one status against that of another.

1 Like

I’m not sure what your device is returning, but if you can read the value into a numeric variable, then set your required temperature up in another numeric variable, you can set up a condition to compare these values and trigger a logicblock accordingly.

1 Like

I have 10 valves. Each valve has 4 status values.

I presume I have to use IFTTT to update the variables

1 Like

Either that, or you can set values direct by calling a webhook from Apilio (create a variable, then look at “How to update this variable”)

1 Like

Having re-visited this issue after purchasing some Tuya TRVs, I have come up with a solution (at least, one that works for the TRVs I have). This is posted in your other thread:
Provide Valve_Status from the Tuya SDK for Thermostatic Valves - Feature Requests - Apilio Community

2 Likes