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: @iancalderbank

I'm already reading most of the registers that the manual says are present on the EHS system (whether normal or "hidden", whether R or R/W) ,

I am assuming you did enable the new registers, for which the mim b19 module does not, out the box, have the commands to send.

You also need to program them in two commands/blocks, not once for each extended register #1 for the outdoor module and #2 for the wired remote?

[if you program the mim b19 module one  extended register at a time, you get very strange behaviour]


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

Posted by: @cathoderay

Basic python plus minimalmodbus can do it far more simply:

Maybe at a very basic level, once you need to join this with a whole host of additional criteria, you now either have to write an interface between your standalone code and HA, or start also collecting an processing a whole lot of data in your standalone code.  At some point you start to have a mini HA.

The benefit of driving this from HA, is you can do stuff such as ("if no one is home ....", "when someone arrives home ...." etc), all with relative ease.

At some point I am expecting one of the very smart guys (those that write code 100 times faster than us mere mortals e.g. the Eliud Kipchoge equivalent in the HA/Python world) to have created a plugin that does similar stuff to Homely, taking data in regarding future weather and solar production etc.

I think it is worth preparing for the future, by navigating the Home Assistant learning curve now, rather than later [when you will invariably want this stuff]


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

@iancalderbank

Hi Ian,

Unfortunately I cannot see what is happening at your end, so must wait for your response. A copy of the data that you have obtained so far would probably be of use.

The fact that you can read data from the controller would indicate that Modbus communication has been established, but it may be useful to check the following:-

'Modbus interface module error status' in address 0

'Communication status' in address 50

'Unit type:' in address 51

I will do a little more investigation concerning Modbus, since it is many years since I used it in anger.


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

Posted by: @william1066

Posted by: @iancalderbank

I'm already reading most of the registers that the manual says are present on the EHS system (whether normal or "hidden", whether R or R/W) ,

I am assuming you did enable the new registers, for which the mim b19 module does not, out the box, have the commands to send.

You also need to program them in two commands/blocks, not once for each extended register #1 for the outdoor module and #2 for the wired remote?

[if you program the mim b19 module one  extended register at a time, you get very strange behaviour]

Could you please expand on the above, preferably with examples.

 


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

@iancalderbank

I presume that you are aware that Modbus registers are 2 byte - 16 bit.

You could try this sniffer software using the trial period.

https://www.eltima.com/article/modbus-vs-rs485/#:~:text=The%20MODBUS%20RS485%20protocol%20articulates,%2C%20and%2016%2Dbit%20words.


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

Posted by: @william1066

I am assuming you did enable the new registers, for which the mim b19 module does not, out the box, have the commands to send.

You also need to program them in two commands/blocks, not once for each extended register #1 for the outdoor module and #2 for the wired remote?

[if you program the mim b19 module one  extended register at a time, you get very strange behaviour]

Posted by: @derek-m

I presume that you are aware that Modbus registers are 2 byte - 16 bit.

Could you please expand on the above, preferably with examples.

I've got the hidden registers being registered in two custom commands on boot of the ESP in my config here. I've put comments beside each register to explain what function they are registering, e.g. "0x8204, // Outdoor temperature". @iancalderbank provided you've kept this bit in your config, there's nothing else to register.

 

Posted by: @derek-m

I presume that you are aware that Modbus registers are 2 byte - 16 bit.

In my config Ian's using, I've set "value_type: U_WORD" (where appropriate) (U_WORD = unsigned 16 bit integer from 1 register). There's one or two registers which use S_WORD to allow for negative values (e.g. outdoor temperature).

 

This post was modified 2 years ago by Steven

   
ReplyQuote



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

@iancalderbank

You may also find this informative.


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

Posted by: @steven

on boot of the ESP in my config here.

That is very impressive, I wimped out and ran a cable all the way to my HA machine 😀 

I am not sure they are hidden registers, they are clearly documented in the manual that came with my module.  They are "hidden" i.e. don't work at all if you don't program the module with the correct message set ids ... and in the "right way". 


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

Posted by: @derek-m

Could you please expand on the above, preferably with examples.

It seems there are commands the MIM-B19N module needs to send when it receives a modbus request.  Likely because Samsung is using its own system.

The modbus translation needs to be set for two different targets.  One target is the outdoor machine, and one target is the wired remote control.  Programming the commands does not work if you try program the command one register at a time, I know, I spend a ton of time trying to work out why it was unreliable/not working at all.  A bit of RTFM, and it finally clicked.

It is more confusing in the beginning because some registers work "out the box" and some don't.  So if you are not in the habit of reading the entire manual, you may miss the fact of the "extended registers"  i.e. those that don't work without the programming step below.

Below copied from the same post I made on the open energy monitor site.

Read pages 17 and 18 in the manual “Modbus Interface Module MIM-B19N/MIM-B19NT”, and then proceed with the below at your own risk.

The two commands that I used were (please double check the Message Set IDs and their order before you execute these commands)
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.
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”

Above commands run on Ubuntu, but should work on any OS for which mbpoll is available.


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

