EvanAnderson 1 day ago

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.

  • danudey 1 day ago

    It always kind of blows my mind that I keep seeing "smart TVs" which have a bunch of integration options for high-end AV installations (rich people's houses, etc.) but no API that you can integrate with to just handle toggling channels/inputs/power states/volumes.

    (I did get my last Sony Bravia integrated with Homekit so that I could control inputs, volume, etc. via the Home app, but that's not really what I'm looking for).

    Give me an HTTPS API, require me to authenticate devices on the TV itself before it accepts their commands, and just let me do whatever. Default it to off and make it a hidden setting, but yeah just let me do the thing without having to pay tens of thousands of dollars for some professional installation to integrate with hardware I don't have and can't afford.

    • lstodd 1 day ago

      It always blows my mind why those rich people even bother with TVs. I'm not rich by any measure, but still I can afford a projector, a screen and a couple KRK monitors.

      • Guvante 1 day ago

        Multi use rooms require TVs.

        Projectors cannot handle ambient light without being a fire hazard.

        • ghaff 23 hours ago

          >Multi use rooms require TVs

          That seems an overstatement. I now have one in my entire house (don't have kids).

          There's a fairly large TV panel on one wall in basically a sitting room. Otherwise I just use a computer. A relative basically has TVs in every room. I guess it maybe made sense when he was rebuilding anyway but it still seems excessive to me who might sit down to watch a movie or show but doesn't have live TV.

          But, then, I don't have AC either in Massachusetts.

          • Guvante 20 hours ago

            I was responding to projectors...

            • ghaff 20 hours ago

              But you also seem to also be saying that a lot of rooms require TVs.

              • spockz 11 hours ago

                Only transitively. The claim was that if you have a “multi use room”, as opposed to a dedicated tv/movie room, you need a TV instead of a projector.

                • ghaff 10 hours ago

                  I apparently didn't get the intent that TV=panel. Fair enough. But I do know people who put a TV in pretty much every room and I don't know if a projector is a great solution at this point even for a dedicated room given that you can get 75" (or larger) panels.

                  I will say that when all sorts of stuff got pulled out of my house for smoke damage mitigation, I also made the conscious decision to just not put back a lot of the things/wiring that I really wasn't using to any degree. A lot has changed (both with respect to technology and myself) to the point where it really didn't make sense to put things back like they were.

        • lstodd 23 hours ago

          If you are rich you have single-use rooms. Hell, even I have a sleeping room, a cat room and a hacking room. It's not that expensive. The cat room doubles as a mini-cinema.

          Ambient light is dealt with having nice thick blackout drapes.

          This is not some rocket science, it was done for like a hundred years.

          edit: actually in my former apartment I just bought a roll-down projector screen that completely covered the window. pull down - zero ambient light even in full sunshine.

          • vel0city 23 hours ago

            Lots of people (even exceptionally wealthy ones) don't want to always have to go to the theater room to go watch something. Lots of people like having the TV on in the same way one might think about having a radio on, its not necessarily a thing they're exclusively focused on.

            Take a look at this house:

            https://www.zillow.com/homedetails/5619-Walnut-Hill-Ln-Dalla...?

            Sure, it has a theater room with probably an incredible projector I'd imagine. It also has a bar with a big TV behind it. It also has a game room with several TVs mounted on the walls. In both of those situations, you wouldn't really want a projection setup. A brighter TV wins out in the end.

            I've seen lots of TVs mounted in outdoor living room/kitchen arrangements. They're common to find in living rooms even for people who have separate theater rooms. I've seen them mounted in garages. TVs have uses other than just pure cinematic experiences. And I say that as someone who has personally pushed TV watching to an exclusive space in my home and made a point to not have TVs everywhere. Other people like different things.

            • ghaff 23 hours ago

              A relative likes to have TV on as ambient background. Drives me a bit crazy but, hey, I'm a guest. Also used to drive me nuts when I was on group trips with a roommate and their first reaction on entering a room was to turn the TV on.

          • Guvante 20 hours ago

            My point was it isn't as simple as projectors are better.

            To be clear I only know this because I was totally going to swap to a projector once I bought a place only to realize they don't work well during the day.

          • Kirby64 7 hours ago

            > If you are rich you have single-use rooms.

            Yes, you might, but you can also have normal multi-use rooms. It's not like being rich somehow makes a 'standard' living room configuration with TV and couch gauche. The likely main difference is the couch is going to be way bigger and the TV is probably 100" inches.

            Theater/cinema rooms are a very different experience (lights off, dedicated to watching the thing) compared to a standard lights on TV experience. Two different purposes.

      • Alien1Being 23 hours ago

        Truly rich people do not have TVs.

        Or if they do own a ultra high end TV like a C Seed N1 they hide them away inconspicuously.

        https://www.cseed.com/en/indoor-tv/c-seed-n1-tv.html

        It is like eating cheap and nasty junk. If you are rich you avoid it or eat it discreetly...Or your acquaintances laugh at you.

        • Nursie 16 hours ago

          That's certainly a feature screen. Not sure it's inconspicuous!

          I think I'd likely prefer one of those slightly more discrete OLEDs that rolls up into its box when not in use, like the LG Signature R...

      • rendx 22 hours ago

        It always blows my mind what ideas people have what "rich people" have or want.

        I know a few 'filthy rich' people and some of them don't even own any TV or projector, because they're totally content with a laptop screen and don't want their kids to be exposed to TVs. You will not see their wealth unless you know where to look.

        Once people have money, most of them begin to think about what actually serves them and what doesn't; if you can afford anything you want, you usually become more humble and selective. There's simply no point in owning things for the sake of owning them any more. Displaying your wealth usually has far more downsides than upsides. What we see is the outliers.

        • kelnos 18 hours ago

          > What we see is the outliers.

          For every ostentatiously visibly rich person, there are 100 quiet ones shaking their heads.

    • dfxm12 1 day ago

      Smart TVs don't exist for your convenience. They exist to track your behavior and serve you ads. If they happen to have some hackability, it's an accident or happy coincidence.

    • yegle 22 hours ago

      I think the standard control for TV is the RS-232C port on the TV.

      https://community.home-assistant.io/t/serial-projector-contr... from a quick search.

      • lmz 21 hours ago

        HDMI CEC could do something similar as well.

      • GauntletWizard 20 hours ago

        I'm surprised we haven't seen a cheap, USB powered Bluetooth RE-232C dongle for home assistant yet.

        • manyatoms 16 hours ago

          Say if we have a pi laying around, could we emulate this?

          • ssl-3 14 hours ago

            I guess we could.

            Using a whole Raspberry Pi seems like overkill, though: Support for a wide variety of common USB serial chips is already built into esphome. https://esphome.io/components/usb_uart/

            Just wire it up with a cheap dev board, build a firmware image for it, and that end of things is... done, right?

      • mnw21cam 10 hours ago

        One of the meeting rooms here at work has a couple of big panels for displaying presentations, and they're regularly misinterpreting noise on some line or other and changing their brightness/contrast/etc settings. It's highly annoying. I imagine there's some kind of data line plugged into the TVs which is picking up interference and causing them to freak out.

      • EvanAnderson 8 hours ago

        I inherited an old Sharp LCD TV that has a serial port. I did some digging and discovered I can power it on and off thru the serial port (amongst other commands). It serves a role in my home where it needs to be on part of the day. Turning it on and off via serial is very, very nice.

    • closeparen 22 hours ago

      In the professional A/V integration world, it's normal for displays and projectors to have serial port interfaces that can be driven by commands from e.g. a Crestron controller or video switcher. Just not as much of a home/consumer thing.

      • wolvoleo 18 hours ago

        Most LGs had a serial option, you can plug in a very specific USB to serial module in its USB port and then control it over serial with fairly generic commands.

        Not sure if they still have this though. Mine does.

    • jayd16 19 hours ago

      There's eARC for signalling through HDMI, there's good ol' IR blaster.

      For the Bravia, which is probably Android, you can likely write an android service that connects to the web and handles things like volume and maybe channels.

      • mikepurvis 17 hours ago

        IR blasters are rough because there's no feedback. You're literally just shouting out commands into the void, and heaven forbid if it's something that's a toggle where you don't know which state you're starting from.

  • QuercusMax 1 day ago

    Exactly.

    I don't want a "smart" washer / dryer / fridge / toaster. I want a standard interface I can build my own system around, or use someone else's that they've already built.

    • Terr_ 23 hours ago

      I wish lock-in was as taboo as medieval Christian attitudes towards usury.

      • inigyou 22 hours ago

        But weren't medieval Christian attitudes towards usury a good thing?

        • Rumudiez 21 hours ago

          wouldn't treating lock-in as taboo be a good thing?

        • selcuka 21 hours ago

          I guess usury is analogous to lock-in in your parent comment, not the Christian attitudes.

        • IncreasePosts 17 hours ago

          No, because who would lend money when they would just get the same amount back later, plus the risk of not getting repaid?

          • inigyou 15 hours ago

            Pretty sure that's the point.

        • Terr_ 14 hours ago

          Well, whether is was good isn't really a yes-or-no answer, especially when it got tied together with religious persecution.

          I don't think I'd like to reintroduce it exactly as it was, but it's a useful example because:

          1. It demonstrates how a strong economic-norm can arise from popular concern that a certain "buyer/borrower beware" arrangement is too prone to abuse.

          2. Being unusual to us, it's easier to see and consider, as opposed to existing norms we may take for granted as "just how things are."

          3. Since it changed over time (albeit by going away) it indicates that change is possible, and shows those economic rules are socially-constructed.

      • BetterThanSober 14 hours ago

        Not minmaxing rent-seeking behavior and vendor lock is a taboo in our contemporary late stage capitalism society

    • amelius 11 hours ago

      > Exactly. I don't want a "smart" washer / dryer / fridge / toaster. I want a standard interface I can build my own system around, or use someone else's that they've already built.

      I also don't want a "smart" phone. Just give me a normal phone with a standard interface so I can build my own system around it.

  • ghaff 1 day ago

    When I had a kitchen fire, I told my electrician "no smart stuff" and he was happy to go along. (I had very little previously.) He did simplify and updated my electrical panel and switches which sort of accreted over time.

  • Rebelgecko 23 hours ago

    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

  • inigyou 22 hours ago

    Many smart meters have an LED that blinks every time you consume a watt-hour.

    • EraYaN 11 hours ago

      And if you happen to be in some parts of Europe they will have a 6 pin connector that will send out data telegrams with all the stuff from the meter. DSMR is the standard that defines it for the Netherlands and port is called P1, seems to be (slowly) spreading. And you can also (wirelessly) pair a gas meter to the electricity meter to read that as well, and the new ones give you up to date data every second. Regulators CAN just make this happen clearly.

    • moebrowne 11 hours ago

      They also often have a small magnet embedded in the rotor which can be picked up with a reed switch or hall-effect sensor

  • fsckboy 20 hours ago

    >HVAC equipment does this with standardized thermostat terminals.

    yes, they standardize thermostat terminals, but they should allow additional inputs such as a measure of radiant heat entering through the boundary surfaces. I have to change my thermostat far more because it's a sunny day than I need to because of different outdoor temperatures. Bear in mind, I shouldn't have to change my thermostat at all† (except perhaps between summer and winter)

    † perhaps my biggest pet peeve, and I have many, is that 99% of the population—including engineers from top universities—believe that if you feel warm you should imediately max-out your A/C thermostat, and when you get cold you should shut it off. It's a thermostat, its job is to turn on-and-off to maintain a temperature. I never touch the one in my car and it works great. (as mentioned, I need to change the house thermostat, see solar radiance‡ above)

    ‡ I once had the pleasure to work with a great mechanical engineer, he designed climate systems for art museums and other public and billionaire buildings, and I described my radiant heat problem and he said "that would be super advanced, I've never heard of any systems that do that."⹋

    ⹋ another one of my pet peeves is footnotes. In general, they require a massive context shift, as if it's not a problem to keep your place while you look in another place. But notice how I've threaded mine so they do not require congnitive leaps.

    • necovek 16 hours ago

      Does the radiant heat not increase the room temperature, thus affecting the indoor temp sensor? Combining that input with outdoor temperature (and whole weather stations) is totally done.

      Similarly, floor heating systems measure temperature of the radiating element (floor) and room temperature to decide if they switch heating on or off.

      I generally combine shutters for large windows in controlling the temperature in my automation too (greenhouse effect).

      • NoLinkToMe 15 hours ago

        > Does the radiant heat not increase the room temperature, thus affecting the indoor temp sensor? C

        Yes but the temperature of the air in your home is only one part of it. The other part is the temperature of the radiant heat.

        I always understood that the temperature is measured in the shade, and that the difference between shade/sun on a sunny day can be very significant. A temperature of 22 degrees in the sun would feel like standing in the shade at 30 degrees.

        Similarly in your home it could very well be that the air is your house is heated up to 22 degrees by the outside air and radiant heat, but additionally if you're under the radiant sun sitting next to a window it can feel much hotter.

        Of course if the temperature meter itself is exposed to the radiant heat, it'll likely measure that directly. But mine for example is mounted under a table in a utility corner and gets virtually no radiant heat. I could mount it next to the window to get exposure to the radiant heat of the sun, but then if I'm sitting further away from the windows in the room I get no radiant heat but the sensor does, and it'll think the room is a lot hotter than the experience I'm having.

      • fsckboy 2 hours ago

        >Does the radiant heat not increase the room temperature, thus affecting the indoor temp sensor?

        if that was true, I would not feel the need to adjust the thermostat, i'm basing this on the pattern I've noticed wrt feeling discomfort, and I remember temperature numbers. In general, I find A/C chilly below 75ish and warm (in a humid way) above 77ish so it stands out to me when i feel the need to push the system harder just to maintain comfort

    • ssl-3 13 hours ago

      That sounds neat.

      But it's just a furnace (or just an aircon) that is controlled by a thermostat. In broad strokes, the combined system just turns things on and off (or speeds them up, or slows them down).

      So what would it do with that information if it had it?

      I mean: Suppose that the thermostat knows, however it knows this, that you're experiencing an uncomfortable level of warmth due to radiant heat in a particular room.

      What does it do next? Make everything else in the house (or the zone) cooler to compensate? Something else, instead?

  • miki123211 11 hours ago

    What I want instead is for devices to ship a (tiny) HTML/JS control panel (or its hash if ROM space is limited), using some specialized interface to make requests over BLE or a relay chosen by the user.

    The reason we need an app in the first place is 1) customizability, 2) ability to access the device even when out of WiFi range, even when behind carrier-grade NAT and/or a restrictive firewall. A design where the device hosts a simple "server" that makes an outbound connection to a proxy of the user's choosing, likely provided by their smartphone vendor, to receive requests would solve both problems.

  • atoav 11 hours ago

    This is what drives me to sometimes DIY devices instead of buying them. There is so much crap on the market and it gets increasingly hard to tell where the catch is. Does it only work with the manufacturers weird cloud? Which feature(s) do work without? What settings are even possible?

    Really simple appliances can be very hard to find, e.g. a desk fan that can be set to spin very slow. Most fans have 3 or 5 speed settings and the lowest is already tenfold too high for my taste. Solution? Get the dumbest fan you can find and speed control the motor yourself.

  • cucumber3732842 9 hours ago

    >HVAC equipment does this with standardized thermostat terminals.

    The industry hates this and wants it gone because they want you locked into buying the rest of the stack from them and they want you shelling out $$$ for emergency repairs rather than jumpering it when it fails at a bad time.

