@derek-m LWT is register 68 - line 27 in the document that redzer kindly attached. am trying to write to it with the code that steven posted earlier. Its listed as a R/W register type. there must be something I haven't done yet, that allows it to be changed by the external input. I just don't know what that is yet. Still experimenting.
regarding the other question - I already what I know what I want to do in my house terms of emitters, zones etc - sorry. this is just about establishing an automation platform as being in control of the heat source . replicating the things that the heat sources controller does (weather compensation) and adding to that levels of sophistication (principally load compensation) that the heat sources controller doesn't do. Getting that automation platform to do the thing that unlocks the rest - successfully tell the ASHP to increase or decrease it LWT - is the key. everything after that is (just!) increasingly more sophisticated logic in response to more sophisticated conditions - but that still does the same thing, increase or decrease LWT.
I had converted the Samsung Modbus MIM-B19N section on registers from PDF into Excel just to make it a bit easier to understand for myself. The section on hidden registers is also included.
I had converted the Samsung Modbus MIM-B19N section on registers from PDF into Excel just to make it a bit easier to understand for myself. The section on hidden registers is also included.
@tomc just going back through this thread. your post on 3rd feb says , to paraphrase, that you have "basic load control by turning flow temp down working ok". Implying you are succesfully writing to the target flow temp register. I've put the controller into water outlet mode as per you notes, but when I try to use the code below from an ESPto write to the flow temp, the unit ignores me and stays at the target flow temp that it wants to be at.
@derek-m LWT is register 68 - line 27 in the document that redzer kindly attached. am trying to write to it with the code that steven posted earlier. Its listed as a R/W register type. there must be something I haven't done yet, that allows it to be changed by the external input. I just don't know what that is yet. Still experimenting.
regarding the other question - I already what I know what I want to do in my house terms of emitters, zones etc - sorry. this is just about establishing an automation platform as being in control of the heat source . replicating the things that the heat sources controller does (weather compensation) and adding to that levels of sophistication (principally load compensation) that the heat sources controller doesn't do. Getting that automation platform to do the thing that unlocks the rest - successfully tell the ASHP to increase or decrease it LWT - is the key. everything after that is (just!) increasingly more sophisticated logic in response to more sophisticated conditions - but that still does the same thing, increase or decrease LWT.
I suspect, though cannot be certain, that the processor inside the heat pump controller will operate in a similar manner to those inside an industrial PLC (programmable Logic Controller) or DCS (Distributed Control System).
I believe the heat pump processor will be running the internal software in a continuous loop, consisting of:-
Read the input data, both binary and analogue (via the analogue to digital converter)
Carry out the necessary calculations specified within the software.
Write the output data.
Repeat the above, at a frequency of probably 50 times per second.
There is very little memory storage inside the actual processor, so it reads data from external memory and also writes data to external memory. When I say external I mean a memory chip inside the heat pump controller.
The value that you are trying to change in address register 68, I think you will find is being written to by the processor, after it has calculated the required LWT. Whilst it may be labelled R/W, which allows you to change the value via HA, it is almost immediately being overwritten by the processor as the software runs.
If you can change settings via an App, it may be possible to make suitable changes that will not be overwritten. What values, if any, can you change by this method.
You should be aware that the heat pump controller was not designed for third parties to be making changes via Modbus.
@derek-m I am on a variable tariff so I'm turning heating and hot water off from 17-19:00 and upping the hot water set temperature from 2-5:00
I'm using the same controls to allow a hot water boost from a ZigBee button or phone for family acceptance factor.
Please clarify what you mean when you say "I'm using the same controls to allow a hot water boost from a ZigBee button or phone for family acceptance factor".
@derek-m I only heat the water twice a day (at the moment it's to 50 degrees from 02-05:00 during the cheap night rate and to 42 degrees from 15:45-16:30 before the peak rate). If someone wanted a bath and there wasn't hot water, they were finding it difficult to manage the control panel and remember to turn it off again afterwards.
So the Zigbee button just calls the Home Assistant script to turn on the water, switch it to Standard mode, set the temp to 50 degrees and reverse all this after 30 mins. It isn't used very often, maybe once a week, but they are happy with it when they do.
I don't have solar panels (yet) but it wouldn't be as much of an issue for anyone diverting excess power into their hot water tank.
Worth mentioning that a load adjusted weather compensation curve was, and still is, one of my objectives in all this, primarily so I can set an overnight setback and then recover from it reasonably quickly by way of a boost. The probability is that this will decrease overall kWh use, though the debate still rages on as to how true this is, and really only empirical evidence will provide the answer. The boost logic is very simple: eg if set room temp - actual room temp > 3 then new LWT = old LWT + 2, actual number to be determined by testing. Different heat pump manufacturer, but same idea from start to finish, and to do that you have to have monitoring, to know the room temp and LWT.
This is indeed what Homely does, and it does it over modbus (which was one of the leads suggesting all this is possible) and at one point I even asked whether Homely itself was the answer, but the ominous 'Homely doesn't give you control, it takes control' quote is what did for Homely for me.
This is the sort of ludicrously complicated nonsense built into HA/ESP. For example, why do you have to specify unit_of_measurement and device_class temperature? For the maths, they don't matter (a number is a number) and for us humans they are redundant, we know that "Target Flow Temperature" is a temperature (it's in the name; and that also makes id: target_flow_temperature redundant, because a name is an id, and the two values are duplicates of each other). I have only a very basic understanding of python but nonetheless I managed in the space of a few hours to add one module (minimalmodbus) and get a script that could read all the registers I wanted once a minute and log them to a csv file, and then add another script to extract calculated values from the minute data file once an hour. I understand every line and letter of the code, it does exactly what I want, it is short, it is maintainable, and there isn't a single lambda let alone one eyed unicorn in sight.
It has been running for less than 24 hours, and long running may yet turn out to be something needs managed eg check once a minute if process is running, restart if it isn't, but here's a chart of some of the data:
The Midea data is ugly, those nasty spikes caused by the fact it only uses integer values for the data. Let's get rid of them:
The COP is suspiciously high, I suspect because it is based on compressor current draw rather than total heat pump draw. Fortunately I have a simple way of checking that, and adding a correction factor as necessary, the external third party kWh meter that supplies only the heat pump.
Edit: should have said, calculated done using the standard formulas, kWh in = amps x volts x time x 1000 and kWh out = flow rate x (LWT - RWT) x specific heat of fluid (I used 4.05 as I have I think about 10% glycol).
@redzer_irl how does your home assistant script successfully write to the heat pump to tell it what to do? what's in the script ? not the user facing or logic bits, I mean the output side, the bit that actually "does something"? could you possibly publish your code?
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.