EmonHub support for Samsung Heatpump Monitoring via Modbus

I’ve recently installed a Samsung ASHP (AE050RXYDEG-EU) at my house. Even though I’ve installed full Level 3 heat pump monitoring with a heat meter I’ve also been experimenting with communicating directly with the unit itself.

Using the Samsung Modbus Module and a Modbus to USB adaptor I’ve been able to extract the following data:

I started with a simple python script to read the modbus registers which are documented in the modbus module documentation. It’s possible to send control commands, see my test script for details:

Thanks to Homely Energy for helping me get started with this. HomelyEnergy make a smart controller which is compatible with Samsung heatpumps via the same modbus module, they’ve made an excellent video on how to install the modbus module in the outdoor unit.

I don’t have any personal experience with the Homely controller, but it sounds very impressive and has the potential to significantly improve performance of the heatpump, I may try it out myself in the future.

I’ve now added support into EmonHub (V2.3.4 currently in master branch) to read the data and post to Emoncms:


Example emonhub config:

    Type = EmonHubMinimalModbusInterfacer
        device = /dev/ttyUSB0
        baud = 9600
        parity = even
        datatype = int
        pubchannels = ToEmonCMS,
        read_interval = 20
        nodename = samsung-ashp
        # prefix = sdm_
                device_type = samsung
                address = 1
                registers = 75,74,72,65,66,68,52,59,58,2,79,87,5,89
                names = dhw_temp,dhw_target,dhw_status,return_temp,flow_temp,flow_target,heating_status,indoor_temp,indoor_target, defrost_status,away_status,flow_rate,outdoor_temp,3_way_valve
                scales = 0.1,0.1,1,0.1,0.1,0.1,1,0.1,0.1,1,1,0.1,0.1,1
                precision = 2,2,1,2,2,2,1,2,2,1,1,2,2,1

It’s nice to have access to this data directly, but unfortunately data like power consumption and flow rate are not available via modbus. Therefore, it’s not possible to calculate COP from this data. However, the Samsung ASHP uses an external Skia flow meter which is usually located indoors, it should be possible to read from the flow meter, then with the addition of CT based power monitoring we will be able to calculate COP without the need for an invasive heat meter. The same (or very similar) Sika flow meters are also used in Mitsubishi EcoDan and Vaillant Arotherm units.

Update: there are some hidden registers which report flow rate, these metrics have been added to emonhub. Unfortunately the flow rate metric updates too slowly to enable COP to be accurately calculated. The flow rate either needs to be read directly from the Skia flow meter or a heat meter e.g Level 3 Heat Pump Monitoring Bundle is still needed to calculate real-time COP.

See this thread for successful efforts to read from the Skia flow meter:


Strictly speaking, that’s actually an RS-485 to USB adaptor. :grin:
(I did notice that the OEM Shop listing contains the term RS-485)

Modbus can use RS-232, RS-422 and TCP (as in TCP/IP) as its transport “mechanism.” :wink:

The aim here is to head off any confusion for users just getting started with / learning about, Modbus


I’ve had 2 of those fail over the years. Not overly robust IME.

Looks a good project though.

I can recall at least one of mine biting the dust too.
They’re so cheap, I bought half a dozen of them. (one to use, and a few to lose) :wink: :smile:


I switched to this one about 5 years ago:

and bought one of these about two years ago:

and haven’t had any problems with either one.

That, it does.

1 Like

I’ve not had one fail, but I agree they don’t seem overly robust. I’m considering stocking this adaptor in thr shop instead. I link the fact its got a GND and plenty of protection mechanisms e.g fuses, esd, isolation etc. Its a bit more expensive though, but totally worth it if it stops expensive hardware from being damaged:


Here’s an example of the data in Emoncms:


Thanks for sharing your work on this, it’s very impressive. I had the Samsung AE080RXYDEG (8KW 6th Gen) heat pump installed and while I’m very happy with how it works, getting any data from it has seemed impossible until now.

I have looked at the Homely system and I’m interested in their plans to also integrate solar panels and home batteries. Their system needs the modbus module anyway so your configuration looks like an ideal next step.

I’m new here but happy to help in any way I can.

1 Like

Great to hear, let know how you get on. The first step will be to get hold of a modbus module. I’ve just found some hidden registers which report flow rate to enable COP monitoring with just an energy monitor will now be possible :smiley:


