|
|
Subscribe / Log in / New account

A kernel developer plays with Home Assistant: case studies

By Jonathan Corbet
May 16, 2025
The first article in this series provided an overview of Home Assistant, its community, and its capabilities. It was deliberately short on descriptions of interesting things that can be done with Home Assistant, though — the reasons why one might actually want to use this program. In this closing article, we'll look at how Home Assistant was used to solve some real problems.

Solar panels

Electrification is good, but it is even better in the presence of abundant electricity; thus, some years ago, an investment was made to cover my roof with solar panels. The result was indeed abundant power, about double what the home and the (non-Musky) electric vehicle actually used, which was a good thing. But the situation could have been better.

The panels came with a monitoring system from a company called SunPower; it collects data on panel performance and grid usage, reporting it all to some system in the cloud somewhere. The company produced a reasonably competent app that provided information about current and past performance, including data on each individual panel. Naturally, the app was the only point of access to that data, a fact which made me a bit nervous. Depending on a "free" cloud service from some vendor often does not go well.

Sure enough, in 2024, SunPower went bankrupt. The company that acquired SunPower's assets (among which are counted me and my data) goes by the name SunStrong. This company recently informed me that free access to my data was coming to an end; without a payment, the app would only provide basic instantaneous data. In other words, the data generated by the solar panels, which I own, is collected by the monitoring system, which I own, and sent off to a cloud system, which I definitely do not own and which will hold my own data hostage.

That, of course, is just the sort of situation I got into free software to prevent. Fortunately, my early nervousness had led me to look for ways to collect and hold that data locally; it is what drove me to install Home Assistant. As it happens, the monitoring system does not readily give up its information to the confused people who think they own it, but somebody out there on the net figured out a way using a network port intended for installation-time diagnostics, and documented it thoroughly. I was able to solve the problem in a slightly simpler way (the machine running Home Assistant has two network ports, so I was able to do without the intermediate Raspberry Pi system), and have had full access to the data from the solar system ever since.

[Panel production plot] After some of the inevitable fiddling (see the first article for some details), the result is a far better interface to solar-related information than the app ever provided. As one example, see the image to the right, plotting the output from a sub-cluster of panels, clearly showing the effects of the partial shading of two panels, even at the beginning of April. It has become easy to see how well each part of the system is performing and, should a panel or its inverter go bad someday, which panel is the problem will be immediately apparent.

This kind of data should not be held hostage by some corporation that feels empowered to alter the deal whenever it sees fit. Freedom from that situation is, in my mind, one of the most compelling reasons to use a tool like Home Assistant.

Helpers

That said, as mentioned before, Home Assistant requires some fiddling to get to a useful point. As an example, consider that the monitoring system reports the instantaneous power from both the panels and the grid. It does not report the power consumed by the house, which is often of interest. Of course, that quantity is easily enough obtained: it is simply the sum of the solar and grid power flows. At least, it is easy once one figures out the abstraction known as "helpers".

If one goes into the "Settings" screen of the Home-Assistant interface, then into "Devices & services", one will see a tab marked "Helpers". A helper, as it turns out, is a way to instantiate a virtual sensor that is defined as a function of one or more existing sensors. This screen, among many other things, enables the creation of a "home power usage" helper that is the sum of the solar and grid power sensors. Once it exists, it can be used to generate plots, as input to other helpers, or as part of an automation.

Now imagine that it might be nice to know how much power the house has consumed in any given day. The "integral" helper comes in handy here; the house power helper we just found can be fed into this new helper, which will integrate its value over time, turning kilowatts into kilowatt-hours. That will yield a constantly increasing value that is nice if you want to know the house's all-time usage, but it is less useful to tell how the day is going. Happily, there is yet another type of helper called a "utility meter" that can be configured to reset to zero at a given interval — every night at midnight being a logical choice. The output of that helper will be the day's usage.

The end result of all this is that helpers can do a lot of interesting things with the data collected by Home Assistant, but that their use does require a lot of clicking around in the interface (or YAML writing for those with that inclination). That work can add up; if there is a way to generate, say, daily production totals for each of 22 panels without manually creating a helper chain for each, I have not found it.

Another way to put this is that Home Assistant could really use a more general sort of query language for the data it manages. But, as a system that is set up once then used for years, what is there works pretty well.

One other note regarding data is worth mentioning: Home Assistant will collect high-resolution data from sources that provide it, and that data is stored — but only for a while. Unless configured otherwise, data more than ten days old will be boiled down severely, seemingly to one sample per hour. Since many people run Home Assistant on small, resource-constrained systems, taking some pains to reduce the amount of storage space required is understandable. But this discarding of data may come as a surprise to users with large disks who were hoping to retain full-resolution data indefinitely.