vayun 1 day ago

https://esphome.io/ would make the software side of this a 10 minute job

  • chpatrick 1 day ago

    This, I'm very surprised they didn't go with it.

  • bumby 7 hours ago

    As someone else mentioned, a software-oriented solution is likely to introduce more failure modes because of the number of dependencies, updates etc.

    • Boltgolt 6 hours ago

      Updates? To an ESPHome device?

chem83 1 day ago

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.

  • shadytrees 18 hours ago

    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.

    • Maxion 13 hours ago

      The PTAC units shown in the article look like something from the 1950s. Minisplits have been the way the world has done AC for a long long time now. It's interesting how foreign of a product it is in the US.

      • dn3500 12 hours ago

        It uses R-22 so it's pretty old, but probably not 1950s. Maybe 1970s. R-22 was phased out starting in the 1980s, and banned in 2010 (that's in Europe, maybe later in US).

        When I lived in the US I tried to get a minisplit and they wanted $4000 for a medium size unit! The same one where I live now is $400 installed.

    • chem83 5 hours ago

      Agree with the mini split observation. Mostly ductless, but sometimes ducted. Specifically, they're heat pumps, which removes the need to add an oil or gas furnace and works reasonably well for NYC winter when there's modern foam-based insulation and windows. Those 4-6 story new-construction or gut-level renovation buildings in Brooklyn have largely gone that route.

  • horticulturist 6 hours ago

    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).

