Connecting to Midea...
 
Notifications
Clear all

Connecting to Midea MSmartHome using a PC

364 Posts
13 Users
22 Reactions
44.5 K Views
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

Posted by: @cathoderay

Posted by: @derek-m

try changing the value to something like 100, to see if that value appears in the message or whether it is overwritten by the true value

It gets overwritten by the true value, 'tank_actual_temperature': 38 in the log 'Status update' and 38 degrees C shows on HA dashboard. That seems plausible, the None is perhaps a default value, in the event nothing is returned.   

Now try changing one of the 'setting' values to see if that gets overwritten.

class MideaC3Device(MiedaDevice):

DeviceAttributes.dhw_temp_max: 60,

Try changing the above to say 65.

 


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9924 kWhs
Joined: 3 years ago
Posts: 1998
Topic starter  

Posted by: @derek-m

Try changing the above to say 65.

It stays at 60 in the logged status update (doesn't appear in HA as I don't have an 'entity' for it (HA jargon)). Might it be relevant that this looks like a setting rather than a reading, as in setting the max DHW temp, as opposed to getting/reading the actual DHW temp? 

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

Posted by: @cathoderay

Posted by: @derek-m

Try changing the above to say 65.

It stays at 60 in the logged status update (doesn't appear in HA as I don't have an 'entity' for it (HA jargon)). Might it be relevant that this looks like a setting rather than a reading, as in setting the max DHW temp, as opposed to getting/reading the actual DHW temp? 

That test would seem to prove that the data in the message is only being read from the Midea controller, but it is not being written to the controller. As a further test you could try changing the above setting on the actual Midea controller.

 


   
ReplyQuote



cathodeRay
(@cathoderay)
Famed Member Moderator
9924 kWhs
Joined: 3 years ago
Posts: 1998
Topic starter  

Posted by: @derek-m

As a further test you could try changing the above setting on the actual Midea controller.

I don't think I can do that. I can set the DHW target temp, which is currently set to 50 degrees, but there is nowhere to set (or read) the dhw_temp_max for for that matter dhw_temp_min on the wired controller. I'm also not sure what it even means. Maybe it is the max the LWT can be when the heat pump is in DHW mode? But that is only a guess. I have had a look in a number of the Midea manuals I have, and dhw_temp let alone dhw_temp_max or min do not appear anywhere. I did find this though (these are in the 'For Serviceman' pages):

T4DHWMAX sets the ambient temperature above which the heat pump will not operate in DHW mode. The highest value that
T4DHWMAX can take is 43°C, which is the DHW mode upper ambient temperature operating limit of the heat pump.  

T4DHWMIN sets the ambient temperature below which the heat pump will not operate in DHW mode. The lowest value that
T4DHWMIN can take is -25°C, which is the DHW mode lower ambient temperature operating limit of the heat pump.

but in midea_ac_lan, the default dhw_temp_max and min values are 60 and 20, neither of which make any sense at all given the above quote, or indeed common sense (if it was prevented from DHW heating at ambients below 20 degrees, I would have had no hot water all winter).

In passing, DHW is normally T5, and ambient temp is T4 (and LWT is T1), so the above use of T4 makes sense because those quoted lines seem to be about the max/min ambient temp (at which pump will not operate etc). 

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

 

@cathoderay

Tracing the code for tank_actual_temperature in C3/device.py, the following is shown.

custom_components/midea_ac_lan/midea/devices/c3/device.py
DeviceAttributes.tank_actual_temperature: None,

custom_components/midea_ac_lan/midea_devices.py
C3Attributes.tank_actual_temperature: {

custom_components/midea_ac_lan/water_heater.py
return self._device.get_attribute(C3Attributes.tank_actual_temperature)

So to obtain the actual value it would appear to use code within water_heater.py

Applying the same to outdoor temperature in AC/device.py gives.

custom_components/midea_ac_lan/climate.py
return self._device.get_attribute(ACAttributes.outdoor_temperature)

custom_components/midea_ac_lan/midea/devices/ac/device.py
DeviceAttributes.outdoor_temperature: None,
DeviceAttributes.outdoor_temperature,

custom_components/midea_ac_lan/midea_devices.py
ACAttributes.outdoor_temperature: {

Doing the same for indoor temperature produces.

custom_components/midea_ac_lan/midea/devices/ac/device.py
DeviceAttributes.indoor_temperature: None,
if attr not in [DeviceAttributes.indoor_temperature,

custom_components/midea_ac_lan/midea_devices.py
ACAttributes.indoor_temperature: {

I therefore think that it is necessary to add further code in other routines to obtain the desired data.

You could try the same trace on your version of the software and see if you get the same results. Locate

class DeviceAttributes(StrEnum):

outdoor_temperature = "outdoor_temperature"

in AC/device.py, then left click on outdoor_temperature, then select References.

Let me give it some thought.


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9924 kWhs
Joined: 3 years ago
Posts: 1998
Topic starter  

Posted by: @derek-m

then left click on outdoor_temperature, then select References

That suggests you are doing this online, on github, which does make tracing things easier.

Outdoor_temperature is certainly real, in that is corresponds to ambient temp, and T4, and is available on the wired controller display and in the 04/04 message as 'byte_09'. Ditto tank_actual_temperature, but I'm still not sure whether indoor_temperature has any meaning in my current setup. It is not used for anything (control is by weather curve), and if it is by chance reorded, it will be the airing cupboard temp, because that is where the wired controller is, and so not representative of normal room temp, because the airing cupboard also contains the DHW tank.

The three variables I would most like to get are LWT (aka T1), RWT and flow rate, which allow an independent glycol adjusted calculation of energy produced. All three are definitely visible in the wired controller, and hourly and then daily LWT values can be seen in the app. The LWT and RWT always get shown as integers, meaning they may be relatively easy to spot as raw values. Flow rate is usually somewhere around 1.42m^3/h, but it has decimals and so probably needs some voodoo to spot it.

I do wonder if byte_14 is LWT. Consider this chart of byte_09 (presumed ambient temp) and byte_14. The latter values are credible LWTs: 

image

but I need to find a way of proving they are.     

PS edited - image had Y axis chopped off 

This post was modified 2 years ago by cathodeRay

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

@cathoderay

I appreciate what you are trying to achieve, but first we need to understand the structure and method by which the present 'available' data is being obtained. Only then will it be possible to add code that may obtain the values that you desire.

The way that I interpret the max and min settings, is that they are they limits, outside which any setpoint cannot be adjusted, so for obvious reason they may not be accessible to both users and installers. Try changing the required setpoint for DHW to above the specified limit and see how the controller responds.


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9924 kWhs
Joined: 3 years ago
Posts: 1998
Topic starter  

Posted by: @derek-m

The way that I interpret the max and min settings, is that they are they limits, outside which any setpoint cannot be adjusted, so for obvious reason they may not be accessible to both users and installers. Try changing the required setpoint for DHW to above the specified limit and see how the controller responds.

I think you are right, well done! The available range for set DHW temp on the wired controller is 20 to 60 degrees, which matches the dhw_temp_min and max figures. 

Any thoughts on whether byte_14 is LWT? I'm going to track it and the visible LWT in the wired controller at hourly intervals to see how well they match, but it is tricky because the LWT by its nature is volatile, and the logged byte_14 value timing may not match my visual recording of the wired controller time. But if it is LWT, that is one of the three desirable variables taken care of. 

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

@cathoderay

I am not certain what the value of byte 14 is, please provide the message body.


   
ReplyQuote



cathodeRay
(@cathoderay)
Famed Member Moderator
9924 kWhs
Joined: 3 years ago
Posts: 1998
Topic starter  

Posted by: @derek-m

I am not certain what the value of byte 14 is, please provide the message body.

It is what is shown in the chart, I have been logging it into HA for several days. It is the value after hex2dec conversion of the byte in 'location' 14 (absolute position 16) of the 04/04 messages. It is the only remaining volatile value in the message after the other volatile ones are accounted for. Recall this previously posted chart: 

image

which shows the values after hex2dec conversion over a 12 hour period and at the bottom what I know or think they are. The 04/04 message frequency defaults to hourly, hence hourly intervals.

The chart has also reminded me that it could be either set or actual LWT. Although both are of interest, it is actual LWT I need for the energy out calculation. It has also reminded me that the wired controller shows actual LWT (I pretty sure I know it is, because I can see defrost cycles when they happen), while app shows only shows hourly or daily (averaged? median? who knows?) set LWT. 

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

@cathoderay

One way to check would be to switch your system to fixed LWT at the present value, and see if the obtained value changes or remains 'fixed'.

A further test would then be to change the LWT setpoint, say lower it by 5C, and see if the value changes quickly or slowly. If the value reduces immediately by 5C, this would indicate that it is the setpoint.


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9924 kWhs
Joined: 3 years ago
Posts: 1998
Topic starter  

Posted by: @derek-m

A further test would then be to change the LWT setpoint, say lower it by 5C, and see if the value changes quickly or slowly. If the value reduces immediately by 5C, this would indicate that it is the setpoint.

I think that will be the simpler way to test it, but I will have to be careful with the timing, as I only get one reliable 04/04 message every hour, and I will also make the change large (say low ambient end of the curve down to 35 degrees) so as to make any change pretty obvious. I can also check the value from the message against the wired controller actual LWT at the relevant time. Plan:

(1) 1657 lower weather curve 

(2) 1700 04/04 message should arrive, I also take a reading from the wired controller actual LWT

(3) check and compare the values.

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
Page 24 / 31
Share:

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)

👉 Book a one-to-one consultation now.

Latest Posts

x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security