Heat pumps

What does one do with a surplus of electricity? Donating it back to the electric utility company (or something close to that effect) has little appeal. It is better to find a good use for that power, so the next step was to install air-source heat pumps and stop heating the house with fossil fuels. It takes a bit of a leap of faith to do this in Colorado, where the temperature dropped to -15°F (-26°C) this winter, but that technology has come a long way; the house remained warm.

The pre-purchase research yielded a clear indication that heat pumps made by Mitsubishi can work in this sort of climate. Respect for that company's hardware is universally high. It was also clear, before the purchase, that respect for Mitsubishi's software, and its "Kumo Cloud" app, was rather lower. Kumo Cloud is, as its name would suggest, a cloud-based solution that requires an Internet connection to work. The app was just as bad as the reviews had suggested. In March, with much hype, Mitsubishi replaced it with a new app called "Comfort"; it has been completely rewritten and is far worse.

[Heat-pump control] Naturally, Home Assistant has a Mitsubishi integration. It requires access to the cloud account at initialization to obtain the IP addresses for the controllers in each of the heat-pump heads; thereafter, it can interoperate with the controllers locally. This integration collects the data provided by the hardware (operating mode, temperature, set point, humidity), and can make it available in the usual sorts of ways. The app (in either version) is unable to plot the temperature of the room throughout the day, for example, but Home Assistant can do that.

It can also, of course, control the hardware through a simple thermostat-like widget that can be placed on a dashboard. It is easy to see the climate-control configuration of the entire house on a single screen. If remote access has been set up, it is also possible to change that configuration while away, perhaps turning the heat up while on the way home.

While I have not done this, it is possible to do a lot more by setting up automations. One can set up a schedule to vary the set temperature over the course of the day. A more complex setup might use motion or Bluetooth sensors to determine which rooms are occupied and adjust the climate-control settings accordingly. But even as a way to just control what the heat pumps are set to at any given time, Home Assistant has replaced the use of the vendor app. At some point, I may cut the controllers off from the Internet entirely.

Power monitoring

The heat pumps have done a fine job of keeping the house warm in the winter, but they also had the effect of causing that surplus of electricity to disappear. That naturally led to a higher degree of interest in how power is consumed in the house; the simple data provided by the SunPower unit was not sufficient. Wouldn't it be nice to know what specific rooms or appliances are consuming? It turns out that there are a number of companies selling power monitors that can report usage on a number of circuits in the house; it was just a matter of picking one.

That question turned out to be easy to answer in the end. There is one unit, made by Refoss, that is affordable and able to monitor sixteen independent circuits in the house. (Note: that product page may not be available in all regions. The main site is available here.) Readers will undoubtedly be surprised to learn that this device is designed to report data to a cloud server, which will then make it available via an app. There is a crucial difference here, though: the Home-Assistant integration for Refoss devices, which interfaces directly with the monitor and needs no cloud connectivity, is written and provided by Refoss itself. Home-Assistant compatibility is the first bullet item on the above-linked product page.

There are not many companies that see fit to support Home-Assistant integration for their products; there are probably more that are actively hostile to it. So when a company supports this integration, it moves directly to the top of my list of candidates; that is what happened here. After a few hours of nervous work inside the main service panel for the house and more time spent tweaking the names of all the sensors, the monitor was up and reporting into Home Assistant as designed.

[Heat-pump power usage] The data returned by the monitor turned out to be immediately useful. The plot to the right shows the power consumption of the two installed exterior heat-pump units, one for the downstairs, one for the up. The blue trace (downstairs) shows how these systems are meant to operate; they should cycle rarely, and run steadily for some time once they start. The yellow trace (upstairs), instead, demonstrates a problem called "short cycling"; it results in increased power usage and increased wear on the unit. Short cycling can be caused by a number of problems, including configuration mistakes or hardware problems.

In this case, the cause would appear to be hardware, but it has taken some time to reach that diagnosis. It was, however, easy to demonstrate the problem to the repair technicians by showing them a plot like this one. Without detailed power-usage information, the conversation with the technicians would likely have been a far longer one. There is value in having visibility into the operation of crucial systems — like one's house.

Having power information has helped in other ways. Seeing how much current is drawn by my monitors in their "power save" mode has led to them being turned off at night. It has become easier to say what is using power during the high-cost times of day and shift that use to other times. It is amusing to learn that a full kernel build costs about 20Wh. In general, visibility into how the house is working is both interesting and useful.

To close

