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
- 26 Forums
- 2,199 Topics
- 48.4 K Posts
- 63 Online
- 5,854 Members
Join Us!
Podcast Picks
Latest Posts
-
RE: Heat Pump Installers: Competence, Illusion and the Hard Truth Homeowners Must Face
@editor I hope you have at least a partially working he...
By GrahamF , 29 minutes ago
-
RE: Why Air Release Valves and Deaerators are Non-Negotiable
I confess to the same misgivings! My installer fitted ...
By JamesPa , 2 hours ago
-
@drei are taking measurements from the heat pump, or do...
By GrahamF , 3 hours ago
-
RE: Heat pump and wifi kit connection.
Wi-Fi kit covers any Samsung device that has a modem in...
By Alfapat , 11 hours ago
-
RE: How to Understand Wiring Up a Heat Pump
I’m watched @pirate-rich rewire our wiring centre last ...
By Mars , 12 hours ago
-
RE: Solar Power Output – Let’s Compare Generation Figures
@agentgeorge err… Pass! I dunno what caused that! I’ll ...
By Toodles , 12 hours ago
-
RE: Sizing - Save me from my headache
If you get an R290 pump you should be able to heat the ...
By JamesPa , 12 hours ago
-
RE: Help me keep the faith with my air source heat pump installation
@jamespa can you take a pic of the primaries inside the...
By AdamK , 13 hours ago
-
RE: Large heat pump options for church building
@aventus-eco Thanks Sean, will drop you a line.
By Josephiah , 13 hours ago
-
RE: Moving FIT array onto a Tesla Powerwall 3 possible?
@toodles that’s good news for @adamk
By Judith , 14 hours ago
-
RE: Samsung Gen 6 - Schedules not working
@technogeek That sounds very logical :-). I will give i...
By bontwoody , 17 hours ago
-
RE: Who's your electricity provider and what's your tariff?
Considering Octopus states all their electricity is gre...
By AgentGeorge , 17 hours ago
-
RE: Heat Pump + Tado Setup: Smarter Control for Secondary Pumps?
@pirate-rich thanks for the reply. If I were to explo...
By Lloydi , 18 hours ago
-
RE: Seal the Deal: Don't Let Your Heat Pump Leak Energy
@transparent I think the committee might get into some ...
By Toodles , 19 hours ago
-
Samsung ASHP Support in Midlands area?
Hi all, Per title.... can anyone recommend a ASHP ser...
By Andehh , 19 hours ago
-
May I present the maths I referred to earlier when disc...
By Transparent , 22 hours ago
-
RE: RDSAP10 effect on existing heat pump EPC rating?
How many times and dates have epc sap rules been change...
By Tim441 , 22 hours ago
-
RE: Rodents! A word of warning for heat pump owners
I think similar care should be taken against vermin ing...
By Transparent , 23 hours ago