Samsung ASHP schedu...
 
Notifications
Clear all

Samsung ASHP scheduling help

232 Posts
24 Users
27 Reactions
37.2 K Views
(@william1066)
Reputable Member Member
1333 kWhs
Joined: 2 years ago
Posts: 206
 

Posted by: @cathoderay

what about 120 ohm resistors?

I may review my decision about this over time.  [Circulator] Pump modbus is over TCP/IP, the Heat Pump is over RS485.  Screen shot is of flow rate x 2 sources, temperature x 2 sources, there are some bad reads

image

   
ReplyQuote
(@steven)
Active Member Member
106 kWhs
Joined: 2 years ago
Posts: 9
 

I finally managed to get time to install the MIM-B19N modbus interface into my Samsung 8kw HT Quiet at the weekend. I'm integrating it with Home Assistant slightly differently again, using an ESP32 rather than a Raspberry Pi.

With the ESP32, you can install ESPHome and configure it in a similar way to how @william1066 is. ESPHome is built by the same folks as Home Assistant (Nebu Casa) so it integrates seamlessly. I've put my config up here temporarily, and will put it into a repo once I've finished playing around.

I'm using an RS485 to TTL board, which is powered by the ESP32 via 3v or 5v pin depending on the board. I've tested it successfully with this one and this one.

From the outdoor unit to the RS485 board I ran some shielded Belden 8723 (equivalent, from here £22 for 25 meters). I've got a 120ohm resistor at both ends, but haven't connected the ground cable yet — I will do that at the RS485 end once I've finished setting up.