It is also sobering to realize how much that information can reveal about what is going on in the house — how many people are present, which rooms they are in, what they are doing in those rooms, etc. The thought that nobody is out there trying to gain access to (and exploit) that data seems naive at best. Yet we happily allow that data to be exported and stored on somebody else's server with no real idea of how long we'll have access to it, how well that server is protected, or even where it is. That is the world we have built for ourselves, but it is not the one many of us envisioned.

Tools like Home Assistant offer a different vision of how the world could be — how we should have built it in the first place. Free software is not just for operating systems; it is for all of the systems that touch our lives. It is software that actually serves us, rather than the people who sold it to us.

Home Assistant is a wildly successful project, with vast numbers of users, but most people still have never heard of it. Many others, undoubtedly, have been scared away by the fiddly nature of the system and the challenges of integrating devices that were never designed to work together. Continued success will require a lot more effort to make things Just Work. There is almost certainly a business to be had in this area, just waiting for somebody with the requisite energy and skills to make it real. Meanwhile, a versatile and useful tool is available for those who are willing to put the effort into it.

Here ends this look at Home Assistant. It is a partial look at best; as mentioned before, I have not yet had the time to play much with features like automations and scenes. There is voice control under development, and Music Assistant for media streaming. My house is also devoid of motion sensors, remote-control light bulbs, video doorbells, automatic blinds, Internet-connected cookware, app-driven pet feeders, "smart speakers", and other sorts of IoT stuff, all of which can be connected to Home Assistant if it is present. So I have been unable to test those integrations. In the end, every deployment will, like every home, be different — but all will be free and under the owner's control.


to post comments

Home Assistant is great for power management