kazinator 16 hours ago

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.

timvdalen 12 hours ago

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/

  • bdavbdav 12 hours ago

    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.

asveikau 23 hours ago

> 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.

  • yakkers 17 hours ago

    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.

    • robbak 14 hours ago

      Thermostats often have mechanisms at the top and/or bottom that force the switch to be on or off.

  • petesergeant 12 hours ago

    > 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.

scottlamb 1 day ago

> 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.

  • danudey 1 day ago

    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.

  • barnas2 1 day ago

    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.

    • scottlamb 20 hours ago

      Nice. I don't have any ESPHome thermostats right now, but I have an ESPHome fridge/freezer temperature monitor. I adopted the same idea: it should integrate with HA when HA is available, but it should be useful even when HA is down. So in addition to exporting the raw temperature to HA, the alert threshold is kept on the device rather than in HA so it can locally compute the alert state. This triggers a directly wired piezo buzzer, in addition to an HA phone notification.

      You do have to set the "api: reboot_timeout: 0" if you don't want it to reboot itself every 15 minutes while HA is down. I persisted the alert threshold to flash though so even if it does reboot it comes right back up and works fine.

Reason077 1 day ago

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.

  • itslennysfault 1 day ago

    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.

    • throwway120385 23 hours ago

      Just putty over it and get a slightly matching high-gloss or semi-gloss enamel and nobody will notice it. I've put tons of holes in things in rentals over the years and basically nobody will care as long as you restore it to like condition when you leave.

    • prmoustache 14 hours ago

      Have you ever seen a landlord check that kind of things really?

      Unless you have made a mess with wires getting out looking like a fire hazard in waiting I don't know anyone who would stop at 2 tiny screw holes. Heck the landowner may not even remember the unit was not made that way in the first place.

  • singron 20 hours ago

    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.

  • tjoff 8 hours ago

    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 :)

