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.
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.
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.
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.
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.
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?
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.
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.
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.
> 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.
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.
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.
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.
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.
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).
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.
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.
24 comments:
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.
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.
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.
Multi use rooms require TVs.
Projectors cannot handle ambient light without being a fire hazard.
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.
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.
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?
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.
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.
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.
> 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.
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.
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.
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.
30 years old PTAC has wired thermostat terminals. But I dolike OPs solution.
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.
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...
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.
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.
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.
Hey Siri, can I afford a home loan?
You’ll need to unlock your iPhone for that.
Always a latch. That's key.