I've just tested writing to the Midea wired controller using minimalmodbus to see if I can do it without blowing up the whole shebang and it seems all works as it should. Here is the code to set the left hand end of the weather curve (I've left out the half dozen of so lines needed to set up the connection, and the zero argument at the end of each instruction sets the number of decimal places, ie none). The current curve before doing this was 58@-4 / 35@15:

>>> T1SetH1 = instrument.read_register(265, 0)
>>> print(T1SetH1)
58
>>> instrument.write_register(265, 60, 0)
>>> T1SetH1 = instrument.read_register(265, 0)
>>> print(T1SetH1)
60
>>> instrument.write_register(265, 58, 0)
>>> T1SetH1 = instrument.read_register(265, 0)
>>> print(T1SetH1)
58
>>> 

This is the basis of how I intend to implement a load adjusted weather compensation curve, along the lines of:

if desired_room_temp - actual_room_temp > 2:
   instrument.write_register(265, 60, 0)

etc

This is concise, human readable and easy to maintain. What more could one want?

This post was modified 2 years ago by cathodeRay

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


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

Posted by: @william1066

Posted by: @cathoderay

Basic python plus minimalmodbus can do it far more simply:

Maybe at a very basic level, once you need to join this with a whole host of additional criteria, you now either have to write an interface between your standalone code and HA, or start also collecting an processing a whole lot of data in your standalone code.  At some point you start to have a mini HA.

The benefit of driving this from HA, is you can do stuff such as ("if no one is home ....", "when someone arrives home ...." etc), all with relative ease.

At some point I am expecting one of the very smart guys (those that write code 100 times faster than us mere mortals e.g. the Eliud Kipchoge equivalent in the HA/Python world) to have created a plugin that does similar stuff to Homely, taking data in regarding future weather and solar production etc.

I think it is worth preparing for the future, by navigating the Home Assistant learning curve now, rather than later [when you will invariably want this stuff]

I think it rather depends on what one is trying to achieve. My two main objectives (others will have different objectives, and so different solutions) are simple heat pump monitoring, focused but not exclusively on efficiency, and simple adjustment of the weather comp curve to achieve a boost or throttle back depending on load, eg add a boost if room is colder than it should be, maybe after an overnight setback, and throttle back if room is warmer that it should be, maybe from solar gain. The idea of a smart home that knows not only how many people are in the house but also when each one will want to have a dump and so warms up the heated loo seat for them in advance fills me with horror. I have, as I am sure you know by now, an instinctive distrust of needless complexity. I was much happier with my trusty Morris Traveller (I once changed a head gasket by the roadside after it had blown miles from home, I luckily had the necessary tools in the car at the time and there was a motor factors a short distance away to get a new head gasket, widely available because almost so many Austin/Morris cars used the same block) than I am with my current VW Passat which has far far too many black boxes in it, none of which add any material benefit, and some of which are a RRPITA eg the electronic handbrake.

Homely can read the forecast but what it can't do is know the future and that is where it will struggle. I think we had this discussion a while back, but I would far rather rely on real data (as in my description of load balancing a weather comp curve above) than on the Michael Fish of today's guesstimates of what might happen. According to the Met Office forecast for where I live, it should be cloudy right now, in reality it is sunny intervals with mostly sun rather than cloud. Homely will make the wrong adjustments...

As a guiding principle, I like to make things as simple as possible, and then, when I have achieved that, make it even simpler. 

    

 

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


   
👍
1
ReplyQuote
(@iancalderbank)
Noble Member Contributor
3665 kWhs
Joined: 2 years ago
Posts: 643
 

Posted by: @steven

I've got the hidden registers being registered in two custom commands on boot of the ESP in my config here. I've put comments beside each register to explain what function they are registering, e.g. "0x8204, // Outdoor temperature". @iancalderbank provided you've kept this bit in your config, there's nothing else to register.

 

I'm using @steven 's config from his github, copied line for line. The c++ lambda code at the start does the write  to enable the "hidden / new" registers. I'm no coder but I can usually cope with following what working code that other people have written does. so my previous hypothesis about my system being entirely read-only must be wrong: my physical setup is able to write to modbus, otherwise the writing  bit to enable those hidden/new registers wouldn't work.

I've also spent time reading glyn hudson's github and there's a brief note in the .py file saying "writing to register 68 doesn't work".

I've currently got all but one register commented out , debug in the ESP turned up to "very verbose" in an attempt to understand why mine can't successfully "write" to any of the R/W registers, but not getting anywhere with that yet.

the fundamental puzzler is that several people on here are able to get "W" to R/W registers working with config that is logically speaking the same as mine, and in one case completely identical (because I copied it - thanks again steven!), and mine won't work. there must  be something different but I am yet to get a sniff of it.

 

My octopus signup link https://share.octopus.energy/ebony-deer-230
210m2 house, Samsung 16kw Gen6 ASHP Self installed: Single circulation loop , PWM modulating pump.
My public ASHP stats: https://heatpumpmonitor.org/system/view?id=45
11.9kWp of PV
41kWh of Battery storage (3x Powerwall 2)
2x BEVs


   
ReplyQuote



Page 9 / 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