scosman 22 hours ago

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.

timvdalen 12 hours ago

The more I mess around with ESP32s and home automation, the more I realize that was looks like jank to a software engineer is just the way these things work.

Look at the MAC addresses of smart devices connected to your home network and 90% of them are just going to be ESP32 chips hooked up in this way to some control mechanism, but in a nicer enclosure.

gwbas1c 22 hours ago

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.

  • daniel5151 22 hours ago

    I discuss this quite early in the writeup. There is a whole section on why a smart plug will not work here.

    • cogman10 22 hours ago

      If you are ever feeling like burning down your apartment ;), the route I'd take is buying a 5-20p extension cable, cutting it open, and splicing in a 120V switch into the middle of it. You can find a few smart switches that fit that bill for whatever relay tech you are interested. It's non-invasive for the AC unit and can be quickly removed.

      There's only 3 wires to deal with as well so it's not THAT scary to make your own cable (but I'd understand why you might feel differently).

    • gwbas1c 7 hours ago

      I skimmed that.

      First, I'm not referring to a smart plug. I'm referring to a thermostat-controlled plug. You were afraid that it would rapidly turn the AC on and off, which would burn out the motor.

      They don't do that. Mine (when I use them with a heater) run it for a few minutes, then turn it off for awhile. They don't rapidly turn the heater on and off. I assume it's the same way when run in cooling mode.

      The people who make them aren't stupid.

      ---

      WRT a rely: They are safe, you just need to look at the rating for the load. (The point of a relay is to switch a high current / voltage load.) I use an industrial one for an outdoor outlet: It can handle the full 15 amps of the circuit safely. (I use it to adapt a smart switch that can only handle light loads, including a relay.)

      • cogman10 4 hours ago

        > It can handle the full 15 amps of the circuit safely.

        OP would need a more beefy relay for an AC unit. 20A minimum, but honestly a 30 or 40A relay would be warranted as AC units have a pretty large "spike" when they turn on which generally exceeds the amp rating of their circuit. It's short enough to not trigger a circuit breaker, but it's something to be aware of when designing things like relays.

  • bdavbdav 12 hours ago

    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.

Moto7451 1 day ago

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.

m101 8 hours ago

A friend of mine has the same problem with his, but his AC unit doesn't have knobs but rather has touch sensitive buttons (those ones where a finger is required). Any ideas how we might get around controlling that one?

nightfly 16 hours ago

> so it took a few Amazon returns until I found the right one

This a pet peeve of mine. If you buy the wrong $2 part don't return it. If you don't eat the loss the seller will and the part will wind up in the landfill.

  • wccrawford 10 hours ago

    It's $7 part made of a tiny bit of metal.

    If it was actually a $2 part, I'd agree with you. But it's enough that it's probably worth returning, especially since he had to try a few to get it right, and then he can return them all at once.

    It's not his fault if it ends up in the landfill. That's on Amazon. Also, they have discount stores they ship returned stuff to before it hits the landfill.

Graziano_M 16 hours ago

Damn. I have wanted to do the same at my place for years (also in NYC). He beat me to it. I also can’t just use a smart plug. Unfortunately I only have one knob, it has four positions (and is open anywhere between), and requires a good amount of torque to move. I’d need to gear down the stepper and figure out a way to detect when it’s in the correct position (maybe an encoder, maybe current sense to ‘feel’ when it’s reached a close position?)

marcogarces 7 hours ago

Here I was all proud of myself for controlling my Mitsubishi AC via CN105 connector using pure ESPHome and this guy does this great hack! Good job!

a-dub 1 day ago

that's a fun project. i'd be a little concerned about the servos failing to fully switch the switches or placing wear on them, maybe a dangerous failure mode where it is switched into and left in an in-between state unattended that could lead to a fire hazard.

you can buy smart outlets with the correct connector, just look for 20A versions. (honeywell, at a minimum, sells one).

https://prod-edam.honeywell.com/content/dam/honeywell-edam/h...

  • EvanAnderson 1 day ago

    The lack of feedback from the AC unit makes using a switched outlet potentially problematic. You really need to know the state of the compressor cycling before you go mucking with turning it on and off. (At least this was the case with the refrigeration compressors I am familiar with from my youth.) A current sensor could provide feedback but that goes beyond a regular smart switch.

    • a-dub 1 day ago

      i don't think that's true. i still have a thinkeco ac modlet that coned sent me years ago as part of some kind of "make your ac smart" promotion.

      if you turn those knobs to the off position while the compressor is running, does it actually go into some kind of orderly shutdown or does it abruptly cut power to the compressor?

      • bob1029 1 day ago

        The wiring diagram for this article seems to reflect it would be a hard shutdown. Most HVAC systems I have interacted with have zero problems with a sudden power loss. The only potential issue is bringing the compressor back up too quickly on the other side. You could easily control for this if you were switching the whole unit using software.

      • inigyou 22 hours ago

        I don't think its the shutdown that's the problem but the restart. If I fiddle with the thermostat on my fridge, it turns off in one direction, but if I turn it all the opposite way it won't come back on for a few minutes. I think this is the relevant interlock. Something about letting pressure equalize.

        • EvanAnderson 21 hours ago

          High head pressure on startup is the problem I'm thinking of. Generally there is a delay after shutdown and a lockout on restart until the head pressure is lower. In the old refrigeration compressors I am familiar with there was an electromechanical timer to facilitate this lockout.

    • ssl-3 12 hours ago

      Naw. It's not quite that weird. It's actually pretty simple. :)

      The compressor can be turned off at any time. It doesn't matter where in the compression cycle it is when it becomes unpowered; it just doesn't care. It's probably ultimately going to come to rest on a compression stroke no matter what, anyway (Newton's 3rd law, etc).

      While the compressor is off, the high pressure side leaks down. That's good. (Sometimes, that's a noisy process: We've probably all heard aircons and fridges and such hiss and/or gurgle a bit after they've been turned completely off in an otherwise-quiet room; that's the sound of the high and low pressure sides approaching equilibrium.)

      The only trick is to wait a bit for the pressure to leak down before restarting it again; a minute or two is almost certainly more than plenty with a small loop. That wait is just to make the compressor's job of restarting a bit easier than it could be otherwise.

      The risk of restarting too soon is that it's harder on things than it could be. It might be hard enough on things that the compressor stalls. Stalled compressors are bad because they use a lot of current and make a lot of heat, but there's safety cutouts present that are designed to prevent them from becoming fire just for these instances.

      And anyway, it's all completely avoidable in this scenario: Set the smart plug to default to off (for when recovering from a real power outage), program a reliable restart delay into whatever the control system is (Home Assistant or whatever), and call it a day. This is functionally exactly what my Nest thermostat does.

      (Some aircons already have a delay at fresh power-up as an unavoidable built-in feature, and these don't need any special handling at all.)

ethnt 1 day ago

I was in a similar situation with my apartment PTAC unit, but mine has thermostat terminals — I would not be surprised if this one does too. I was able to hook up an Ecobee thermostat, with the downside being that it's way more expensive than OP's solution.

  • newhotelowner 1 day ago

    30 years old PTAC has wired thermostat terminals. But I dolike OPs solution.

vrighter 14 hours ago

I turned mine smart by using an esp32, an IR led and a n ir demodulator. The esp32 has the ir led pointed towards the AC and the receiver aimed at the room. It then hosts a small html page and connects via wifi to my home network. It used the receiver to sync its internal state, if the actual remote controller was used.

daniel5151 23 hours ago

Oh, hey, I'm the author!

Happy to answer any questions :)

  • LittleLily 15 hours ago

    Any reason why you didn't just use ESPHome for the firmware?

    It even has a component specifically for the ULN2003 stepper motor driver you were using

    https://esphome.io/components/stepper/#uln2003-component

    • daniel5151 8 hours ago

      Truth be told, while I had known about ESPHome while working on this project, for some reason, I just felt the urge to hack together my own firmware.

      It might've been because my early testing was done via an old Arduino Uno board, and I must've figured that I might as well port the sketch over to the ESP32 once I had it working.

      (I'm general though, I will say that LLMs can totally write bespoke one-off firmwares like this, and I don't feel too bad about it, given that it's running entirely within my LAN, and will never actually get "productized")

ryeguy_24 1 day ago

I have to say. Nice work. I spent years wanting to build something like this to integrate to these systems. I never did but have spent years thinking about this. So, nice work and really appreciate your motivation.

Liftyee 1 day ago

I don't get how so many large buildings in NYC and Beijing (two cities that I've personally visited) use independent little AC units like the PTAC or minisplit types. A couple per apartment, peppered over the outer walls. Engineers intuition says surely a large central unit would be more efficient and effective.

