Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • These articles, over and over again, are what have made Hacker News one of my regular go tos for amazing ideas and creative ingenuity.
  • I don't understand why he can't just connect / disconnect the power? The thermostat is a bi-metallic strip.

    Assuming the thermostat is controlling 120V AC:

    1: There are plenty of cheap wireless thermostats for AC that you can buy off of Amazon. I have two, and they work great with space heaters.

    2: You can use a 120V relay with those thermostats to control different voltages, amperages, ect.

    ---

    BTW, controlling the dial for min cool, max cool, ect, could increase efficiency. Max cool is only needed if the unit's been off, or it's a super-hot day.

  • I had a chat with this with a friend the other day - I feel like I’m much happier to do this now I live in a dwelling on its own. I mess up, it’s my issue. You mess up in an apartment block, it’s a lot more people’s issue, who aren’t opting in to that risk.
  • This would be the route I took, but the op was scared of the plug. If their landlord does an inspection IDK that they'd love seeing a hacked power cable.

    I'd basically get something like this [1] and then put it in the middle of a patch cable.

    [1] https://www.amazon.com/Aeotec-Security-controller-electricit...

  • I discuss this quite early in the writeup. There is a whole section on why a smart plug will not work here.
  • Maybe not as fun but my sun room window unit is controlled by an off the shelf $20 thermostat designed for Air Conditioners. It’s the LUX Win 100 and is date/time programmable and features a compressor lockout so it doesn’t burn out your window unit by short cycling.

    If you have a favorite smart thermostat you could also wire up a receptacle with a contactor between it and a cord and a 24v AC transformer wired to the line side. This would make your window unit controllable just like a central air conditioner.

  • I've wired ESP32s into all my old heat pump units using ESPHome. They are more reliable and more responsive than the $400 dongle they sold with newer units.
  • Instead of attaching the motor bracket with a binder clip, consider sticking it down with some sort of removable adhesive?

    3M command strips should be very strong/secure, while also allowing for adjustment and will detach without residue when the time comes.

  • I'd cut a block of wood to fit snuggly to the left of the knob, wedge it in place and screw the stepper in to that.

    .....or just screw into the AC unit somewhere discrete and hope no one notices.

  • I'd never trust that it will hold and detach without residue, but that is probably my ignorance talking...

    I own a 3d printer which makes most of these projects look like the perfect fit for a 3d print (even when there are far simpler solutions). So that is what I'd do :)

  • I think you could use the two shafts to align and attach the mounting bracket by drilling two holes the proper distance apart. Drilling holes is pretty easy compared to cutting straight lines and I think most people are more likely to have a drill. If you use a piece of wood, the additional thickness can help the shafts to keep the wood perpendicular. You might not need any additional fastener, and the lack of fastener could help it return to a neutral position after operation rather than migrate. Also, slowing down the stepper motor can reduce unnecessary forces and the likelihood of malfunction.
  • > The rest of this blog post is a walkthrough of a software engineer’s approach to home automation and building custom hardware, and let me tell you: both the final product, and the journey to get there, are hella jank.

    IMHO it's not that bad? With the disclaimer that I'm also a software engineer who dabbles very very lightly with electronics and has no mechanical engineering expertise. But the overall approach of doing this by stepper motor seems quite defensible given the security deposit constraint. The only part that seems really janky to me is that it's not physically held in place that well as noted in this paragraph:

    > Ultimately, the biggest issue is that binder clips and cardboard aren’t quite as robust of a mounting mechanism as I’d hoped they’d be… and over time, the stepper motor tends to “sag” a bit, resulting in a bit too much friction between the motor, the coupler, and the underlying knob, causing the mechanism to stall out until someone manually goes and reseats it…

    Involving MQTT and HA can sometimes get frustrating too; having your AC not working properly if there's a problem on a Linux machine can suck. If this becomes a problem in practice, iirc ESPHome also has a thermostat component, and temperature sensors are really cheap and easy to wire in, so you could do it all on the microcontroller pretty easily in a low-code way. But if this part is working, no need to mess with it.

  • It does feel hella jank, but it's pretty obvious from the tone of the text that the author is fully aware of that. He went through every available option in order from reasonable to jank and this is the first one that worked.

    There's nothing wrong with jank as long as it's not going to burn your house down the way some of his other rejected ideas would have.

  • That's what I did. Just an esp32 relay board with a tiny screen and a knob. Then I put more esp32 sensors in each room to get individual temps, with HA logic to select which room the thermostat pays attention to. If HA dies for some reason it falls back to a local control and I'm back to the same situation as before, a thermostat that only pays attention to the temperature in the hallway it's installed in. All the boards were flashed with ESPHome.
  • > Imprecisely yeet the stepper motor all the way left/right, toggling the target temp between “really really hot” or “really really cold”

    > Option 2 certainly is the “jankier” of the two options, given that it relies on a second-order property (target temp) to power the unit on/off… but hey - whatever’s easier, right?

    Isn't this basically how a thermostat works? I.e. there is a component that is binary on/off, and a thermometer is used to decide to switch on or off.

  • > binary on/off

    On older ones, but newer ones can modulate blower speed, compressor speed, and refrigerant flow. Don't think I've seen an air-con without blower-speed as part of the cooling apparatus for a long while.

  • For the purpose of cooling, just setting the thermostat to its hottest setting would be in effect "off" just about all of the time. Depending on the design/temperature range of the thermostat, this isn't 100% though.

    If you want to be able to do both heating and cooling, it'd get a bit complicated since the above would be inverted for heating.

  • Since you hooked it up to Home Assistant anyway, I think you could have skipped the custom firmware and just used ESPHome with a Button component https://esphome.io/components/button/
  • ESP home is so powerful like this. And is great to build components for (although I find this part a little complex, lots of Claude help…).

    I’ve got a vibe coded “Nuaire Fan” controller to talk UART to my whole home ventilation and present it as a HA controllable fan.

  • If all you need to do is replace a potentiometer with electronic control, it may be possible to do that with a vactrol. It's more invasive perhaps, but then we're not dealing with anything mechanical.

    A vactrol is a device which combines LED and photoresistor in one package (sealed against the leakage of light).

    The photoresistor has a "dark resistance" that is typically very high, like hundreds of thousands of ohms. When it is illuminated by the LED, the resistance goes down: you control how much via the current to the LED.

    Another possibility is using a digital potentiometer, like this: https://ww1.microchip.com/downloads/en/DeviceDoc/20005207B.p...

    A digital pot is an integrated circuit that switches a bank of resistors with FETs to create a desired resistance, or combination of resistances to simulate a wiper position along an analog pot's track.

    They are programmed with I2C and such.

    These things have certain disadvantages; like the one I linked to requires that power rails be provided for the analog domain where the resistors "live", and the voltages on them must be within this range. The vactrol has no such issue; it is a passive resistor with light shining on it.

  • > If all you need to do is replace a potentiometer with electronic control, it may be possible to do that with a vactrol. It's more invasive perhaps, but then we're not dealing with anything mechanical.

    This is what I was wondering about as well.

    The knobs on the unit are probably potentiometers, so it ought to be possible to replace them with a digital device of some kind, and avoid the mechanical coupling altogether.

    I imagine that the author did consider this possibility, but decided that disassembling the control panel in order to replace or byypass them was just too difficult and dangerous, especially since everything is at AC line voltage as he notes in the write-up. The modern smart thermostats that I've looked inside have a clean separate between the low-voltage digital side, and the AC-line-voltage power control side… but evidently these older purely-analog devices didn't.

  • https://esphome.io/ would make the software side of this a 10 minute job
  • This, I'm very surprised they didn't go with it.
  • As someone else mentioned, a software-oriented solution is likely to introduce more failure modes because of the number of dependencies, updates etc.
  • It's insane to me that some new construction buildings still use PTACs. Having used too many of those, this was a deal-breaker last time I was in the market for an apartment. Such a New York thing, just like how you cannot have a balcony on the 2nd floor, or how you won't find those sink garbage disposal grinders in any kitchen. But cross the Hudson toward NJ, and my understanding is that they're common. It's a combination of hyper-local regulations and economic incentives that date from god-knows-when and make American cities very unique in their quirks.
  • Garbage disposals were at one time illegal, and despite the passage of 30 years there’s still concern in existing buildings that the plumbing can’t handle it (which is probably unfounded).
  • PTACs suck. Well-maintained, newer models suck less, but they still suck. Unless well-insulated, the sleeves leak air (and humidity). And there's a duopoly between Ice Air and Islandaire, so they get to charge more for maintenance. They benefit from the trend of maintenance for older models being a yearly chore also.

    From what I understand, PTACs started as a convenient way to retrofit apartments with air conditioning. You don't need ductwork, which I believe is more expensive in the concrete buildings around here. Also, I think you need protected refrigerant sleeves to meet code here, but only if the sleeves go from one floor to another (someone just told me this fact today, and i haven't verified this).

    BTW that PTAC's thermostat dial in the link doesn't have numbers around the dial, which I think is honest. No A/C unit I've ever owned has managed to have a thermostat that read the temperature I was feeling consistently. It makes me think the apartment was built before the late 2010s though -- still feels new but a generation ago in HVAC terms. Mini-splits seem to have arrived, even for <1M condos. Talking to the mini-split contractors I had over recently for a squeaky noise, I got the feeling that business was booming. They had every day in the summer booked months in advance.

  • The "couple a stepper motor to a shaft" API is so much better than any "smart" appliance API.

    Speaking more seriously, I wish classes of appliances would expose some simple analog and digital interface pins in a standardized configuration to let users choose whatever automation or monitoring hardware they want. HVAC equipment does this with standardized thermostat terminals. I'd love to see that on other types of appliances, too.

    The manufacturer's crappy "app" that will inevitably be abandoned and require keeping some old phone / tablet in good "health" lest you lose the "smart" functionality (or worse, any use of) the appliance.

    Then current way of putting the "smarts" inside the appliance is just planned obsolescence and a recipe for all of us being eyeball deep in ewaste.

  • Many smart meters have an LED that blinks every time you consume a watt-hour.
  • Nowadays it's surprisingly easy to vibecode replacements to some shitty OEM apps (and fix bugs while you're at it). I've had pretty good luck with BT devices, even ones that dont use standard GATTs