Chromagen Midea 170L Heat Pump Hot Water System - Modbus Integration Success

Finally managed to get my Chromagen HWS properly into HA - I’d previously tried a simple Shelly on/off switch but had some issues with not being able to monitor temperature while it was off.

This is only possible due to the integration work by BrittonA on github here

I didn’t want to use that module style though and thought I’d try the cheapest seemingly suitable module from Aliexpress, found here. I chose the one with ethernet adapter cable and bracket, although didn’t endup using the bracket.

You generally want to follow the steps on Github, but for steps 1-3 do this instead:

  1. hook the EW-11 up to power (5-36V). Connect to its hotspot. you then have two options, i’d try 2a first then 2b if no luck:
    2a. Visit 10.10.100.254 using a browser. You should see a fairly nice web interface:

2b Or use the clunky OEM software “IOTService” to configure. It can be downloaded from an OEM FTP server here, but it was very slow when I grabbed it

3 Now you will want to configure your wifi credentials. Modify mode to ‘STA’ and enter your SSID and password. Reboot the stick and check your router to make sure it has connected - now is a good time to give it a static IP address using your router controls. Don’t proceed until you have a stable wifi connection - you will be able to visit the EW-11 config page by entering the new static IP address in your browser.

NOTE: the reset button on the web portal doesn’t reboot the device, it resets the settings. Go to ‘Others’ to reset the hardware.

4 Configure the Modbus/RS485 connection using the following settings, found on the ‘Serial port settings’ page:


Also configure the TCP server settings:

5 connect the EW-11 to the HWS - use the github instructions: “The cables are Yellow = GND, Gray = B, Black = A.”

6 You will need to provide power to the EW-11. I can’t give you specific advice here as I am not an electrician, but something like a 5v power adapter wired into 240v would do the job, but of course don’t do this if you are not an electrician. There are open L/N/E spade terminals inside the HWS control box.

7 mount the EW-11 somewhere to give the antenna plenty of clearance, and button the unit back up

8 continue on with the HA configuration as per Github - you will need to enter the correct TCP Server IP and port details in your Modbus.yaml. You will know it is working correctly if the web portal Status page reports sent/received frames.

9 all done. your HWS is now controllable by HA, with all relevant temps reporting as sensors.

Extra info:
Seems like quite a handy little device - there are options for MQTT and other broadcasting modes in the server settings tab.

EW-11 User Manual
EW-11 application guide

1 Like

I have the same unit, but in 300L. Your instructions were great, thank you.

I bought the same Elfin-EW11 RS485 transceiver, and used this sealed 220v > 12V power transformer: https://www.aliexpress.com/item/1005005937263063.html

It is probably overkill using a 12W adapter, but that means its lightly-loaded and being sealed means living inside the housing at the back of my house it’s probably going to be safe as houses.

It’s been raining all day, so I haven’t had a chance to wire it up yet. I will this weekend and post the results.

Great write-up, thank you.

No worries, glad it helped. Hadn’t seen those converter modules before, they look handy.

Hi,

Your DIY is very good and very detailed. I have a question. Is it possible to modify some parameters of this water heater through Modbus? For example, change the temperature, change the time, change the timer switch, change mode, etc.? If you can answer, it will be very grateful.

Yep you can change mode, on/off, thermostat temp etc

Thanks ! That’s perfect ! Is there any more detailed installation photo that you can share? Thank you ! I am planning to integrate the same :blush:

Sorry just the ones in the first post. Good luck!

Hey thanks for sharing your project. I have followed your instructions and successfuly set up my EW11 and added it to my HA. I’m having trouble with getting any communication between my heat pump and the EW11. The web portal is not showing any sent/recieved frames and the comms light is not flashing at all. Did you experience any issues here? I’ve set up the EW11 the same way as you have shown.

I did experience issues, but it was configuration related, and the resolution was setting it up with the settings in the screenshot - do you have the same model heat pump? it possibly will have a different MODBUS configuration and you might just need to trial and error it.

Thanks for the response!
I do have the same heat pump. It’s about 3 years old now, so perhaps there are some differences between versions. When you say configuration, is that specifically the serial port settings? I have very limited experience with modbus so I’m generally in uncharted territory! What configuration settings did you change to get it working correctly?

mine is a bit older than that so possibly the same model.

the settings I’m talking about are in the ‘Serial Port Settings’ screenshot above. If you have them configured the same way already, I would investigate the wiring and make sure you’ve got it hooked up right.

Thanks.

I tried again over the weekend without much luck. The actual comms light on the EW11 never flashes at all so there is either an issue with the EW11 or the heat pump.
I’m going to try a direct usb to RS485 connection next and will let you know if I have any luck!