Is it because of personal ownership reasons? Counterintuitive physics? Heat dissipation limitations on the roof?

Can someone with more knowledge clue me in?

  • trillic 1 day ago

    There are no air ducts to move air between the units. They are old brick buildings and retrofitting central air you might as well tear down and rebuild a lot of the time.

    • blacksmith_tb 1 day ago

      Which of course means they should use heat pumps, since the copper lines don't need nearly as much room (I suppose you'd still have to put a drywall wall in front of one brick wall potentially). Even just putting a bunch of mini-splits on the roof (instead of individual window AC units) would be an improvement, seems like.

      • Amezarak 19 hours ago

        The only difference between a heat pump and an AC is a reversal valve to change which direction you’re pumping the heat in. (Of course obviously an AC fundamentally is a heat pump, but setting that aside.) That makes it very hard to puzzle out what you mean by this comment.

      • kube-system 7 hours ago

        Yes, mini-splits are a good retrofit option, and they are efficient as well. They are more work to install than a PTAC, though, so cheap landlords pick PTACs to reduce labor cost.

        PTACs are self contained and so they don't even require an HVAC technician to install. Simply knock a hole in a wall and plug it in. They are basically a permanent version of a window AC unit.

  • drdexebtjl 1 day ago

    I had the option to buy a “central” unit or several mini splits for my apartment. I chose several mini splits. The main reason is that they can fail independently, so I’m not stuck in an apartment that is hot everywhere.

    But I think the main reason is that in places without central AC, people tend to want to incrementally upgrade. For example, you might get a mini split just for your bedroom, because that’s the room you require the most comfort during the hot days. Then when you start getting used to the comfort of the AC in the bedroom, you’ll want one in the living room. And so on.

    • necovek 15 hours ago

      I went with a multi-split central AC: despite the higher cost, it is generally a usability mess.

      You can only run one mode for all rooms, and while that sounds reasonable, I have one tiny storage room that houses my old dual Xeon heater, which requires AC on even in the winter.

    • prmoustache 14 hours ago

      The main reason is that landlord only pay for the installation while the tenant pay the electricity bill. Landlord has no incentive to invest more than the minimum.

  • wolvoleo 18 hours ago

    I think what also plays a role is that this way each tenant gets charged for AC use through their own power bill. No difficult central accounting to do.

    Still, split units are way easier and more efficient but I guess the landlords just go for the cheapest option.

  • necovek 15 hours ago

    Not in US, but on top of no room for air ducts, running long copper lines (for both mini split and multi-split units) tends to be expensive (price of copper). You also need to guide condensation out, so either downward piping or (expensive) water pumps everywhere. Installation ends up being more expensive than the AC system.

  • kube-system 7 hours ago

    They are cheaper and easier to retrofit in existing buildings. The landlord pays for the installation of these units, but typically not the cost to operate them, so they are primarily concerned with optimizing install cost and have little to no concern for efficiency.

bdavbdav 12 hours ago

I think the crank the temp hard one way or another is a fairly common approach. It’s what I do to have home assistant use my nest thermostat as a dumb switch.

niko323 7 hours ago

This is great! Congrats!

andix 1 day ago

OT: I'm looking for some way to control my AC via Infrared. I have a few pretty standard AC units with IR remotes. The ones with a display on it, that just transmit all the settings on the remote via IR on every button press.

Some device I can mount in proximity, that controls the AC, but preferably also has a temperature and humidity sensor included.

  • mardef 1 day ago

    I use http://getmysa.com for this. they have their own app and scheduling, but i just automate mine via homeassistant

    • andix 1 day ago

      This doesn't look like it can control the AC unit via infrared. How did you solve that part?

      • mardef 23 hours ago

        They have a version for mini-splits that is an ir blaster.

  • chpatrick 1 day ago

    Some ACs have UART interfaces inside that can be fairly easily hooked up to an esp32.

    You could also buy an IR transmitter module from AliExpress and add a temperature/humidity sensor chip on I2C like an SHT41.

  • pornel 18 hours ago

    I've successfully emulated remotes with ESPHome + xiao seeed + basic IR diode. Dozen lines of YAML can turn it into a thermostat in Home Assistant.

    Flipper Zero can record IR remotes.

  • cromniomancer 15 hours ago

    The Broadlink Rm4 Pro IR blaster puck includes an optional "Sensor Cable" which measures temperature and humidity directly. The initial setup via the app is terrible and requires location services for Wi-Fi pairing, but once that's done it has worked fairly well.

    I had better luck for my use cases with the Aqara M2 Hub. I believe that device is discontinued, but they seem to have other very similar models. No built in climate sensors on that one, but the UX and IR signal response time have been much better overall.

  • imp0cat 15 hours ago

    If you are not averse to an off-the-shelf solution, Broadlink RM4 PRO universal remote will do both IR and 433MHz wireless (records and replays codes). The temperature and humidity sensor which you can plug-in if you need it is sold separately though (Broadlink HTS2).

  • ssl-3 13 hours ago

    I tried that with one once back in the pre-bot days. While someone could certainly have made it work, I couldn't make sense of the IR commands with available tools and this model wasn't something that others had already figured out (I tried all that ESPHome included).

    I thought about building my own controls for it: After all, it's just a compressor and a fan that are each controlled by relays -- how hard could it be to have them controlled by my relays? Or to have its relays controlled by my logic?

    But then I discovered that this particular aircon would resume, with a delay[1], after a power outage.

    So I turned it on and left it on, and put it on a smart plug. It turned out that this was Good Enough, and there was no drama. It just worked.

    Plus, because Home Assistant: I was able to use a temperature sensor that I found available in the Alexa speaker that I already had on the night stand to prove that the overall concept worked. (I added a Zigbee temperature sensor later on.)

    [1]: The compressor likes to stay switched off for awhile after it has been recently run. People sometimes like to make it sound complicated or mysterious, but: It's just to help prevent the compressor from trying to restart while from a resting position that is in the middle of a compression stroke. Doing that is harder on things than it could be in the best case, and it stalls the compressor in the worst case (which can then extend to exercising thermal and/or overcurrent protection).

    But as long as there's a bit of a gap between runs, then that provides time for the high-pressure side to leak down so there's not so much to compress, and the compressor can restart without too much fuss. That's all; that's the whole merit. My aircon's irrevocable power-up delay handled that problem well-enough, but the logic could be scripted in HA's YAML with a helper if that were necessary.

  • dracotomes 12 hours ago

    I don't know if there is a pre-made solution but it's easily doable using something like an ESP32 or a Pico W and a little soldering. Maybe ESPHome has IR support but I used a micropython library and a spreadsheet to decipher a Mitsubishi Heavy IR remote. You can then use the same library to play a string of bits through an IR LED[1]. You can get IR receivers and transmitters for cheap on Amazon. You can pair that with any commonly used sensor (DHT22, HTU21, etc... I prefer the BME280), for all of which you can find libraries on GitHub and breakout boards cheaply online. Then you could either implement a small web server to control it standalone or an MQTT client to control it from i.e. Home Assistant. If you use an I2C sensor, and something like this[2] you don't even need to solder anything you can just connect it all using those DuPont cables and stuff it in a box.

    [1] https://github.com/peterhinch/micropython_ir/issues/46 [2] https://www.tindie.com/products/maxmixproject/power-bus/

  • horticulturist 5 hours ago

    I have been using Sensibo for years. Never had a problem.

