Smart Life Temperature Sensor use returned value in Logicblock


I would like a very simple flow that is triggered whenever the temperature is reported from a Smart Life connected sensor. In my Logicblock, I would like to send a notification to IFTTT which includes the reported temperature so it can be written to a log.

The problem I am having is that I cannot work out how to pass the returned temp beyond the condition. Reading a few threads, I don’t believe that the value is currently surfaced beyond the condition. Is this correct, or am I missing something?

1 Like

Hi @inspoadam ,
you are correct, that’s currently not possible because the values are stored in variables not accessible in actions.


I think this is a solid feature request.

1 Like

It most certainly is for me. Allow me to explain my use case.

I have a rack fitted with blade server, network switch and a few other bits and pieces. The rack is enclosed and requires a fan to help air flow and help with temperature management. With this in mind, I have a number of options as follows.

  1. Configure the fan to permanently run at 100%.
  2. Have the fan turn on/off (100%/0%) at a preset temperature threshold.
  3. Turn the fan on/off at a preset minimum temperature threshold and gradually increase speed as the temperature increases until it is running at 100% at a maximum temperature threshold. With the opposite result when the temperature decreases.

I have chosen to go with 3 as firstly both 1 and 2 are inefficient and secondly (arguably more important), 1 and 2 are just no fun to implement.

I have currently set everything up directly in Smart Life and it appears to be working well.

The next thing I would like to do is log the current temp and the speed of the fan, so I have the data in which I can determine if I need to tweak the settings.

It would also be really good if I could port the automation over to Apilio as I have 6 separate automation routines in Smart Life, which is a bit ugly. If I could get this into Apilio, I could clean this up a lot (and give the grey matter a fairly good workout).

I have another option in which I take the trigger from the temperature sensor and query the sensor directly (using an API hosted by a 3rd party provider) , which hooks into Tuya Developer, but I wanted to see if I could do anything directly in Apilio before going down that route.

I have tried submitting a support request directly with Tuya for enhancements in Smart Life conditions (e.g. When something is not equal to and/or nested conditions in a scene), but it has become clear that they really are not interested in developing the product beyond basic capabilities.


Thanks for your explanations!
For the data bit: If you connect the temperature sensor to Apilio, you can see the temperature changes in the log files of Apilio, which you can export as CSV.


Or Apilio could just make the sensor variables accessible? :mage: :grinning:

1 Like

Of course! I hope in a future not too far away :+1:


Absolutely. It’s certainly considerably less work than writing my own API. :blush:

1 Like

I use Apilio/Smart Life to control the temperature of a swimming pool, for which I also need to log the temperature for reference.

For this I use a Tuya thermostat to set the temperature of the pool and turn the heating on when needed, with Apilio controlling whether the thermostat is on or off.

However, the limitation of not being able to access the current temperature from the thermostat within Apilio means that I have resorted to having a second dedicated temperature sensor to provide readings to IFTTT. I then log these in IFTTT to a Google Sheet.

I do look forward to being able to access the sensor variable direct however!

For your application, there could well be advantages in having a dedicated smart thermostat as you could then have a defined “switch on” point when the temperature rises too high. The reason for this is that you are then not dependent on your devices being online (for example, if your Wi-Fi ever goes down) for the fan to get switched on. For this reason, I have the main temperature control for the pool programmed into the smart thermostat rather than getting Apilio to change it directly, with Apilio just switching the whole system off or on (along with the associated pool pumps etc) as this is more robust. I can imagine in your case, failing to switch the cooling fan on just because your Wi-Fi or the Tuya services have a glitch could be very bad…

1 Like

Thanks for this, looks like another vote to expose the sensor variables and a really interesting view on system resilience.