@cathoderay I've just had a Midea heat pump installed and I was struggling to even get the M-thermal controller to connect to my WiFi, although I've made a little bit of progress.
The only Android app that seemed to want to connect was the Midea "NetHome Plus" one - MSmartHome didn't find it - and even then, NetHome Plus won't let me see anything after adding, saying the "network is not very good" although I know I've got reasonable WiFi signal where the unit is.
The msmart Python module finds it but, like you, I can only see device type, IP etc. The type is "C3".
This "midea_ac_lan" integration for Home Assistant works ( https://github.com/georgezhao2010/midea_ac_lan) so I can now at least see flow and DHW temperatures in HA and modify it if I want to, but there are only basic controls and temperature sensors available and not KWh.
I've had a quick look at the Python code for the midea_ac_lan module and it's way over my head, but it's possible someone might be able to work out how to query extra parameters.
@fishboy25uk - only just spotted your post. It seems we have had similar frustrating experiences using the Midea app (defo shiteware in my humble opinion), but I hadn't come across the python code you managed to find, that does look promising, and it even explicitly mentions heat pumps (which is unusual, it's normally just air conditioning units). I'll have a look and see what I can come up with.
Midea 14kW (for now...) ASHP heating both building and DHW
@fishboy25uk - we are definitely onto something. I'm running a weirdo Windows version of HA, but I managed to install midea_ac_lan manually, following the instructions on the github page you linked to, and it found my Midea controller automatically (a good sign), all the setting made sense, and I can now see my DHW tank temp in HA, and it is correct, ie it is the same as the temp showing on the wired controller. All done in about 15 minutes. I'll have a poke around in the python code and see if we can get to see other data.
Midea 14kW (for now...) ASHP heating both building and DHW
@fishboy25uk - a bit of progress. I have managed to add an entity called Outdoor Temperature and can get it to collect some data. The key bit of code for getting the data is in \c3\message.py eg this gets the DHW tank temp:
self.tank_actual_temperature = body[data_offset + 21]
Various offsets get different values (as you can see in the code) and I have tried various offsets but none make credible outdoor temps, especially this one!
But you can see the added entity. I think with time we might crack this. The Zone 1 Water-Temp by the way uses a binary sensor, it's either running or it is not, it doesn't give the actual LWT, at least on my setup.
Midea 14kW (for now...) ASHP heating both building and DHW
A little bit more info gathered by turning on debugging (instructions on the github page, log is in \config\home-assistant.log):
midea_ac_lan requests data and then gets a 50 character string back that looks like this:
010d77910303231e323041231905371919053c223c14310080
this then gets decoded/parsed into something like this:
Status update: {'zone1_power': True, 'zone2_power': False, 'dhw_power': True, 'disinfect': False, 'fast_dhw': False, 'zone_temp_type': [True, True], 'mode': 3, 'mode_auto': 3, 'zone_target_temp': [35, 30], 'dhw_target_temp': 50, 'room_target_temp': 24.0, 'zone_heating_temp_max': [65, 55], 'zone_heating_temp_min': [35, 25], 'zone_cooling_temp_max': [25, 25], 'zone_cooling_temp_min': [5, 5], 'room_temp_max': 30.0, 'room_temp_min': 17.0, 'dhw_temp_max': 60, 'dhw_temp_min': 20, 'tank_actual_temperature': 50, 'outdoor_temperature': 25, 'zone1_water_temp_mode': True, 'zone2_water_temp_mode': False, 'zone1_room_temp_mode': False, 'zone2_room_temp_mode': False}
which just happens to have 25 name:value pairs in it, making me think the 50 character string has two characters for each name:value pair (note the above examples are with my added 'outdoor_temperature' entity, which retrieves something that isn't outdoor temperature). Then there is that data_offset, +21, for tank_actual_temperature, but the tank_actual_temperature name:value pair is the 20th, not 21st, name:value pair. Perhaps it is using zero based counting? This might mean '14' represents 50?
The midea v3 protocol (which is in use here) also has encode/decode 8370 but I can't make any sense of the code that does this.
Any thoughts anybody? The code is available here:
Midea 14kW (for now...) ASHP heating both building and DHW
@batalto - I've gone one further, started a new thread on his github ishoos page.
Midea 14kW (for now...) ASHP heating both building and DHW
@derek-m - thanks, a bit pricey though, I think there may be open source alternatives.
Home Assistant is continuing to be the great time thief it always is. Yesterday I added the midea_ac_lan integration and managed to get DHW actual temp on the HA dashboard and available in History showing tank_actual_temp over time. Yesterday I had a DIY go at adding a new sensor entity for outdoor temperature and while I could get the option to show up, and could add the entity, it got the wrong data (see posts passim).
I then found some code buried in the midea_ac_lan git-hub pull pages which allowed me to add total_energy consumption and it worked! For a brief moment of glory, HA's dashboard showed the same total energy consumption as that shown in the wired controller. Proof of concept! It is possible to get custom data via wifi from the Midea controller! The necessary code was mostly just about understandable apart from the bit that actually gets and parses the data. Somehow you have to know the 'address' of the data, and then how to parse it, and I can't any references on how to do that anywhere. The actual relevant code that extracts and parses the data from the 'message. that comes back from the Midea controller is:
class C3Notify1MessageBody(MessageBody):
def __init__(self, body, data_offset=0):
super().__init__(body)
self.total_energy_consumption = (
body[data_offset + 4] +
(body[data_offset + 3] << 8) +
(body[data_offset + 2] << 16))
The key questions are how to know what data_offset to use, and where did the bitwise operators (<<) come from???
Now all that is history. The HA dashboard reports the Midea entities are unavailable. Nothing will resurrect them. I've no idea what terminated them but they are sure as hell terminated. Unfortunately I didn't take a screen grab, so you will have to take my word for the fact it did briefly work yesterday evening.
Nonetheless, I do have a History chart for the DHW, and it is rather revealing (this is why I persist in trying to get these things to work: they give you insights no manufacturer will ever tell you about). Basic parameters ate DHW set to 50 degrees, reheat kicks in at 40 degrees, timed to only happen between 1300 and 1400 daily. Here's the chart for yesterday:
On the left hand side, we see what we would expect, the water temp low and falling until 1300 when the reheat hicks in, as by then the water temp was 39 degrees. It took about 20 minutes to do the reheat, and by 1330 the tank was at 50 degrees, as it should be. The rest of the chart is the interesting bit. The tank is a standard Telford Tempest large coil 200L ASHP tank. These are blagged as having negligible heat loss. I don't think so. Look at the right hand side of the chart, from 1330 onwards. The temperature drop is far from negligible. Two hours after the reheat it had dropped two degrees, over the next two hours it dropped another degree, and so on, until I turned my PC (and so HA) off. The only time I took off any hot water was around 1800, when I drew off enough to wash my hands. All the other heat loss is passive loss from the tank.
Midea 14kW (for now...) ASHP heating both building and DHW
I have now got the two Midea sensors back, by deleting the device and then re-adding it in Home Assistant. It looks like the token and key used to connect to the Midea wifi changed overnight... which could be an infernal nuisance if it happens all the time. Anyhow, for now, here is the proof of concept, a so-called card from my dashboard in Home Assistant, showing DHW tank actual temp (available out of the box) and total energy consumption (a custom addition, if it can be added, then hopefully others can as well):
Midea 14kW (for now...) ASHP heating both building and DHW
I have now added something called History Explorer (<=link) to Home Assistant and things are looking up. You download a ~300kb javascipt file, add it as a dashboard resource (need to run HA in Advanced mode to have that option) and then add the card to a new dashboard (so there is no clutter). Here's the chart for the last few hours showing DHW tank temp and energy use:
The DHW is fine (and the temp does not appear to be dropping as fast today) but the energy consumption is a little ambiguous. It is based on the total energy consumption sensor, so somewhere some maths is being done. But its credible, and broadly agrees with what the Midea app shows.
History Explorer has two very useful features. Firstly, it is very interactive eg I can change intervals, slide the charts left and right etc. I can change from looking at what happened in the last hour to all last month in a few clicks. Secondly, it allows you to download the data in csv format - extremely useful.
Midea 14kW (for now...) ASHP heating both building and DHW
- 21 Forums
- 1,962 Topics
- 42.6 K Posts
- 68 Online
- 2,276 Members
Join Us!
Heat Pump Dramas?
Thinking about installing a heat pump but unsure where to start? Already have one but it’s not performing as expected? Or are you locked in a frustrating dispute with an installer or manufacturer? We’re here to help.
✅ Pre-Installation Planning
✅ Post-Installation Troubleshooting
✅ Performance Optimisation
✅ Complaint Support (Manufacturer & Installer)
Latest Posts
-
RE: Volumisers in Heat Pump Systems: Does Placement Matter?
All agreed. if you want to delete our exchange for cla...
By JamesPa , 5 seconds ago
-
@eliuccio Unfortunately, whilst I agree with a lot of...
By JamesPa , 45 minutes ago
-
RE: Newbie out of her depth – Samsung AE120RXYDEG 12kW heat pump
@bami I think if the heat loss documentation matches a ...
By bontwoody , 1 hour ago
-
RE: What is the best strategy for operating a very oversized heat pump?
@jamespa I'm afraid that's over my head but if anyon...
By IRMartini , 2 hours ago
-
RE: Setback savings - fact or fiction?
And here in case any one wants it is the code I used in...
By cathodeRay , 2 hours ago
-
RE: Samsung Gen 7 R290 12kW is not behaving how I expected
Definitely its in the 20xx FSVs. Conversely it may be...
By JamesPa , 2 hours ago
-
RE: Towel rails. An unexpected final hurdle
We have both Normal Rad for heating the room and then a...
By IRMartini , 4 hours ago
-
RE: Heat Pump Sizing & Installation Costs
Perhaps useful to have installed date too? To get conte...
By Tim441 , 6 hours ago
-
RE: SolarPV tables / online calculator
I'd be interested what others find whilst using that we...
By Majordennisbloodnok , 8 hours ago
-
RE: F.788 Building circuit pump reports internal fault - Vaillant Arotherm
Guess I have to wait for engineer visit. I really hope ...
By jeegnesh , 20 hours ago
-
RE: Act now to defer the UK road tax increase on EVs
@majordennisbloodnok Damn right sir. my attempt at iron...
By Jancold , 23 hours ago
-
RE: ASHP and heating issues in new build house
That’s good gives you more capacity. It made me think, ...
By Terry1812 , 1 day ago
-
RE: Seewet manhole cover within r290 exclusion zone
Thanks! I asked Vaillant, and they say I should be fi...
By dbrb2 , 1 day ago
-
Looking for the Grant Aerona 3 setting to turn off completely at 20 OAT
I'm running my Aerona 3 on WC and the 'warm end of that...
By damonc , 1 day ago
-
RE: Do I just go with the lowest quote for my heat pump?
So after signing in Sept in two weeks the install may s...
By Jancold , 1 day ago
-
RE: Victorian Semi Retrofit / Extension ASHP and UFH Advice
When you are renovating is always a good time, as it ma...
By JamesPa , 1 day ago
-
RE: Just one room not reaching desired temperature
Looks like this issue is now resolved. Aira installed a...
By ChandyKris , 1 day ago
-
There have been several people on the OpenEnergyMonitor...
By RobS , 2 days ago
-
RE: Say hello and introduce yourself
Good point @jamespa But that probably strengthens @ch...
By Transparent , 2 days ago
Latest Topics
-
Heat Pump Sizing & Installation Costs
By Mars 8 hours ago
-
Volumisers in Heat Pump Systems: Does Placement Matter?
By Mars 9 hours ago
-
SolarPV tables / online calculator
By MichelleC 16 hours ago
-
By Toodles 2 days ago