Posted by: @iancalderbankI'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]
Posted by: @cathoderayBasic 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]
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.
Posted by: @william1066Posted by: @iancalderbankI'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.
I presume that you are aware that Modbus registers are 2 byte - 16 bit.
You could try this sniffer software using the trial period.
Posted by: @william1066I 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-mI 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-mI 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).
Posted by: @stevenon 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".
Posted by: @derek-mCould 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.
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?
Midea 14kW (for now...) ASHP heating both building and DHW
Posted by: @william1066Posted by: @cathoderayBasic 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
Posted by: @stevenI'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
- 22 Forums
- 2,047 Topics
- 44.6 K Posts
- 32 Online
- 3,273 Members
Join Us!
Trusted Installers
Struggling to find a reliable heat pump installer? A poor installation can lead to inefficiencies and high running costs. We now connect homeowners with top-rated installers who deliver quality work and excellent service.
✅ Verified, trusted & experienced installers
✅ Nationwide coverage expanding
✅ Special offers available
Latest Posts
-
@ashp-bobba The service contract is with Daikin Service...
By Toodles , 54 minutes ago
-
RE: Potentially more choice including air to air heat pump grants
@jeff Such documents are far too wordy for my ‘daily re...
By Toodles , 2 hours ago
-
RE: Renewables & Heat Pumps in the News
Lol... thanks to @judith I cracked and gave the Spanish...
By Lucia , 6 hours ago
-
RE: Getting the best out of a heat pump - is Homely a possible answer?
@grahaml I cannot agree that it is a small percentage o...
By benson , 20 hours ago
-
RE: Warm weather and heat pumps.
You’re welcome @lucia - thanks for watching. I’ve alway...
By Mars , 22 hours ago
-
RE: Commencing on an ASHP Installation Process
In that case treating it as a separate space seems emin...
By JamesPa , 1 day ago
-
For me, the Questions are here: 1) Does a Volumiser t...
By iantelescope , 1 day ago
-
RE: Yes, the "zoning with ASHP" topic again...
This aspect of control is a bit variable from manufactu...
By JamesPa , 1 day ago
-
RE: Samsung Gen6 16kW tribulations
@emceed, can you please give us an update on your syste...
By Mars , 2 days ago
-
RE: ASHP Ecodan L9 error - No Heating but Hot Water
@phoenix15 Sorry to hear that, we are all the way down ...
By ASHP-BOBBA , 2 days ago
-
RE: Solar Power Output – Let’s Compare Generation Figures
@editor Well last MAY i know was not the greatest for s...
By Andris , 3 days ago
-
What's the problem you are trying to solve. The answer...
By JamesPa , 4 days ago
-
Good luck. For what it is worth my system was very def...
By JamesPa , 4 days ago
-
RE: Massive Electricity Cost for Running My Air Source Heat Pump
I agree @mark-h The Building Regs are now very readable...
By Transparent , 5 days ago
-
RE: Help me understand my Mitsubishi Ecodan system
@carpenterstation When changing settings in the ser...
By RobS , 5 days ago
-
RE: Ecodan Legionella cycle - immersion heater problem
Thanks for letting us know @clockworks I admire your ...
By Transparent , 6 days ago
-
RE: Revised version of MCS-020 (noise standards for heat pumps)
As you say this is no change, which I personally think ...
By JamesPa , 6 days ago
-
RE: What happens when the outside temperature exceeds the upper WC point?
@editor not via the WC curve but as @old_scientist ment...
By bontwoody , 7 days ago
-
RE: MHHS and Heat Pump compatibility
@toodles to be clear I don't know if there will be a re...
By Scalextrix , 7 days ago