Accessing and analysing data from your heat pump
Posted by: @derek-mCathodeRay managed to locate and extract some data from the Mideo controller and data stream.
Indeed I did, and I have documented most of my experiences to date here on this forum in considerable detail.
The bottom line for me - emphasis because others have chosen different routes, this really is a horses for courses thing - is that Home Assassin is a shortcut to incurable and probably terminal insanity. It is (IMHO) very over complicated, the code is a nightmare with a learning curve that makes the North Face of the Eiger look like a gentle ramp.
The python midea_ac_lan package (and other similar ones) manage to snoop on the Midea app traffic but again it is painfully complicated, and only limited data can be collected. Part of the clue is in the name, it is not chiefly aimed at AHSPs, but rather at air conditioners, but there is some overlap. Midea also encrypt the data which doesn't help...
Midea (and Samsung and maybe others) make available a modbus connection in their controllers, and in my experience, for me, this by far the best way to collect and analyse modbus enabled heat pump data. At a practical level, you need to be able to strip thin wires without shredding them and use a screwdriver, and you need to be comfortable with fairly basic python code, plus some form of charting software - the data ends up in a csv file which you can do whatever you want with.
I'm waiting for the heating season to start at which point I will double check my system works and then document what I did here.
The other possibility, yet to be tested in heat so to speak, is not just monitoring the heat pump over modbus, but also controlling it. Again, I will be working on this over the next few months, and will report back findings here.
Midea 14kW (for now...) ASHP heating both building and DHW
@cathoderay Thank you for your efforts.
If we could get the modbus data bridged to MQTT, the Home Assistant integration would probably then be a simple and familiar step for many of the HA community developers. Wish I had more time to learn the basics and have a play myself.
Another option for HA might be to use the File integration to import the data from the CSVs you have been able to create.
File - Home Assistant (home-assistant.io)
Their example only shows how to extract a single value per row out to an entity. Ideally we would be looking to extract multiple values for date, energy consumed, etc.
Posted by: @leichatthe Home Assistant integration would probably then be a simple and familiar step for many of the HA community developers. Wish I had more time to learn the basics
This is the problem: HA developers and a few other understand HA, Joe Bloggs, I and many others don't. Another PITA for me about HA is that because it is a work in progress, the developers have given unto themselves a licence freely to make breaking changes in the code. It drove me (and judging by their forum, many others), nuts.
I did use that file sensor, and I think I mentioned it recently, but why go to all the trouble of doing that in HA? And somehow get round the fact it can only extract the last row - can be done by making sure each reading gets into HAs database, at least until the HA database crashes and burns. It defaults to a sqlite database (and no I am not going to add another painfully complicated 'better' database onto my system) and may or may not be recoverable, probably not. Why not do the charting from the csv file itself? Freely available spreadsheets can do the charting just fine in a few clicks, and I've also posted various examples using highcharts.js, and more recently have found plotly in python works well, Here's a proof of concept screen grab I posted recently of an interactive plotly based chart:
That's the out of the box version, without any tweaking, reading directly from my midea data csv file, only one variable etc, but the point is, it just works. HA, on the other hand, often doesn't (see posts a-plenty on their forum). On the plotly chart, you can zoom in and out at will, select various time ranges (see top left buttons, they are customisable) and takes as many snapshots as you want. Guess how many lines of code were needed?
The code that produced that chart:
import plotly.express as px import pandas as pd df = pd.read_csv('mideadata.csv') fig = px.line(df, x='datetime', y='ambient', title='Ambient Temp with Range Slider and Selectors') fig.update_xaxes( rangeslider_visible=True, rangeselector=dict( buttons=list([ dict(count=1, label="1m", step="month", stepmode="backward"), dict(count=6, label="6m", step="month", stepmode="backward"), dict(count=1, label="YTD", step="year", stepmode="todate"), dict(count=1, label="1y", step="year", stepmode="backward"), dict(step="all") ]) ) ) fig.show()
In short, load the necessary modules, load the data, make a line chart, set some custom things and then show the chart. Even I can understand that!
Once you get to know python (or if you already know it), you will appreciate that getting something into a pandas dataframe (that's what's happening in line 3) is extremely powerful. I think of it as a spreadsheet in memory that you can do almost anything with.
Midea 14kW (for now...) ASHP heating both building and DHW
- 22 Forums
- 2,036 Topics
- 44.4 K Posts
- 18 Online
- 3,239 Members
Join Us!
Trusted Installers
Struggling to find a reliable heat pump installer? A poor installation can lead to inefficiencies and high running costs. We now connect homeowners with top-rated installers who deliver quality work and excellent service.
✅ Verified, trusted & experienced installers
✅ Nationwide coverage expanding
✅ Special offers available
Latest Posts
-
RE: The Rise and Fall of Europe’s Most Generous Green Subsidy
@dwynwen welcome back… and glad to hear you made it thr...
By Mars , 9 hours ago
-
RE: Air Source Heat Pump - Side Alley Suitability
@ad3628 I’ve seen loads of heat pumps successfully inst...
By Mars , 9 hours ago
-
RE: Hitachi Yutaki SCombi Heat Pump - Thermal Off's
@trebor12345 The Auto function is supposed to adapt au...
By Heatgeek , 12 hours ago
-
RE: In the middle of an ASHP installation - a few questions (and issues)
@jamespa they didn't provide any contract, or design pr...
By benson , 15 hours ago
-
RE: The Great British Heat Pump Quiz
@allyfish thanks for the feedback and glad it was fun! ...
By Mars , 17 hours ago
-
RE: help sizing rads based on room by room heat loss
If its 1988W at DT 50, which is how most radiators are ...
By JamesPa , 22 hours ago
-
RE: Career change – entering the world of heating and heat pumps
@editor Mars, thank you. That's along the routes I was ...
By Lakey , 22 hours ago
-
@editor thanks Mars, it's a rare occasion I'm looking f...
By big_si , 1 day ago
-
RE: Efficiency Concerns on newly installed Mitsubishi Ecodan 8.5kW
@ashp-bobba and @jamespa - thank you both for all your ...
By CBrenewable , 1 day ago
-
-
Win one of five "Heat Pumps 101" Courses
Heat pumps are gaining traction in the UK, but between ...
By Mars , 2 days ago
-
RE: Agile: average import cost vs other tariffs?
@toodles thanks for the analysis. I'll be really intere...
By Old_Scientist , 2 days ago
-
RE: ASHP Ecodan L9 error - No Heating but Hot Water
@phoenix15 I'm no plumber so please don't take this as ...
By dnagre , 2 days ago
-
RE: Is this normal? Click of the DHW returning to space heating
@grantmethestrength Oh sorry to hear that, there should...
By ASHP-BOBBA , 3 days ago
-
@ashp-bobba TBH the ladies are rather disorganised, so ...
By Cathyem1 , 3 days ago
-
RE: Solar Power Output – Let’s Compare Generation Figures
And for those of us without an automatic irrigation sys...
By Majordennisbloodnok , 3 days ago
-
Logically, the lower frequency = more gentle, yes, but ...
By SUNandAIR , 3 days ago
-
RE: Ideal Logic ASHP - change from 55°C to 35°C Heating?
Good point. I’ll keep my eye on the manifold temperatur...
By Tomdad , 3 days ago
-
RE: How hard and expensive would it be to change panel and add battery?
@transparent It is a setting that Octopus make via the ...
By Toodles , 3 days ago