Turn an Old Phone into a Cheap Wi‑Fi Temperature Sensor
You’ve got that ancient Android phone gathering dust in a drawer. It still lights up, connects to Wi‑Fi, and has a battery that refuses to quit. Why not give it a second life as a cheap temperature monitor? A little bit of tinkering and you’ll have a sensor that talks to your smart home without breaking the bank.
Why a DIY Wi‑Fi sensor makes sense now
Energy bills are climbing, and many of us are adding more smart devices to keep an eye on the house. Commercial temperature sensors can cost $20‑$30 each, and you quickly end up with a small mountain of gadgets. An old phone already has a Wi‑Fi radio, a power source, and a tiny processor. Repurposing it saves money, reduces e‑waste, and gives you a fun project to brag about at the next maker meetup.
What you’ll need
- An Android phone that still turns on (Android 6.0 or newer works best)
- A stable Wi‑Fi network
- A cheap USB charger or a solar panel if you want it off the wall
- The free Android app Sensor UDP (or any similar app that can send sensor data)
- A home‑assistant platform that can receive UDP or MQTT packets (Home Assistant, OpenHAB, etc.)
That’s it. No soldering, no extra hardware, just a phone and a few minutes of setup.
Step 1 – Clean the phone and give it a fresh start
First, back up any data you might still need and then do a factory reset. A clean system runs smoother and wastes less power. I always wipe the phone, then install a lightweight launcher like Nova Lite to keep the UI simple. It also removes those annoying background apps that love to drain the battery.
Step 2 – Install the sensor app
Open the Play Store and search for Sensor UDP. The app reads the phone’s built‑in sensors (including the battery temperature sensor) and can broadcast the values over the network. Install it, then launch the app and grant it permission to access the device’s sensors and Wi‑Fi.
Note: Most phones don’t have a dedicated ambient temperature sensor. The reading you get is the battery’s temperature, which usually tracks room temperature pretty well if the phone isn’t under heavy load. For a more accurate reading you can attach a cheap USB temperature probe via OTG, but the battery sensor works fine for a basic monitor.
Step 3 – Connect the phone to Wi‑Fi
Give the phone a static IP address so you always know where to find it. In the Wi‑Fi settings, tap the network, choose Advanced, then set IP settings to Static. Pick an address outside your DHCP range, like 192.168.1.250. This way your home‑assistant will always know where to listen.
Step 4 – Configure the app to broadcast temperature
In Sensor UDP, go to Settings → UDP. Set the Destination IP to the IP address of your home‑assistant server (e.g., 192.168.1.10). Choose a port that isn’t used by anything else, like 5005. Under Payload, select Battery Temperature and set the Update interval to 60 seconds. Save the settings.
Now the phone will send a tiny UDP packet every minute that looks like:
temp:28.5
Step 5 – Set up a listener in Home Assistant
If you already run Home Assistant, add a simple UDP sensor in your configuration.yaml:
sensor:
- platform: udp
name: "Phone Temperature"
host: 192.168.1.250
port: 5005
value_template: "{{ value.split(':')[1] }}"
unit_of_measurement: "°C"
Restart Home Assistant and you’ll see a new sensor appear on your dashboard. I like to give it a friendly icon and set a yellow background when the temperature goes above 30 °C – a quick visual cue that the house is heating up.
Step 6 – Keep the phone powered
Plug the phone into a low‑power USB charger and tuck the cable behind a piece of furniture. If you’re feeling adventurous, a small solar panel with a USB output can keep it running off the window sill. I once used a 5 W panel from a garden light kit and the phone ran for weeks without a wall outlet.
Step 7 – Optional: Add a real external sensor
If you need more precise readings, grab a DS18B20 temperature probe. It’s cheap, waterproof, and works over a single wire. Connect it to the phone via an OTG cable and a tiny USB‑to‑UART adapter. Then use an app like Serial USB Terminal to read the sensor and forward the data with the same UDP settings. The extra step adds a few minutes of wiring, but you’ll get a true ambient temperature reading.
Tips to make it reliable
- Turn off auto‑brightness and background sync. Less activity means the phone stays cooler and the temperature reading stays true to the room.
- Disable Bluetooth and GPS if you don’t need them. They just waste power.
- Use a low‑power mode or a custom ROM like LineageOS to strip out bloat.
- Place the phone away from heat sources (like a radiator or a sunny window). The battery sensor will pick up that heat and give you a false high reading.
A little story from my own bench
The first time I tried this, I used an old Nexus 5 that I’d rescued from a friend’s garage. I set it up, forgot to give it a static IP, and spent an hour hunting down the right device on my network. When I finally got it working, I celebrated by putting a tiny sticker on the back that said “I’m a thermostat now.” My cat, Sir Whiskers, seemed unimpressed, but the house stayed comfortably cool during a heat wave, and I saved $15 on a commercial sensor. Small wins add up.
What you get out of this
- A low‑cost temperature sensor that talks to any smart‑home platform.
- A recycled device that no longer sits in a drawer.
- A learning experience that shows how Wi‑Fi, UDP, and Android sensors can work together.
Give your old phone a purpose, and you’ll have a handy little monitor that keeps you in the loop about your home’s climate. Plus, you’ll feel a little bit like a mad scientist who turned a dead gadget into a living part of the house.
- → Step‑by‑Step Guide to Building a Voice‑Controlled Lighting System on a Budget @smarthomeinsights
- → DIY Home Security: Setting Up a Low-Cost Camera Network @smarthomehub
- → DIY: Turn Your Old Router into a Low-Cost Home Automation Bridge @smarthubcentral
- → Choosing the Perfect Oscilloscope for Your Next Maker Project: A Practical Guide @scopecraft
- → How to Prevent Wing Nut Stripping in Mechanical Projects – Step‑by‑Step Tips @wingnutworkshop