Posted May 16, 2025 13:47 UTC (Fri) by creese (subscriber, #32352) [Link] (16 responses)

I have HA turn the temperature up on our water heater when there is excess solar, and down at night. Just that one automated task dropped our power usage 20%. The water heater never comes on all night.

Our induction cooktop had a bad element. I was able to prove this to the technician by showing the reduced power draw compared to the other elements.

Home Assistant is great for power management

Posted May 17, 2025 21:41 UTC (Sat) by marcH (subscriber, #57642) [Link] (15 responses)

When you perform the simple energy maths, you realize "smart" water heaters like this is an incredibly cheap and effective way to perform "electricity time-shifting"; with less capacity but so much cheaper than a battery! For the simple reason that every house must have a water heater anyway, and that many already have an electric one. In the US there is at least one company (Aquanta) selling smart controllers that you can "bolt on" your existing, dumb electric heater but it does not seem very popular. Electricity providers should promote and subsidize devices like this (whether they rely on Home Assistant or not).

Home Assistant is great for power management

Posted May 17, 2025 23:08 UTC (Sat) by pizza (subscriber, #46) [Link]

> Electricity providers should promote and subsidize devices like this (whether they rely on Home Assistant or not).

Many do promote these devices, but primarily as a way of load-shedding.

(At least in Florida, time-of-use billing is not the norm, because unless you have an electric car most of your usage will be during peak times anyway....)

Home Assistant is great for power management

Posted May 17, 2025 23:24 UTC (Sat) by creese (subscriber, #32352) [Link]

Rheem water heaters are very common. The esphome-econet project connect lots of Rheem water heaters to home assistant. Works great!

https://github.com/esphome-econet/esphome-econet

Home Assistant is great for power management

Posted May 18, 2025 8:40 UTC (Sun) by Wol (subscriber, #4433) [Link] (8 responses)

> For the simple reason that every house must have a water heater anyway, and that many already have an electric one.

Except that's a non sequitur. Just because you have a water heater, doesn't mean you can turn up the storage tempature - most European installations no longer have hot water tanks.

Pretty much all new European installations are "on demand" combi systems. Although they're now slowly being replaced by heat-pump systems, which brings back the water tank.

Cheers,
Wol.

Home Assistant is great for power management

Posted May 18, 2025 11:00 UTC (Sun) by zdzichu (subscriber, #17118) [Link]

Actually, most Europe use central heating with heat generated in cogeneration or other centralised heat plants.

Damn, I've took the bait and answered to Wol's comment :(

Home Assistant is great for power management

Posted May 19, 2025 10:01 UTC (Mon) by paulj (subscriber, #341) [Link] (6 responses)

UK and Ireland surely are still water tank? Lived in a new build in 2016 which had a big water tank, could be heated either by gas or electricity.

Home Assistant is great for power management

Posted May 19, 2025 13:15 UTC (Mon) by excors (subscriber, #95769) [Link] (5 responses)

No, in the UK reportedly 80% of all gas boiler sales are combi boilers, which provide hot water on demand with no tank (https://www.gov.uk/government/consultations/raising-produ...).

I think system boilers with tanks are mainly recommended for larger homes, because a combi boiler won't have enough power to supply more than 1-2 bathrooms simultaneously, but otherwise combi boilers are preferred since they're more energy-efficient and save space. (But much less efficient than heat pumps, which do need the tank.)

Home Assistant is great for power management

Posted May 19, 2025 15:16 UTC (Mon) by Wol (subscriber, #4433) [Link] (3 responses)

If you want a boiler, it's actually very hard *not* to have a combi.

We had our "gas fire and back boiler" replaced shortly after moving into our current home 25 years ago, and were lucky as they were in the process of banning them. Then maybe 10 years ago when heat-pumps were "new" I had one put in, but unfortunately I think we fell foul of the cowboys, and when it broke down we couldn't get it repaired, so combi was about the only option we had.

(That broke too, and our boiler guy had disappeared, a family friend of all people, so that gave us grief, too ...)

Cheers,
Wol

Home Assistant is great for power management

Posted May 19, 2025 16:22 UTC (Mon) by knewt (subscriber, #32124) [Link] (2 responses)

> If you want a boiler, it's actually very hard *not* to have a combi.

So late last year my absolutely ancient, totally energy inefficient traditional boiler failed.

Now, if I had been sorting out a replacement on my own schedule, I would almost certainly have replaced it with a combi. That was always in the plans. However, this was at a time of year where I certainly needed something quickly. And such a combi replacement would have required a *lot* of extra installation time, because there is no mains water anywhere near the boiler, and there is no (currently accessible) gas anywhere near the mains water. And I'm a mid-terrace, so can not just run pipework around from front to back.

Could have covered the extra cost, I had plenty budgeted away for an eventual boiler replacement. It was the time issue, plus getting someone in. I very quickly came to the conclusion that I would need to replace with another traditional boiler. Which was disappointing, but hey, what can you do. At least it's a *much* more energy efficient unit now! And due to being a much quicker process, I was able to get someone in less than a week after it failed. Failed on a Wednesday, was replaced the following Monday.

Home Assistant is great for power management

Posted May 19, 2025 16:52 UTC (Mon) by Wol (subscriber, #4433) [Link] (1 responses)

> At least it's a *much* more energy efficient unit now!

And if it's replaced the existing unit, at least the waste heat is probably warming your house (nice in winter, less so in summer).

One of the drives - aiui - for combi boilers was EU regs based on the assumption that the boiler was located in a non-living area of the house (basement, loft, whatever). Most UK boilers were in the living area - we had a back-boiler in the lounge - so much of the "wasted" energy provided extra heat in our main room ...

Cheers,
Wol

Home Assistant is great for power management

Posted May 19, 2025 17:15 UTC (Mon) by knewt (subscriber, #32124) [Link]

It's located in a hall cupboard next to the front door (along with the gas & leccy meters), so *possibly* a little bit?

Home Assistant is great for power management

Posted May 19, 2025 16:00 UTC (Mon) by paulj (subscriber, #341) [Link]

Interesting. The 2016 new-build was in a part of the UK with larger homes by default (Scotland, land is much cheaper there than England for a start), so maybe that's why. Current house is older, so it has the typical immersion heater water tank (electric, and circuit also goes past the back-boiler on the fire-place - Irish houses were typically coal/peat fire heated till around the 80s).

With domestic solar it can make a lot of sense to have reasonably decent hot water storage, so perhaps that trend away from electric water tanks will change.

Home Assistant is great for power management

Posted May 18, 2025 21:38 UTC (Sun) by Klaasjan (subscriber, #4951) [Link]

+1 insightful.
Now, if only I had a more modern water heater…

Home Assistant is great for power management

Posted May 19, 2025 9:21 UTC (Mon) by NAR (subscriber, #1313) [Link] (1 responses)

For the simple reason that every house must have a water heater anyway, and that many already have an electric one.

Water heater - yes. Water tank? Not necessarily. They take up a non-trivial amount of space and even then they have limited capacity. Also in my part of the world gas is cheaper than electricity, so people tend to use gas to make hot water.

Home Assistant is great for power management

Posted May 19, 2025 17:38 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link]

Newer heatpump-based water heaters are actually more efficient than gas heaters. As in: it's more efficient to burn the natural gas, use it to drive a turbine and generate electricity, and then use it for water heating.

Home Assistant is great for power management

Posted May 19, 2025 9:45 UTC (Mon) by paulj (subscriber, #341) [Link]

Those "smart thermostat" retro-fits for water tanks are standard installs on home solar installs over here in Ireland (and I assume UK too, cause the installers here generally source devices from the UK, and certainly one of the more popular vendors of a suite of "smart" inverters/chargers/batteries/water-heaters is UK based).

In large part because - for many years - there was no ability to resell excess solar back to the grid. So "heat your water" was pretty much the only economic use for excess domestic solar generation (ok, you could buy battery storage, but the break-even economics on that were very far-out and low-utility to me). I am still waiting for our grid operator to approve V2H - currently banned - so I can use the massive battery-on-wheels in my drive way to let me time-shift and balance excess generation over to the time of excess demand.

A fantastic case study of the capabilities of open source software

Posted May 16, 2025 15:16 UTC (Fri) by egb (subscriber, #163244) [Link]

This is excellent testament to what one can achieve when using open source software in our day-to-day lives. This is very motivating to read :-)

Stats

Posted May 16, 2025 21:24 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

> One other note regarding data is worth mentioning: Home Assistant will collect high-resolution data from sources that provide it, and that data is stored — but only for a while.

HA's entity database is a regular SQLite file (or Postgres, if you set it up), so you can set up an automation to import the time series data into a columnar DB if you're so inclined.

You can also extend the detailed statistics retention period, but it actually adds up pretty quickly. Especially for devices like indoor motion detectors that can generate tons of state changes.

Better graphing and long-term statistics have long been an open issue for HA, but it's getting better.

Stats

Posted May 18, 2025 14:15 UTC (Sun) by MortenSickel (subscriber, #3238) [Link]

In my HA setup, I am saving the data I am interested in storing in postgres with timescaledb (e.g.temperature, power usage, solar panel production, not movemenent sensors) then using grafana to display data.

Energy monitor

Posted May 16, 2025 21:33 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

> There is a crucial difference here, though: the Home-Assistant integration for Refoss devices, which interfaces directly with the monitor and needs no cloud connectivity, is written and provided by Refoss itself.
> Home-Assistant compatibility is the first bullet item on the above-linked product page.

That is super-refreshing to see, thanks for the tip, I bought this device to show them support!

I'm using an Emporia monitor: https://www.emporiaenergy.com/energy-monitors/ but it required a custom firmware for fully local control. They are at least not hostile to people using their API, but in the long term it can change :(

Energy monitor

Posted May 22, 2025 12:58 UTC (Thu) by kpfleming (subscriber, #23250) [Link]

There's another option for this, which is 100% local (no cloud at all), but is more costly as a result: https://www.egauge.net/

This device doesn't just perform metering, but also data logging (for up to 10 years, in flash storage), and other functions. While the manufacturer doesn't provide or support an HA integration, they do offer a fully documented and supported API over WiFi/Ethernet, and there's a great third-party HA integration for it (https://github.com/neggert/hass-egauge).

This was particularly attractive to me as it means I configure the device to perform all the integrations, summations, etc. itself, and not 'lose' any of that data when HA is rebooted, has crashed, etc. I like using HA to gather and display the data, but not to compute the data, as it becomes a point of failure for the data computation.

It's spurprising how much power usage can reveal about you

Posted May 17, 2025 0:01 UTC (Sat) by ras (subscriber, #33059) [Link] (2 responses)

5 years ago there was a talk at linux.conf.au on what smart meters revealed about you, which startled me:

https://lca2020.linux.org.au/schedule/presentation/100/

It's only gotten worse since then. Only the power meters were smart back then. Now your clock is likely listening to you.

I embarked on a journey similar to the editors, which went well for a year or two. Although I tried to hide it because it makes me uncomfortable, eventually the family discovered the house responded to "Hey Google", and it made me a hero of sorts. Then a flood cut power and internet. A (small - 4.8kWh) house battery and 6.6kW solar surprised me by being ample for keeping the house essentials ticking over even when it was raining near continuously outside, so it was the loss of internet that hurt. We could not turn on fans, or tell our robot vacuum to get off its bum and do something.

I might have tolerated that. What spooked me was putting two and two together about programming the solar and battery via a phone app. I don't know why it took so long to twig onto what was going on - it only happened when I wanted to harvest usage data from my solar system, and resorted to sniffing its unencrypted JSON using libpcap. (Ugly, but it worked well.) It was then I realised the commands controlling my home power setup where coming from China. I have enough trouble dealing with local businesses, who speak the same language, are subject to laws I'm familiar with and whose door I can go knocking on if they annoy me enough.

Unlike our editor, these Chinese firms have never given me reason to complain. Their support has always been superb, I was happy with their product. Still, the experience left me feeling like a Kermit in a warm pot. We are building a new house now, and it's a situation I'm determined not to repeat.

I am suprised any Chinese company will do that.

Posted May 17, 2025 6:25 UTC (Sat) by PengZheng (subscriber, #108006) [Link] (1 responses)

> It was then I realised the commands controlling my home power setup where coming from China.

AFAIK, the international connection between US and China often suffers from 5%-10% packet loss, which may lead to latency of several seconds for TCP/QUIC connections.

I am suprised any Chinese company will do that.

Posted May 17, 2025 8:42 UTC (Sat) by ras (subscriber, #33059) [Link]

> AFAIK, the international connection between US and China

I'm based in Australia. China is our largest trading partner. I wasn't paying much notice, but packets flowing to and from China seemed pretty reliable - only the occasional outage. We are a long way from anywhere, so everything is flaky from time to time. The Chinese web sites didn't look much better or worse than your average from from medium sized company, which is to say usable with broken bits and odd UI choices. Occasionally you have to copy and paste Chinese into Google Translate - but that's no different to an EU site.

When supplied battery died, the supplier sent out a "technician" to install the new one. Turned out he was a Chinese student doing a working holiday in Australia. Between the two of us we got it going. Students of working holidays are common thing in Australia, and we have laws and visa's to facilitate it. You commonly meet the students in bars, restaurants, and out in the bush doing farm work. Meeting one who evidently been flown over from China on a student working visa to do battery installs was a novel experience.

Mitsubishi heat pumps

Posted May 17, 2025 18:38 UTC (Sat) by AdamW (subscriber, #48457) [Link] (13 responses)

You can integrate Mitsubishi heat pumps even better with HA (and save money) by not paying for Mitsubishi's expensive network adapters at all. You just need an ESP32 connected to a specific port on the heat pump, the CN105. (This port is, usefully, pretty much always a nice easy-to-identify red color). This is the Digikey parts list:

PAP-05V-S (P/N: 455-1489-ND)
Grove 4 pin cable: A034-C (P/N: 2221-A034-C-ND)
Atoms3: C124 (P/N: 2221-C124-ND)

You have to replace the connector on one end of the cable with the PAP-05V-S 5-pin connector - this is quite easy to do with a sharp knife to lift the locking pins, no soldering required. You have to be very careful to leave pin 1 on the CN105 unused - that's 12V, which you don't want going into the Atoms3 (it will destroy it). https://casualhacker.net/post/2017-10-24-CN105_Connector has a pinout for the CN105 so you can double-triple check everything. Then you plug the 5-pin end into the CN105 and the 4-pin end into the Atoms3.

For air source pumps, you then can flash it with https://github.com/echavet/MitsubishiCN105ESPHome . There's a useful discussion at https://github.com/echavet/MitsubishiCN105ESPHome/discuss... where various folks compare notes on configs and sensors and so on. Note the first post there has a correct *picture* of how you want the 5-pin cable to look, but an *incorrect* pinout table which says pin 5 is 12V not pin 1, so don't follow the table. I based my config on fonske's - https://github.com/echavet/MitsubishiCN105ESPHome/discuss... .

Once you have all that set up, you get direct info and control of the heat pumps in HA without ever touching Mitsubishi's adapter or cloud system.

Folks in the EU with water-source heat pumps can get a pre-packaged version of all this off eBay user f1p92 , with a firmware designed for those. He was kind enough to give me the Digikey parts list instead of taking my order for international shipping, which saved me a bunch of money, so please support him!

Mitsubishi heat pumps

Posted May 17, 2025 21:08 UTC (Sat) by gutschke (subscriber, #27910) [Link] (12 responses)

I looked into this a while ago, so please correct me if my information is out of date.

At the time, I was under the impression that this is an all-or-nothing solution. If you hook up HA to the heat pump, you can no longer use the conventional wall-mounted thermostat. I can see how this is something that works very well for some users. But it wouldn't work in our household. The rest of the family wants conventional controls for everything, and I fully understand that. Automation should augment these controls and not replace them.

We have managed to do this for a lot of components that are set up for automation, although it turns out that it was easier to do so without involving HA -- not that I have any objection to HA.

Mitsubishi heat pumps

Posted May 18, 2025 5:48 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link] (6 responses)

Traditional thermostats are just fancy dry-contact relays. So you can trivially hook them up to GPIO pins and use them to control your board. You might need to do some wiring: resistors to limit the current, 24V power supply, etc.

I did that for my house, as I actually wanted a nice wall thermostat in a room with a "virtual zone" controlled using smart air vents.

Mitsubishi heat pumps

Posted May 18, 2025 5:52 UTC (Sun) by gutschke (subscriber, #27910) [Link] (1 responses)

At least in the case of my heatpump, I think the thermostat is doing more than just dry contacts.

It can control fan directions or oscillation. It can heat or cool. I believe it can also do "fan only". And it knows if any other unit is currently heating/cooling. If so, it'll avoid cooling while the other unit is heating, or vice versa. I suppose there is some way that you could do this with dry contacts. But I believe it uses a radio control daughter board that then talks some slightly higher-level protocol with the actually head unit.

Mitsubishi heat pumps

Posted May 18, 2025 7:00 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link]

You can buy a regular thermostat and experiment. "Fan only" and switching between cooling/heating are common features. Only the direction and oscillation modes are somewhat unusual.

Mitsubishi heat pumps

Posted May 18, 2025 12:49 UTC (Sun) by pizza (subscriber, #46) [Link] (3 responses)

> Traditional thermostats are just fancy dry-contact relays.

Modern ones are not. Driven by higher efficiency standards, they are tightly integrated with the air handler(s), heat pump(s), sensor(s), and more, with multi-way handshaking over some sort of shared bus [1].

I would _love_ to replace the Daikin "smart" thermostat with something less awful to use (_very_ laggy modal touchscreen UI) but the hardwired communication is unknown, and all other control mechanisms require giving it always-on internet access, setting up a somehow even crappier mobile app, and of course signing yourself up for their cloud services.

Enough of the public API has been reverse-engineered for a basic HA plugin, but it's still utterly reliant on their cloud; the thermostat itself has no open ports and the private communications to their cloud service are encrypted so REing the private API and spoofing the server is currently not feasible. [2]

I also have a couple of cheapo Medea-derived mini-split systems in other buildings; their "cloud" stuff is differently awful [3], but with an IR blaster you can just spoof the handheld remote so full local automation is quite doable.

[1] Single pair of differential data wires with a 1.2V swing (according to installation documentations), and a max run of about 40M. Most likely a variant of RS485 or CAN.
[2] Not without cracking open a working theromostat. Literally as well as figuratively (and most likely feloniously thanks to the DMCA)
[3] No API to speak of. App effectively acts as a fancy remote control, but doesn't require handing over your contact info or any location or other identifying data.

Mitsubishi heat pumps

Posted May 18, 2025 15:12 UTC (Sun) by TomH (subscriber, #56149) [Link]

Does the the Faikin not work for this? https://github.com/revk/ESP32-Faikin

Mitsubishi heat pumps

Posted May 18, 2025 21:00 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link] (1 responses)

That's why I said "traditional" :)

Newer "communicating thermostats" for consumer HVAC units with variable-speed drives are a mess. There are no standards, and everybody does weird proprietary stuff that inevitably results in crappy apps and vendor lock-in. And this is tragic because these units are really better in any other way, they solve the short-cycling issues, and are far more efficient overall.

Mitsubishi heat pumps

Posted May 20, 2025 2:31 UTC (Tue) by raven667 (subscriber, #5198) [Link]

That's frustrating, absent a multi vendor standard it's nice if vendors just implement a common off the shelf standard protocol which has mature diagnostics tools so it can be easily reversed and documented. In a better world vendors wouldn't be afraid to just share their protocol documentation with customers so the motivated and competent could build their own integration. While sure, most customers shouldn't be fiddling with electronics they don't understand, some portion of customers have relevant training or experience with electronics and software, and I don't know if the benefits of preventing overconfident customers from destroying their gear outweigh the inconvenience to customers who want to modify and get the most out of their purchases.

Mitsubishi heat pumps

Posted May 22, 2025 12:52 UTC (Thu) by kpfleming (subscriber, #23250) [Link]

There is a newer component for ESPHome called mUART which supports passthrough for thermostats (MHK1 and MHK2), so that they remain operational. I'm working on a small board (and firmware) which will extend this to supporting 'hardware failsafe' so that the thermostat will remain operational even if the ESP32 has failed in some way.

mUART: https://muart-group.github.io/

Mitsubishi heat pumps

Posted May 28, 2025 9:12 UTC (Wed) by AdamW (subscriber, #48457) [Link] (3 responses)

I don't have a conventional wall-mounted thermostat (for the heat pumps), so I couldn't tell you. Ours just came with IR remotes. Those still work fine, though they're one-way and work by sending the heat pump an entire state with each command, so they can easily 'desync' from whatever you set via HA - if you set the temp to 18 degrees via HA, then press +1 degree on the remote, it will set to 1 degree higher than whatever temp the remote last set the pump to, not 19 degrees.

Mitsubishi heat pumps

Posted May 28, 2025 10:20 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (1 responses)

> IR remotes

> so they can easily 'desync' from whatever you set

How do the remotes not desync from each other? Or is there only one remote per function?

Mitsubishi heat pumps

Posted May 28, 2025 10:43 UTC (Wed) by farnz (subscriber, #17727) [Link]

They do desync from each other; the intention is that you have one remote per heat pump, and only ever control it via that remote. You have to manually resync them to each other if you have more than one remote.

Mitsubishi heat pumps

Posted May 28, 2025 12:47 UTC (Wed) by corbet (editor, #1) [Link]

The same desynchronization happens with Mitsubishi's own app too. It can lead to all kinds of surprises.

The ground floor of the house uses a central air handler, and there is an MHK2 thermostat to control it. Using HA does not rule out the use of the thermostat, but it can lead to fights over who is actually in control of the system (again, this also happens when using MItsubishi's app and HA is out of the picture). Most of the time it works reasonably well, though.

Long term data storage

Posted May 17, 2025 21:05 UTC (Sat) by garthy (subscriber, #7195) [Link]

On of the first things I recommend doing to people setting up home assistant is install the influxdb addon and store all your data as you never know when you many need it.

I’ve ended up using our historical consumption for prediction and then charging our battery in winter at cheaper times to use in the expensive times. (We’re on a elec tarrrifd that changes price every half an hour)

Data lockdown?

Posted May 17, 2025 22:02 UTC (Sat) by marcH (subscriber, #57642) [Link] (3 responses)

> This company recently informed me that free access to my data was coming to an end; without a payment, the app would only provide basic instantaneous data. In other words, the data generated by the solar panels, which I own, is collected by the monitoring system, which I own, and sent off to a cloud system, which I definitely do not own and which will hold my own data hostage. That, of course, is just the sort of situation I got into free software to prevent.

I see (at least) two distinct issues here and it's not clear to me what is the status of each.

On one hand, I see nothing wrong with having to pay a subscription for some _cloud services and software maintenance_, e.g.: Nabu Casa. I mean in general: specifics like having to pay for something that used to be free is pretty bad but that's a different topic. Paying for software services is one of the few ways to fund open source after all, so we can't really complain when closed-source does the same.

The "data ownership" is a different question. Is the company actively trying to block direct access to the data with some crypto? Or are they just not being helpful? The former is pretty bad, the latter much less so.

There are some interesting legal questions too. Was there anything about the data in any contract? Or was there no lawyer who cared about that aspect?

Just curious.

Data lockdown?

Posted May 18, 2025 20:00 UTC (Sun) by smurf (subscriber, #17840) [Link] (1 responses)

There's also feature ownership. I bought a device that can do X; I expect it to be able to do X in perpetuity, period end of discussion. (Well, unless the thing suffers from a hardware failure.)

Yes we're not there yet, but at least Home Assistant is a base for things to get better.

Data lockdown?

Posted May 19, 2025 0:17 UTC (Mon) by marcH (subscriber, #57642) [Link]

> I bought a device that can do X; I expect it to be able to do X in perpetuity, period end of discussion.

When X involves any kind of cloud, that assumption would be quite naive. Cloud services come and go depending on... "where the wind blows!"

When the cloud does nothing except deploying an update that removes some features running 100% locally, then I agree it's outrageous. It's a sure way to make the tech news - or even the mainstream news sometimes.

Data lockdown?

Posted May 19, 2025 12:54 UTC (Mon) by aigarius (subscriber, #7329) [Link]

Thank EU, we don't have that problem over here. One quick EU GDPR request and a company *will* provide you with a data export. They know the penalties will be huge if they as much as hesitate.

Will open source win home automation too?

Posted May 17, 2025 22:24 UTC (Sat) by marcH (subscriber, #57642) [Link]

> There are not many companies that see fit to support Home-Assistant integration for their products; there are probably more that are actively hostile to it. So when a company supports this integration, it moves directly to the top of my list of candidates; that is what happened here.

That's appealing to a minority of hackers, but that's IMHO negligible for the larger market.

There are billions of people holding in their hand a device running Linux for several hours every day. Most have no idea that it is using Linux or even anything open-source (and yes I'm aware Android is becoming less open now, that's besides the point)

The reason Linux and open-source are everywhere today is only because it's the most efficient and economical way for _companies_ to reuse software, by light-years. "Look boss: no lawyer, no contract and no businessman! Direct access to maintainers and I can even "fork" and fix bugs myself, just in time for the product release."

So, is Refoss just the beginning? Will Home Assistant and open-source in general "conquer" that space like many other industries before? Note I'm here specifically _not_ asking about Tivoization, GPLv3, BSD, privacy etc. These will be interesting questions but first things first: will _any_ open-source flavor be massively adopted by this industry? There seems to be a lot of standardization work happening, that looks like a good starting point.


Copyright © 2025, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds