Turning a Dumb AC Unit Smart Without Losing My Security Deposit
TL;DR – The hack works and costs ~$15
A DIY retrofit using an ESP32‑controlled stepper motor to turn the AC’s temperature knob lets a renter automate a purely analog PTAC unit via Home Assistant, all without drilling into the unit or violating the lease.
Why a stepper‑motor retrofit is the simplest solution
Conclusion: Mechanical actuation of the existing knob avoids high‑voltage wiring, smart‑plug incompatibility, and landlord objections.
- The PTAC’s control circuit runs at line voltage with no low‑voltage control pins, making a direct electrical retrofit unsafe and likely to void the lease.
- Smart plugs cannot handle the unit’s NEMA 5‑20P plug, and cycling power on a running compressor can damage the unit.
- Attaching a stepper motor to the temperature knob (Option 2 in the original post) requires only a low‑voltage supply, a few cheap parts, and no permanent modifications to the chassis.
"The more I mess around with ESP32s and home automation, the more I realize that what looks like jank to a software engineer is just the way these things work." – timvdalen (HN comment)
Parts list and cost breakdown (V0 & V1)
Conclusion: The entire system can be assembled for under $15 using off‑the‑shelf components.
| Part | V0 Cost | V1 Cost | Source |
|---|---|---|---|
| ESP32 dev board | $6.00 | $3.30 (smaller board) | Amazon / Temu |
| Shaft coupler | $6.69 | $2.42 | Amazon / Temu |
| Stepper motor + driver | $2.66 (3‑pack) | $2.66 | Amazon |
| L‑bracket | free (reused IKEA) | $0.50 | Amazon |
| Screws / nuts | free (spare) | negligible | Amazon |
| USB cable & charger | free (junk drawer) | $5.00 | Temu |
| Binder clip & cardboard padding | free | negligible | Office supplies |
| Total: ~$16 for V0, ~$14 for V1. |
Mechanical design – mounting without drilling
Conclusion: Using L‑brackets, a binder clip, and cardboard padding creates a removable mount that satisfies lease constraints.
- The stepper motor is bolted to an L‑bracket; the bracket’s edge presses against the AC’s control cavity wall, converting motor torque into knob rotation.
- A binder clip holds the assembly to the metal sheet inside the unit, while cardboard pads prevent metal‑to‑metal wear.
- This “jank” solution is sufficient for a rental because it can be removed without leaving marks.
"If all you need to do is replace a potentiometer with electronic control, a vactrol or digital pot could work, but it’s more invasive." – kazinator (HN comment)
Firmware – minimal MQTT bridge
Conclusion: A few dozen lines of code let the ESP32 expose the motor as an MQTT cover, enabling Home Assistant control.
// Pseudocode excerpt
void mqttCallback(char* topic, byte* payload, unsigned int len) {
String msg = String((char*)payload).substring(0, len);
if (String(topic) == COMMAND_TOPIC) handleCoverCommand(msg);
}
void handleCoverCommand(const String& cmd) {
if (cmd == "OPEN") moveMotor(stepsPerRev, speed);
else if (cmd == "CLOSE") moveMotor(-stepsPerRev, speed);
else if (cmd == "STOP") stopMotor();
}
The device publishes an MQTT discovery payload so Home Assistant automatically creates a cover entity. The cover’s OPEN/CLOSE commands rotate the knob forward or backward a full revolution, which corresponds to “coldest” and “off” positions.
"https://esphome.io/ would make the software side of this a 10‑minute job" – vayun (HN comment)
Home Assistant integration – generic thermostat
Conclusion: Mapping the MQTT cover to a generic_thermostat entity provides full thermostat logic without custom code.
climate:
- platform: generic_thermostat
name: Living Room AC
heater: cover.ac_stepper_cover
target_sensor: sensor.airgradient_temperature
min_temp: 65
max_temp: 80
ac_mode: true
cold_tolerance: 0.5
hot_tolerance: 0.5
The thermostat monitors a room temperature sensor (e.g., AirGradient ONE) and issues OPEN/CLOSE commands to the cover, automatically turning the AC on when the temperature exceeds the setpoint and off when it drops below.
Real‑world performance and limitations
Conclusion: The system is functional but suffers from mechanical sag and occasional motor stalls, which are tolerable compared to manual knob adjustments.
- Over time the binder‑clip mount can loosen, increasing friction and causing the motor to stall until manually reseated.
- Despite the sag, the user reports a net reduction in manual effort and a modest electricity‑cost saving.
- Future improvements could include a 3D‑printed mount or a more rigid fastening method.
"If all you need is a button component, ESPHome could replace the custom firmware entirely." – timvdalen (HN comment)
Community perspectives
- Standardized interfaces: Several commenters (e.g., EvanAnderson) wish manufacturers exposed analog/digital control pins to avoid such hacks.
- Alternative approaches: Some users control PTACs via IR (see vrighter) or by wiring ESPHome directly to thermostat terminals (ethnt), but those methods often require more invasive wiring.
- Reliability concerns: scottlamb notes that MQTT/HA setups can be fragile if the Linux host fails, and suggests ESPHome’s built‑in thermostat component for a more self‑contained solution.
Final takeaways
Conclusion: A low‑budget, non‑destructive mechanical retrofit using an ESP32 and stepper motor provides a practical smart‑AC solution for renters, illustrating how DIY home automation can bridge the gap left by legacy analog appliances.
- Cost: <$15 total parts.
- Installation: No drilling, removable mount.
- Control: Fully integrated with Home Assistant via MQTT.
- Trade‑offs: Mechanical wear and occasional motor stall, but far less inconvenience than manual knob turning.
The project demonstrates that “jank” hardware combined with modern IoT software can solve real‑world rental constraints without breaking leases or blowing the budget.