This is great. I set mine up today.
I’ve made a repo with some update/modified instructions, including making it work properly as a home assistant climate entity

1 Like

That’s a nice write up, thanks @doenau.

One thing I discovered recently/meant to add here. The max allowable thermostat ranges vary depending on what heat pump mode you are in (economy/hybrid/e-heater).

So if you set a 70c temp in economy mode, nothing will happen as the max is 65c. Just something to keep in mind if it’s not working as expected.

From a quick look at the manual pdf I have, you apparently can only go to 65C in all modes so best to do a little testing of your own HWS and see where you get. Mine definitely gets to 70c in hybrid.

I have a RSJ-23/300RDN3-B and I can’t get it to communicate. I’m testing with mbpoll

mbpoll -q -a 0:10 -t 4 -r 1 -c 6 -1 192.168.0.87

But it always times out.

I see the Serial Sent Frames & Bytes incrementing, but the number of Received Serial Frames & Bytes is small and always the same. And there are no sent frames / bytes over the network connection.

I’ve checked all the connections. Any ideas on how to debug further?

Yeah I have since found the same once I’d experimented a bit more. The original modbus eco/hybrid toggler is incorrect, as the value of 0 isn’t actually valid for that register.
I’ve updated my repo to now properly accomodate eco, hybrid and e-heater modes :smiley:
Unfortunately HA water heater domain doesn’t have those same mode names, and if I alias them then they don’t have an icon, but oh well.

Waiting on proper HACS validation but you can still add it manually.
Next step… add a UI configuration and skip all the manual modbus setup

1 Like

Have you tried using the GUI for modbus poll?
The CLI never returns anything for me either. I have also found that it usually takes 2 or 3 attempts to get the initial connection when using modbus poll.
Mine is an RSJ-151190. It is possible that some of the registers are different but I would imagin that they are the same, at least slave ID = 1 and the on/off state etc are likely the same.

Is it also possible you haven’t set the modbus port on your hardware to port 502, which is the default modbus port that poll cli is probably using?

I’ve just made this test script also, if you’re handy with using python?
https://github.com/0xAHA/Midea-Heat-Pump-HA/blob/cdebc9b73bf7a590d8c3af14409c92ab7f436552/files/modbus_test.py

Install pymodbus first (pip install pymodbus)
Then run the script

python modbus_test 192.168.0.87 502
python '.\modbus_test.py' 192.168.1.80 502
🌡️  Water Heat Pump Status - 192.168.1.80:502
=====================================================================================
✅ Connected successfully

Register Name                                Raw Value    Processed Value    Description
-------------------------------------------------------------------------------------
0        Power State                         1 (0x0001)   ON                 On/Off Status
1        Operating Mode                      1 (0x0001)   Eco                Heat pump mode
2        Target Temperature                  65 (0x0041)  65 °C              Set point temperature
101      Tank Top Temperature (T5U)          80 (0x0050)  25.0 °C            Top of tank temperature
102      Tank Bottom Temperature (T5L)       159 (0x009F) 64.5 °C            Bottom of tank temperature
103      Condensor Temperature (T3)          100 (0x0064) 35.0 °C            Condensor temperature
104      Outdoor Temperature (T4)            91 (0x005B)  30.5 °C            Ambient outdoor temperature
105      Exhaust Gas Temperature (Tp)        45 (0x002D)  45 °C              Compressor exhaust temperature
106      Suction Temperature (Th)            112 (0x0070) 41.0 °C            Compressor suction temperature
-------------------------------------------------------------------------------------
Successfully read 9/9 registers

Really glad that so many people are integrating this unit. It gets a lot of shit for being a cheap and nasty heatpump HWS but it works really well!

Figuring out those modbus registers was a pain in the ass so I am glad I have saved everyone some time.

2 Likes

I have a Ecospring branded one here in NZ and it’s a tad different. Firstly they conveniently put the terminals under an easy to access panel alongside the power terminals - even installing a cable gland from the factory.

Secondly the mapping of the terminals is different from what’s been mentioned so far (in the gist and such) and are instead as follows;

P/Yellow = A
Q/Grey = B
E/Black = Earth

I don’t know why I didn’t think to try that way around sooner, been bashing my head against this for far longer than I’d like to admit. Baud is still 9600 and such.

Ok so you have a Mode value of 0 returned. When I try and set 0 via mos us, it says it is an illegal value so perhaps you have more modes available on your unit.
Assuming it is the same register, what mode is displayed on the unit itself? And when you change modes on the unit, then re-run that python script, can you confirm which mode returns which value?

Does one of those retuned top or bottom temperatures match what is displayed on your units LCD?