@glyn.hudson I also have a Samsung gen 6 ASHP that I’m struggling to understand the workings of. My existing MMSP is not very helpful. Sorry to ask, but just so I understand, is it in principle possible to understand the COP etc using just a modbus module and an EmonPi? I am a newbie to this, but have some knowledge of programming and installed the ASHP myself.

Hi @CoP

In my last post I wrote:

However, unfortunately after some further testing it turns out that the flow rate reported by Samsung does not update quickly enough to enable COP to be calculated e.g here’s a graph showing the flow rate reported by Samsung and via my Sontex heatmeter, as you can see there is about a 40min delay before Samsung reports the flow rate.:

I don’t know why there is such a big delay on the flow rate, all other metrics from Samsung update in real-time.

Therefore, currently the only way to accurately calculate realtime COP is by using a 3rd party heat meter and electrcity like we offer in Heat Pump Monitoring Bundle:

The advantage of using certified independent meters is that they are guaranteed 1-2% accurate. I’ve found the data displayed on the Samsung display to not be very accurate. My Samsung display under reports heat delivered by about 20%, I’m guessing this is because Samsung assuming I’m using glycol which I’m not. This may mean your COP is not quite as bad as Samsung is reporting.

Here’s live data from my 5kW Samsung ASHP: Emoncms - app view dashboard

I’ve just had homely installed with a samsung heat pump and I’m keen to give this a go to see what it is actually up to. Does anyone know if homely is acting as a modbus master, in which case presumably I can’t connect the suggested devices to the bus as there would then be two masters for one slave? This would mean that the only option would be to attempt to sniff the communication between homely and the heatpump.

@mjc87 - sounds really good, please share your experience after a couple of weeks. Assuming you are in the UK there is a cold spell coming up, would be interested in what homely chooses to do over the next couple of days, though it may not have enough data on your setup by Sunday to do something super smart.

@mjc87 Sounds interesting, I’m planning a Samsung G6 5kW install with Homely at the moment.

What information on the performance of the HP does the Homely unit provide? Does it give and estimated COP?

Absolutely nothing! The homely app is very much control only, you tell it what temperature you want when and that is about it. You can view if it is calling for heat or hot water but nothing else. The Samsung control panel remains active though so you can view the flow temps energy consumed and energy produced on there to get an estimate of the COP.

I guess the Homely unit is designed to stop user interface!

Thanks Glyn - all very useful. I just wanted to point out that on my system you have to enable some of the “new registers” [as Samsung calls them in the manual] first, before you can read or read/write them.

Page 18 on the manual I have.

Is this on the HP itself or a different emonHub config?

You enable these registers via the modbus interface, so I am assuming the modbus iterface module is translating between modbus and something on the heatpump. It seems from page 18 that you configure a specific message set ID for each PDU address you are enabling. Hence my assumption.

I wonder if a different message set ID would allow us to get the flow rate in real time, though I am not going to experiment with that, don’t want to brick the heat pump.

[edit] - I plan on doing this direct from my Linux laptop for more control. Then will plug the system back into my HA instance.

Correct, the emonHub interfacer should do this

No, I don’t think it does because the Samsung modbus interface does not report the electrical energy consumed.

In my experience Samsung does a very poor job of providing accurate monitoring data because of temperature sensor inaccuracies. At least on my ASHP Samsung is underreporting heat delivered by about 30%, see my post here on this thread:

1 Like

Great thanks. I have worked out that if you don’t use “write multiple holding registers” you get very strange results. Either nothing, or the value not updating.

After writing as directed in the manual, I seem to be getting [near] real time data from the flow sensor.

The manual states “If there are multiple functions to add, they must be written all at once using command 16 (Write multiple holding registers)”

I saw in your code [EmonHubMinimalModbusInterfacer.py]. You only write 3, and there is a 0.5 second gap between writes. You may want to write all 8 using command 16 and see if the reliability of the flow sensor readings improves.

I will run for 24 hours and compare with the flow sensor in the pump. My quick tests showed that when I changed the pump speed the reported flow rate changed. Readings below are at 10 second intervals as I dropped my pump from 100% to 90% power.

|[87]: |265|
|[87]: |265|
|[87]: |261|
|[87]: |261|
|[87]: |261|
|[87]: |261|
|[87]: |234|
|[87]: |234|
|[87]: |234|

Seems that I am getting real time updates now. (minus a blip, not sure what caused that)