[HN Gopher] Building my own HomeKit Thermostat ___________________________________________________________________ Building my own HomeKit Thermostat Author : frenchie4111 Score : 95 points Date : 2020-12-27 18:06 UTC (4 hours ago) (HTM) web link (www.staycaffeinated.com) (TXT) w3m dump (www.staycaffeinated.com) | bombcar wrote: | This is ingenious (and thermostats are notoriously simple) but | I'm surprised it was easier than just running a neutral wire for | an Ecobee. | gregmac wrote: | On the topic: I've had an ecobee 3 for the past few years, and | I'm pretty happy with it - if you're in the market I'd highly | recommend one. Killer features are mostly from the room | sensors: | | * Keep upstairs comfortable at night, main floor during the day | | * Auto home/away mode (based on motion). This works so well, I | only just changed the schedule to account for working from home | about a month ago | | I also like "Run fan for minimum of x minutes per hour" as it | makes a noticeable difference on sunny days where the South | side of the house is normally a lot warmer than the North. | | Other than that, the app is decent and it's easy to connect to | Home Assistant. | | I have an older wifi thermostat controlling my fireplace, and a | very useful automation I only just added turns on the furnace | fan when the fireplace is "on" (temp set above 21) which helps | keep the house balanced. | wincy wrote: | My only complaint about the ecobee is the Alexa integration | will listen when I tell my Echo Dot to play music then I'll | end up with the Dot playing Apple Music and the Ecobee | playing I Heart Radio or whatever because it doesn't support | Apple Music. So two songs playing and one on a garbage | thermostat speaker. I wish it could just have Alexa support | but only for thermostat stuff then ignore anything else. | johns wrote: | Why not turn off Alexa all together on the stat and have | the regular Alexa control it through the integration? | JamesSwift wrote: | I too am pretty happy overall with it. The web portal is | pretty bad though. Its very finicky about logging in and | maintaining its session. The app "Just Works" for the most | part. | zepto wrote: | Yeah - it's a fun project. I considered doing the same, because | of course. | | However there is more than one solution for ecobee. | | 1. Replace the existing wiring! Probably not as hard as you | think. | | 2. Use an external power supply - this is supported by ecobee. | | 3. There are 2 to 3 wire converters: | https://support.ecobee.com/hc/en-us/articles/360008702251-FA... | | Roll your own is fun, but these options are all going to be | quicker and result in a better solution. | frenchie4111 wrote: | Didn't realize external power supply was available on ecobee, | I contacted support (before purchasing) and they only gave me | the neutral wire suggestion. | zepto wrote: | Yeah - I was also misinformed by support both before and | after purchase. | | They have a great resource library but their support staff | don't seem to get enough training. | | Edit: I had to fish a new wire for one thermostat, and | rewire the furnace for another. The results were well worth | it though because of the wireless temperature and occupancy | sensors. | vmception wrote: | HomeKit often times is better than the OEM's app for their own | product. | kitsunesoba wrote: | It's a bit of a recurring pattern with Apple software. Good | example is with tvOS, where streaming apps based on the | template app that Apple provides are typically less frustrating | and more functional than bespoke streaming apps. | | Similarly, on iPadOS streaming services delivered through Apple | TV+ channels often have better quality than those delivered via | provider apps -- this has been extremely visible going from | watching Star Trek through the CBS TV+ channel w/4k video and | 7.1 surround to The Expanse through the Prime Video app which | delivers a "1080p" stream that often looks worse than Youtube | 720p. | | I think the root problem with all of these examples is | companies treating software as a checkbox when it should be | treated as core to the product. | thewebcount wrote: | I don't know what it is about Amazon software, but at least | in the Apple ecosystem, it's terrible. I downloaded the macOS | version of the Kindle reader because I was reading a | programming-related book. A single page turn would take | seconds to complete on a Mac Pro. I ended up profiling it | with Instruments. It was a QT app that they had obviously | ported from another platform and done no performance tuning | on. It turned out it was redrawing the page 4 or 5 times, and | allocating and freeing something like 40MB of memory on each | redraw. It seemed like just having a statically allocated | 40MB buffer would have solved the problem, but who knows? It | was pretty appalling. | | The ratings for their own software on their own web site show | all the problems.[0] | | [0]https://www.amazon.com/Amazon-Digital-Services-LLC- | Download/... | frenchie4111 wrote: | I'd be interested in seeing if products can become HomeKit | only. Unfortunately you still sort of need your own app for | setup, etc. It's a decently sized barrier for manufacturers, | and their app ends up shit anyway. | saagarjha wrote: | You can actually set up some devices without downloading a | manufacturer app. I did this for an iDevices thermostat I | bought recently, although I downloaded their app later | because the home app has no idea how to do "keep the | temperature between this range during these hours". (The app | is not half bad, FWIW.) | alexwasserman wrote: | Most the HomeKit products I've tried don't need the native | apps, just Homekit native on the phone. | | Vocolinc and Wemo both are like this. In fact, the latest | Vocolinc app has a "Homekit" mode, where it's basically just | passthrough. Used for updating firmware only, pretty much. | | I recently added a new Wemo smart-plug and used Homekit, not | the app. The plug works fine in Homekit, doesn't even appear | in the Wemo app. The only downside is no way to update | firmware. | | Biggest downside to Homekit only, is that you lose specific | functionality a manufacturer might have. That said, I find | Homekit to be better than the vendor stuff anyway, so stick | with it. | aliljet wrote: | Honestly, if HomeKit was something that we could use in an | operating system that wasn't owned by Apple (~70% of devices on | the planet ride Android, to be clear), the title here would feel | a little bit more reasonable, but alas, Apple is the truest of | true closed ecosystems. Open doesn't look like HomeKit and those | boycotting walled gardens should know better than to find | themselves trapped inside Apple. | frenchie4111 wrote: | Sure. I'll accept that I am just complaining that I can't get | from one walled garden to the other. From my perspective, if | they are all walled gardens, I might-aswell choose the best | one. | dpeck wrote: | It would be nice if more hardware vendors got out of their own | way and supported HomeKit. It's not perfect, at all, but it is | far ahead of the typical vendor provided software experience. | vinay427 wrote: | HomeAssistant or HomeBridge (?) work great for this. At least | with HA, nearly every reasonably communicable smart device can | be finagled into cooperation and HomeKit sees them all through | a bridge. I even have a "legacy/real" home alarm system wired | up with it along with smart switches with flashed firmware to | avoid OEM app issues. | LASR wrote: | I've been running Home Assistant (https://www.home- | assistant.io/hassio/) | | The default configuration has an integration for HomeKit such | that it bridges devices that do not have dedicated support. For | example, I can control my Google-only through my iPhone. | | Highly recommended, especially the appliance vm image or docker | (hassio) | Maximus9000 wrote: | Does homekit automatically mean the device has better cyber | security? | thangalin wrote: | A related question regarding Wi-Fi line voltage thermostats: | | https://iot.stackexchange.com/questions/2895/wi-fi-line-volt... | | The question lists a number of commercial thermostats that may be | of interest, as well as a nod to WebThings: | | https://iot.mozilla.org/gateway/ | runjake wrote: | It doesn't render on my iPad but which esp32 HomeKit library is | the author using? | | I have an esp32 sensor system in my garage I'd like to add | HomeKit functionality to. | frenchie4111 wrote: | This is the one [1], sorry about the link not rendering. Pretty | simple to use, I just followed the Lightbulb example [2] | | [1] https://github.com/Brawrdon/esp-homekit-arduino- | sdk?utm_sour... | | [2] https://github.com/espressif/esp-homekit- | sdk/tree/master/exa... | runjake wrote: | So great. Thank you. I think you've saved me a bit of trouble | with my sensor project (a chest freezer monitor). | frenchie4111 wrote: | Good luck. I'd love to hear how it goes | covercash wrote: | I've had a very good experience using one of these to provide | HomeKit compatibility to Nest devices: | https://www.starlinghome.io | CharlesW wrote: | Thanks for posting this! This looks like a fine product, and it | led me to learn that Starling Home Hub is effectively | "homebridge-nest[1] in a box", which is great news for | Homebridge[2] users. | | [1] https://www.npmjs.com/package/homebridge-nest [2] | https://github.com/homebridge/homebridge | covercash wrote: | I ran Homebridge for a while but got tired of dealing with | maintenance. The Starling box is set-it-and-forget-it. I | don't think I've had to access the control panel since | installing it so it was well worth the $100 imo. | CharlesW wrote: | For sure, the reduced cognitive overhead is absolutely | worth the price of admission. | | I need to run Homebridge anyway for a bunch of devices that | I want to be available via Alexa and HomeKit, so for me | there was no incremental complexity. I'm running Homebridge | via a Docker image[1] on my NAS (using QNAP Container | Station), with Homebridge UI to manage. | | [1] https://github.com/oznu/docker-homebridge | frenchie4111 wrote: | This is cool. It's crazy to me that this sort of thing needs to | exist | mattowen_uk wrote: | Neat, this dovetails into a recent comment of mine quite nicely.. | | https://news.ycombinator.com/item?id=25465667 | amelius wrote: | Thermostats have been the subject of maker magazines since the | beginning of DIY electronics, (personally) to the point it | became boring to read another article about them. If only I | could have guessed they had the potential to spawn a billion | dollar industry. Anyway, just typing "DIY thermostat" into | Google returns quite a lot of projects. | MarkusWandel wrote: | I've been running homemade HVAC control for 12 years now. A few | points: | | 1. Have "can't fail" safeties. In my case, that's the existing | thermostat in parallel with the relay (so that the house can't | freeze up if my system fails) and a second extra thermostat in | series with it (so that if it fails stuck on, things won't | overheat too badly). The second safety thermostat can be out of | the way, like in the basement. | | 2. Assuming you live in a northern area and have a furnace that's | less than a decade old, it may well be a two-stage (i.e. high and | low heat mode) one set up for autostaging (run on low for 5 | minutes, then fire up full blast) because the installers were too | lazy to fish the extra wire to run a proper 2-stage thermostat. | My homemade system has a 0.3 degree Celsius difference between | the low and high stage cut-in, plus some hysteresis to avoid | short cycling, and it keeps the temperature wonderfully stable | (within 0.2 degrees of the set point) with the furnace only ever | switching to high if you turn up the temperature (on the very | most brutally cold winter days it might run almost continuously | on low). At least here in Canada, installers have to leave the | technical manual with the furnace, so you know which DIP switch | or jumper to change to disable autostaging. | | 3. Mechanical thermostats have something called an "anticipator" | which slightly warms the sensing element as the furnace runs, so | it tends to turn off below the set point. This is to avoid | overshoot. Digital thermostats do it in software by pulse width | modulating the furnace enable as the temperature nears the set | point. In my case it's completely unnecessary to code this up - I | guess the thermostat location is just perfect - but if you do get | overshoot, just simulate it in software. | | 4. AC units can be damaged by short-cycling and sure enough an | early version of my system had a bug that caused this. Luckily I | noticed right away. Now it's full of safeties like minimum run | and rest times and probably much more conservative than a real | thermostat. Longer AC run times are better for dehumidification | anyway. I also enforce minimum run times on the furnace. | ghaff wrote: | >Have "can't fail" safeties. | | This is one reason why I've never gotten anything more complex | than a simple Honeywell programmable thermostat. I haven't felt | a real need but I also just don't _trust_ "smart" thermostats | not to fail off in the winter which can be a really serious | event if you're not around (and I normally travel a lot). There | are other failure modes for heating of course but I absolutely | don't want to introduce another one for no good reason. | | (I don't have AC.) | jjeaff wrote: | I have found that regular smart wifi thermostats like those | also made by honeywell fail just fine. | | I had a wifi honeywell for several years and eventually the | wifi portion died. But the rest continued to function just | fine. | | If whatever you have does die in the dead of winter, you can | always remove the thermostat and short the common and heat | wires together. | MarkusWandel wrote: | You can get an old school mechanical thermostat as a | backup. I've suffered a total frozen house disaster in a | past place - most of the plumbing wrecked - because of a | heat failure during the Christmas break (gas valve in that | case though; a mechanical thermostat wouldn't have helped). | That's what started the obsession with remote temperature | monitoring - I was into DS18B20s before they were cool - | and from there it was only a little bit more hacking to | just take control as well (so I can control it over the | internet the way I like it - ssh!) | Normal_gaussian wrote: | This is my bugbear. All my smart systems are 'who cares'. I | really want security, heating, and cooking to be smart as I | have specific use cases but I don't have the time to Engineer | the systems how I want them. Its particularly annoying as I | have all the skills! | frenchie4111 wrote: | Great tips! I am already doing the parallel with current | thermostat (I don't trust my system at all). I will look into | the other things as well, maybe I'll add them in my v2. | sircastor wrote: | I've been quite frustrated that both of the houses I've lived in | in the past decade have used "communicating" systems, meaning | that the products exploring this space are out of reach. HVAC | professionals describe these systems "Ferraris" of thermostat | control, but their remote features, API, etc are awful - I'm | stuck with what I can only describe as a touch thermostat made by | the lowest bidder. | hedora wrote: | Yeah; ours has a variable speed compressor and variable speed | fan (it is also a heat pump). The wire protocol is a closely | guarded trade secret from what I can tell. | | The manufacturer sells a custom EcoBee to work with it, but | their own custom EcoBee can only set a few fixed speeds instead | of variable speed. | | This market is ripe for disruption. Sell me something with a 30 | year warranty, and plans to wire it to a raspberry pi. I'll pay | twice as much for that as I would for anything with a sub 20 | year warranty. Since California is close to banning new natural | gas installations, focus on making a heat pump that'll last | forever. Military grade limited access compressors exist and | aren't expensive compared to having someone in Silicon Valley | perform a house call. Also, old air conditioners regularly | lasted 30+ years, so this is a solved problem, and the patents | have probably expired. | | I'll probably buy your weird proprietary thermostat because I'm | lazy, but if it sucks badly enough, I'll know there are decent | third party options. | craz8 wrote: | My heat pump was sold as having "700 levels" (that's 30-100% | in 0.1% increments), but the Nexia software shows unit % and | also Level 1 or Level 2. Who knows if it's actually using the | fine grain control I paid a lot of money for? | | My first thermostat also died in the first year when the | power went out. What happens in 10 years when it's no longer | made? I have to dump the whole system and start again? | | Also whole features are poorly implemented - Quiet Mode | limits speed at night, but not until after startup (or, I | think when defrosting) | | I'm a bit unhappy with Trane/Nexia at the moment and would | absolutely not recommend | craz8 wrote: | I would pay good money to get access to the API my | communicating thermostat uses - the Trane device is terrible in | many ways that basic software updates could fix | justinph wrote: | This is neat. I've often thought of building my own since no | smart thermostats support the millivolt system my 50 year old | boiler uses. | MarkusWandel wrote: | You can hack it if you get access to an older furnace being | junked. You need the 24VAC transformer and the main relay (the | really old furnaces don't have one of course). Then the smart | thermostat (which probably needs the parasitic power from this) | can run off that, and your millivolt system can run off the | relay contact closure. That said, as always, keep your existing | thermostat paralleled to it, just in case. | jennyyang wrote: | I have to say that HomeKit really does a good job in unifying the | Home IoT experience. I used to use Philips Hue exclusively, but | the HomeKit app is just so much nicer. And since then I've | branched out considerably, and the only unifying factor is | HomeKit. It's great. | frenchie4111 wrote: | I love this, and also the fact that I can control my devices | from control center. Not having to open an app to turn on/off | the lights is game changing ___________________________________________________________________ (page generated 2020-12-27 23:00 UTC)