So far so good, no dropouts for the last 24 hours or so. The only thing I noticed was the target flow temperature (register 68) doesn't seem to read live when water law (weather compensation) is enabled and always returns 30ºC — that's the "low" water law target when outdoor temp is at 17ºC (it's currently ~5ºC outside).

This post was modified 2 years ago 2 times by Steven

   
👍
2
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9909 kWhs
Joined: 3 years ago
Posts: 1994
 

@william1066 - all very interesting and useful, thank you. I don't think you mentioned the RS-485 to USB box you are using? The cheapo type or the more expensive 'isolating' type (where I think the 'isolating' keeps the two sides apart, neither can blow up the other one)?  

The wires, of course I meant shielded not sheathed. The shielding, grounding and 120 ohm resistors are as I understand it about better a better cleaner signal. For short runs, poor signals are less of a problem, and as my run will be relatively short, about 5-10m, I will start by keeping things simple.

The trouble is, none of this is simple to a beginner! Let's say I want to rewire a table lamp. I know exactly what cable I need, and how to the job without blowing up the lamp, the house or myself. RS-485 cable? I have absolutely no idea, and as is usual with this stuff, google is your enemy. Within 10 minutes, you will have 50 tabs open and none of them make any sense. Down the bottomless rabbit hole I go again...

This is why a beginner's guide is so sorely needed. I am not stupid, and am reasonably capable with my hands, but none of that is of any use if I can find the practical details of what to do...   

PS have however managed to make some progress on doing some of this wirelessly, see here.

 

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


   
ReplyQuote
(@Anonymous 5046)
Active Member
Joined: 2 years ago
Posts: 10
 

Hello @cathoderay

since Midea family is pretty big (mine for example is local brand Rotenso) then some manuals are better than others, here is very good example:
https://www.clivet.com/en/edge-evo-2.0-exc

in general very nice lecture and well explained settings, what's more from page 143 of the manual you will find Modbus registers table.

Question how to get to the Modbus line, seems not clear if H1H2 are the right connectors (in manual says it's for cascade unit while on page 63: " This appliance supports the MODBUS RTU communication protocol"), then we have XYE: some Midea version of modbus...

really appreciate your work!


   
👍
2
ReplyQuote
(@william1066)
Reputable Member Member
1333 kWhs
Joined: 2 years ago
Posts: 206
 

Posted by: @steven

So far so good, no dropouts for the last 24 hours or so. The only thing I noticed was the target flow temperature (register 68) doesn't seem to read live when water law (weather compensation) is enabled and always returns 30ºC — that's the "low" water law target when outdoor temp is at 17ºC (it's currently ~5ºC outside).

I see the same with "Indoor Temperature" and "Target Indoor Temperature" when you are on external thermostat. 

image

   
ReplyQuote
(@steven)
Active Member Member
106 kWhs
Joined: 2 years ago
Posts: 9
 

Posted by: @william1066

I see the same with "Indoor Temperature" and "Target Indoor Temperature" when you are on external thermostat. 

For the time being I've added a template sensor to calculate the approximate target flow temperature using y=mx+b. I added four number helpers into Home Assistant for the high/low values/targets then use the outdoor unit's outdoor temperature sensor as x. I realise water law/weather comp likely isn't strictly linear, but this should get me close enough.

You can see in the graph from this morning it reaches the calculated target temperature, then once the house is 1ºC below the thermostat (Wiser) it starts it's 3 cycles per hour before the DHW kicks in at 8am.

template:
  - sensor:
      - name: Target Flow Temperature
        unique_id: target_flow_temperature_calculated
        unit_of_measurement: "ºC"
        device_class: temperature
        state: >
          {% set ashp = {
              "low": states('input_number.wl_low') | int,
              "low_target": states('input_number.wl_low_target') | int,
              "high": states('input_number.wl_high') | int,
              "high_target": states('input_number.wl_high_target') | int
          } %}
          {% set m = (ashp.low_target - ashp.high_target)/(ashp.low - ashp.high) %}
          {% set b = ashp.high_target - (m * ashp.high) %}
          {{ (m * states('sensor.outdoor_temperature') | float) + b }}
Screenshot 2023 02 03 at 12.30.35

   
👍
1
ReplyQuote



 TomC
(@tomc)
Active Member Member
92 kWhs
Joined: 2 years ago
Posts: 8
 

Posted by: @william1066

I see the same with "Indoor Temperature" and "Target Indoor Temperature" when you are on external thermostat. 

-- Attachment is not available --

I have the same issue (with Samsung controller in Water Outlet mode but no external thermostat). It is frustrating to have to use a separate temperature sensor for Indoor Temp when the controller clearly still has that parameter!

 


   
ReplyQuote
 TomC
(@tomc)
Active Member Member
92 kWhs
Joined: 2 years ago
Posts: 8
 

@steven 

I think the Samsung 'water law'/WC is linear so you should get the exact target flow temp with your method.

I wanted to have some control over the the flow temp whilst still having an element of weather compensation. I therefore have the Samsung controller in Water Outlet mode (which turns the internal WC off) and have implemented the WC curve/line in HA, and also added some basic load control (flow temp turned down 1 degree for every 0.1 degree above indoor temp target). This seems to work OK, so long as the Zigbee temperature sensor is working.

 

      - name: "ASHP WL P"
        state: >
            {% set indoor = states('sensor.0x00124b0029282fdb_temperature') | float %}
            {% set diff = indoor - (states('input_number.ashp_ha_indoor_target') | float) %}
            {% if diff > 0 %}
                {{ (diff * -10) | round(1)}}
            {%- else -%}
                {{0}}
            {%- endif -%}
      - name: "ASHP WL temp"
        state: >
            {% set outdoor = states('sensor.ashp_outdoor_temp') | float %}
            {% set point1 = {
               "outdoor_temp": 15,
               "WL_temp": 35
            }%}
             
            {% set point2 = {
               "outdoor_temp": -10,
               "WL_temp": 50
            }%}
            
            {{ (states('sensor.ashp_wl_p') | float) + (states('input_number.ashp_wl_offset') | float) + point1.WL_temp + ((1-((outdoor - point2.outdoor_temp) / (point1.outdoor_temp - point2.outdoor_temp))) * (point2.WL_temp - point1.WL_temp)) }}

It needs an extra bit of logic to deal with outdoor temps below -10 and above 15.

 


   
👍
3
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9909 kWhs
Joined: 3 years ago
Posts: 1994
 

Posted by: @Anonymous

Question how to get to the Modbus line, seems not clear if H1H2 are the right connectors (in manual says it's for cascade unit while on page 63: " This appliance supports the MODBUS RTU communication protocol"), then we have XYE: some Midea version of modbus...

Thanks, that's very useful, I definitely recognise parts of that manual as being the same as the Midea manuals but the Edge Evo manual is less cryptic in places.

I think H1 and H2 are Midea speak for the conventional RS-485 A/B connections, and modbus-RTU is the protocal/language in use. XYE - like you, I think it is a proprietry Midea version of modbus. The cascade looks to me like it might be dealing with the master/slave setup required by RS-485/modbus (you have a salve cascade, with the slaves (heat pumps) cascaded via the CN30 H1/H2 connections). I think essentially if you put all the diagrams together it seems H1 and H2 are where you make the RS-485 A/B connections in the wired controller. The CN30 H1/H2 connectors on the heat pump PCBs are primarily for setting up slave cascades.      

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


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9909 kWhs
Joined: 3 years ago
Posts: 1994
 

This video from Homely is also quite informative. It shows the actual physical wire connection process to the Midea wired controller. Interestingly, no apparent ground/earth, but a 120 Ohm resistor is used.

There is a similar video for Samsung units.

  

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


   
ReplyQuote
(@redzer_irl)
Trusted Member Member
561 kWhs
Joined: 2 years ago
Posts: 37
 

@william1066 I would be very interested if you could share your Home Assistant config. My MIM-B19N will hopefully be delivered by the weekend and looking forward to trying to get it all set up.


   
ReplyQuote
(@william1066)
Reputable Member Member
1333 kWhs
Joined: 2 years ago
Posts: 206
 

@redzer_irl  I am in the process of putting my config and the process into github, but that requires some sanitising the config. 

You need to "program" the MIM-B19N in the correct way, otherwise you get garbage data out. 

I am not sure what sort of damage you can do if you don't do things correctly.  Proceed at your own risk.  it took me a while before I realised you had to program all registers in a single command [for each block], so my module and the heat pump survived a certain level of "test and learn".

Please read pages 17 and 18 in the manual “Modbus Interface Module MIM-B19N/MIM-B19NT”.

These two commands worked for me [please double check the Message Set IDs and their order before you execute these commands and change the device, if different]

mbpoll -m rtu -0 -r 6000 -b 9600 -d 8 -t 4:hex /dev/ttyUSB0 0x8238 0x8204
mbpoll -m rtu -0 -r 7000 -b 9600 -d 8 -t 4:hex /dev/ttyUSB0 0x411E 0x42D7 0x42D6 0x4087 0x406C 0x42E9 0x42F1 0x4067

The version of mbpoll I used is is as follows running on Ubuntu.

mbpoll/jammy,now 1.4.11+dfsg-2 amd64 [installed]
command line utility to communicate with ModBus slave (RTU or TCP)

I am using the “Waveshare Industrial USB to RS485 Converter with original FT232RL”

Extracts from my ha config below.  I have been reading the data for some time, I have only just started using the R/W registers, the R/W registers seems to be working fine now, so I now have much more sophisticated scheduling available via home assistant than I had before. 

With the flow rate, I was converting to lpm, but may change that to keep it in m3/hr and then use a template sensor in HA to change that to lpm.  There is no lpm in ha.

I am pushing all my ha data into an influxdb instance, with retention forever, this as a data backup, but also because it provides a useful way of building dashboards.

I suggest you implement the sensors first.  Do that for a couple days or a week, check how reliable that is for you, then start with the R/W registers.  I ran a couple weeks before moving my DHW and heating schedule into HA automations by writing to the heating and hot water registers.

Extracts from config, full file on github in the next couple of days.

modbus:
  - name: "samsung"
    type: serial
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: E
    port: /dev/ttyUSB0
    stopbits: 1
    switches:
      - name: Heating
        unique_id: samsung_gen6_16kw_heating
        slave: 1
        address: 52
        command_on: 1
        command_off: 0
        verify:
          input_type: holding
          delay: 10
          address: 52
          state_on: 1
          state_off: 0

 

    sensors:
      - name: "Outside Temperature"
        scan_interval: 60
        slave: 1
        address: 5
        state_class: measurement
        scale: 0.1
        unit_of_measurement: °C
        precision: 1
        data_type: int16

 

 


   
👍
1
ReplyQuote



Page 3 / 20



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