@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
- 26 Forums
- 2,114 Topics
- 46.4 K Posts
- 193 Online
- 3,410 Members
Join Us!
Latest Posts
-
RE: The good, the bad and the not that great – my heat pump installation
Said I would pop back with a update. Only Mr Jesus h...
By Burtis , 4 hours ago
-
RE: No-code, plug-and-play monitoring for your heat pump
@cathoderay i will have to take a look at that, tbh as ...
By Grantmethestrength , 4 hours ago
-
RE: Buffers, hot water and cooling
Thats presumably heat pump DT, what about radiator DT a...
By JamesPa , 5 hours ago
-
RE: Benefits of an extra horizontal loop for GSHP
I have no direct knowledge of GSHP ground loops but it ...
By Abernyte , 13 hours ago
-
RE: Who's your electricity provider and what's your tariff?
@chandykris Exactly the same here. We now have 13.5kWh ...
By Old_Scientist , 15 hours ago
-
Compressor and Evaporator Stratification
I have had a few issues with my Hitachi spilt heatpump ...
By trebor12345 , 16 hours ago
-
RE: Wood burner with ASHP - direct air?
This depends on the size of your wood burner and size/t...
By Lucia , 1 day ago
-
RE: Difficult positioning of air source heat pump
@rikiarn It's a not a buffer it's a volumiser which is ...
By Lucia , 1 day ago
-
RE: Is your heat pump insured?
To make things clear, lots of insurance companies cover...
By Lucia , 1 day ago
-
RE: Boxt Heat Pump Installation Experience
@adrian any updates since installation? How is it perfo...
By Ashfp , 2 days ago
-
RE: Say hello and introduce yourself
Hi @seatonian - Yes, I know Seaton, and I have the Nat...
By Transparent , 3 days ago
-
@seatonian got your email. Will connect you with a reco...
By Mars , 3 days ago
-
@downfield and @toddles, this isn’t in the settings cur...
By Mars , 5 days ago
-
RE: Homely launched for Grant Aerona ASHP control
I haven't bought the Aerona Smart Controller (£700!) bu...
By Prunus , 5 days ago
-
RE: Antifreeze top up for my heat pump - is this a rip off?
For the record, Grant supply ethylene glycol for their ...
By Prunus , 5 days ago
-
RE: Compressor attempts start but fails - Nibe Fighter 2005 8kW
@skyefarmer amazing. Well done!
By Mars , 6 days ago
-
RE: Air source heat pump roll call – what heat pump brand and model do you have?
Ebac 5kw - Monobloc R32. Developed and made in UK - Mit...
By marcinwloch69@gmail.com , 1 week ago
-
RE: Is a Valliant Inline 6kW heater a BUS buster?
Just another thought - it might be worth thinking about...
By JamesPa , 1 week ago
-
RE: BUS Grant: removal of all other fossil fuel heat sources
@rikiarn - just have a think as to how much it will cos...
By Transparent , 1 week ago
-
Don't do much digging around.That's best left to the pr...
By Transparent , 1 week ago
Members Online
No online members at the moment