I have an Android and an air conditioner plugged into a home automation outlet. Could you build a thermostat with these components for acclimatize the dining room of my house and thus avoid the heatwave when returning home? The theory told me yes, but I had to prove it. And it worked better than I thought.
I won’t surprise anyone if I say that it’s hot, at least if you live in the northern hemisphere: we are currently experiencing a wave of high temperatures in Europe. And of course, this means higher air conditioning costs; with the consequent increase in the electricity bill. Luckily, I have solar panels at home and during the day the air conditioning works for me, quite the opposite of what happens at night. I had something to do.
The mobile temperature sensor can be used as a thermostat
I’ll start at the beginning: to protect the phone’s components from high temperatures, manufacturers mount various sensors with which the system constantly measures the degrees at which it operates. In general, smartphones They integrate a thermometer into the processor, also into the battery
Knowing about sensors, I had a question: could they reflect changes in the temperature of the environment in order to measure degrees in a room? The phone’s thermometer is not designed for this, but since the phone is kept in the room, it should reflect the air temperature where it is as long as it is not performing tasks with the screen off. With this assumption, I used one of my favorite apps: MacroDroid.
The application can automate many processes based on triggers, situations that occur on the mobile and with which it can interact. The temperature sensor is one of them: MacroDroid can activate functions depending on the temperature reached by the phone battery. On paper, it is perfect for use as a thermostat. With practice, I was able to corroborate this.
Let’s get practical: here’s how to set up an old Android as a thermostat for air conditioning
The temperature sensors built into smartphones capture the room’s oscillation in degrees accurately enough to use the phone’s thermostat. Of course, this accuracy has some flexibility: In my tests, I noticed a difference from reality of 0.5 to 1 degree. Given the current temperatures in my house, this seems like a fairly small margin of error for what I was looking for: transform an Android into a thermostat to turn the air conditioning on and off.
For the task I used a Nothing Phone (1), the battery temperature sensor responded very well to the experiment. I installed MacroDroid on my phone, I have the air conditioning connected to a home automation socket and I configured it to work with Gemini. With everything ready, I managed to turn on the air conditioning It turns on and off depending on the room temperature.
- I opened MacroDroid and selected “Add Macro”.
- I pressed the “+” on the triggers.
- I went to “Battery/Power” and clicked on “Battery Temperature”.
- I clicked “OK” on “Increase/Decrease”, marked “Increase to” and selected 26º C. This way MacroDroid triggers when the phone temperature reaches 26°C; which will mark the start of the air conditioning.
- I went to actions and pressed the “+”.
- I went into device actions and added “Voice Search”.
- I pressed the “+” again, entered “Macros” and clicked “Wait before next action”. I chose two secondsmore than enough for Gemini to prick up his ear.
- Finally, I clicked on the “+” again to add a third action: “Speak text”, within the “Device actions”. I wrote in the text field “Turn on the air conditioning“.
- I gave the macro a name and recorded it: with it, the phone measures the battery temperature, activates the shutter when the temperature exceeds 26ºC, launches the Google Assistant and speaks to give it the order. Since I had already configured the home automation plug in Assistant, the result was an Android phone converted into a home thermostat.
- Following the previous steps, I recorded a new macro to trigger when the temperature drops to 22ºC. The text to speak on the phone was “Turn off the air conditioning” Thermostat finished.
All values are configurable, I can adjust the temperatures I want. After that, all I had to do was put my mobile phone, still fixed, in a quiet place in the dining room, I left it plugged in and I made sure to delete as many applications as possible with the idea that the proper functioning of the phone does not change the temperature captured by the battery sensor. Once the mobile phone was acclimatized to the ambient environment, the sensor fluctuations were consistent with the temperature variations.
The mobile phone should be kept as inactive as possible with the screen off so that performing tasks does not increase the battery temperature; what would trigger the air conditioning
Can an old Android replace a thermostat? I checked that yes. Although the air conditioning requires a remote-activated outlet, which is not too expensive either. Despite the margin of logical error and the delay in acclimatizing to the room temperature, the truth is that the trick works.
Cover image | Ivan Linares
In Xataka Android | “Tomorrow, you’re going to drink”: your Android phone can warn you of a heatwave
In Xataka Android | Redmi Note 13 Pro or POCO F6, which one to choose? Duel of titans with HyperOS