bmurphy1976 23 hours ago

You need to 3D print a bracket. That's what will give you the last 10-20%.

ZeroCool2u 21 hours ago

I have this exact same problem. It's really the only annoying thing about my apartment. Would absolutely pay for an off the shelf solution to this problem.

post_break 1 day ago

Assuming running a dual hose inverter portable AC isn't against the lease agreement it would probably pay for itself based on the power usage. Pretty neat hack regardless.

  • arikrak 1 day ago

    Portable ACs are generally less efficient than regular window ACs and PTAC units since the compressor is inside the room.

    • post_break 23 hours ago

      Yes, except for dual hose inverter ones.

      • chpatrick 23 hours ago

        There are also portable split systems like Midea Portasplit.

  • BHSPitMonkey 22 hours ago

    Why? A dual-hose portable is more efficient than a single-hose, but a PTAC should (in theory) be more efficient (and possibly quieter) on account of having the heat-emitting side of the cooling loop outside of the living space, which is closer to the ideal split system - though I suppose that advantage could be undermined by the unit's age and condition.

    • ssl-3 12 hours ago

      Single-hose is always awful. It can't be other-than-awful.

      All of the air that gets pushed out of that singular exhaust hose gets replaced by hot (and often very humid) outside air -- the same stuff we're burning electricity to fight a war against. (It is my considered opinion that single-hose portable aircons should not exist, and I'd remove them from the Earth if I had the ability.)

      Dual-hose units can work OK.

      They have some advantages, too, like being portable (they can be placed in the space that most-needs cooling instead of the space where they're mounted hard into a wall), or being quiet[er].

      I've never experienced a PTAC in an NYC apartment, but some of the ones I've used in hotel rooms have been monstrously-noisy. I would never want to live with one of the noisy ones.

    • post_break 7 hours ago

      Well considering those units have an EER rating of 10-11, my comment stands. The midea duo has a SEER of 14.7. 1200 watts vs 816 watts.

MajorTakeaway 20 hours ago

Glad I have a remote control with 40 year old tech that does the same thing.

system7rocks 20 hours ago

These articles, over and over again, are what have made Hacker News one of my regular go tos for amazing ideas and creative ingenuity.

arikrak 1 day ago

Another option would be to install a smart timer in the outlet. However, you need to ensure that the heat won't automatically go on when the device is turned off, and sometimes the outlets are non-standard formats.

  • inigyou 22 hours ago

    TFA mentions this.

sublinear 23 hours ago

I'm pretty sure doing janky things to the AC you don't own is a lease violation.

I'd gladly let them keep the security deposit so that evil companies like RealPage don't blacklist me.

  • inigyou 22 hours ago

    You have to learn to ignore what the rules say and go after the practical reality. How will the landlord know you did this? They won't.

  • scottlamb 19 hours ago

    > I'm pretty sure doing janky things to the AC you don't own is a lease violation.

    Why? Not all "janky" things are the same:

    * Sloppy changes to the internal 240V wiring: yeah probably a violation of the lease, and legitimately likely to burn the place down, with associated liability.

    * Temporarily mounting to the exterior this mechanism that turns the knob shaft, with no changes to the wiring, no holes, no nothing. I can't think what grounds they'd have for considering this a lease violation or a reason to keep any of the security deposit, as long as you pop the original knob back on when you move out. And as inigyou pointed out, how would they even know?

effnorwood 1 day ago

Hey Siri, can I afford a home loan?

  • clickety_clack 1 day ago

    You’ll need to unlock your iPhone for that.

pudgywalsh 23 hours ago

I can't offer praise for controlling a mechanical thermostat with a poorly-implemented software thermostat.

If this was a remote control knob it might begin to make sense, but it isn't.

A NYC apartment with a 115V PTAC is by definition the size of a shoebox, is twisting a knob twice a day really that much of a burden?