Joining the Renewable Heating Hub forums is completely free and only takes a minute. By registering you’ll be able to ask questions, join discussions, follow topics you’re interested in, bookmark useful threads and receive notifications when someone replies. Non-registered members also do not have access to our AI features. When choosing your username, please note that it cannot be changed later, so we recommend avoiding brand or product names. Before registering, please take a moment to read the Forum Rules & Terms of Use so we can keep the community helpful, respectful and informative for everyone. Thanks for joining!
@cathoderay that maybe the case, although in my case its all physically connected to an ESP right now so it'd be a rewiring job to move it into the HA machine to be able to use anything like that python. but lets not get hung up on the how of what flavour of coding gets used to get there 🙂 . I don't have the skills to write C++ lambdas , not a hope in hell - I wasn't suggesting that I'd write one - just musing that that might be the way out of that particular branch of the modbus cave...
there's different things going on here that don't add up: TomC has stated (I think) that he is able to change LWT but we don't have the detail of how. GlynHudson's github code says that changes to LWT using instrument.writeregister (same as yours) don't work. Derek thinks that target LWT isn't a writable parameter. some debate as to what mode the ASHP needs to be in to allow modbus to take control. too many unknowns at the moment.
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
Posted by: @cathoderayComplexity, dear boy, complexity! You'll be dancing with the three legged one eyed unicorn before you know it! Basic python plus minimalmodbus can do it far more simply:
minimalmodbus requires full-fat Python, ESP can only run MicroPython. This snippet you've added doesn't touch Home Assistant so isn't a fair comparison with regards to complexity.
Posted by: @iancalderbankif you've used the number method to successfully change the DHW temp, that proves that write does work for a number method from an esp
ESPHome can absolutely perform modbus writes, I expect the part in the modbus controller docs needs an update. The modbus number controller docs states the following (and is proven to work):
When the Number is updated a modbus write command is created sent to the device.
Posted by: @stevenESPHome can absolutely perform modbus writes, I expect the part in the modbus controller docs needs an update. The modbus number controller docs states the following (and is proven to work):
When the Number is updated a modbus write command is created sent to the device.
thanks and sorry if any offence given. I honestly thought that your original suggestion to try an ESP "number" was on the basis of "I think this might work, why not give it a go" rather than "I've used these before, I know how these things work".
I think the clue I need is from @tomc, what needs to be written to effect a change in LWT in his setup.
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
Posted by: @iancalderbank@cathoderay that maybe the case, although in my case its all physically connected to an ESP right now so it'd be a rewiring job to move it into the HA machine to be able to use anything like that python. but lets not get hung up on the how of what flavour of coding gets used to get there 🙂 . I don't have the skills to write C++ lambdas , not a hope in hell - I wasn't suggesting that I'd write one - just musing that that might be the way out of that particular branch of the modbus cave...
there's different things going on here that don't add up: TomC has stated (I think) that he is able to change LWT but we don't have the detail of how. GlynHudson's github code says that changes to LWT using instrument.writeregister (same as yours) don't work. Derek thinks that target LWT isn't a writable parameter. some debate as to what mode the ASHP needs to be in to allow modbus to take control. too many unknowns at the moment.
Having given more thought as to what may be happening inside a heat pump controller, the following may be possible.
When operating in WC mode, the target LWT is calculated by the processor, based upon the outside temperature and the slope of the WC curve. The result of this calculation is being written repeatedly into the specified address register, so therefore cannot be changed from an external signal. CR's method of changing the WC slope may possibly work.
When operating in fixed LWT mode, the LWT can be changed via the HMI, so it would appear that the WC mode calculation is no longer being written to the specified address. It may therefore be possible to write to this address (68) to change the target LWT. If that does not work then look for the address that is changed by the HMI when the fixed LWT value is changed.
Posted by: @derek-mTo help make the setback and boost possibly more efficient, you could ramp up the temperature over several hours.
Once I've got the read side of things sorted, I will start experimenting with set back and boost, but it may have to wait until next autumn/winter, as the weather is becoming increasingly milder now.
Posted by: @iancalderbankI don't have the skills to write C++ lambdas , not a hope in hell - I wasn't suggesting that I'd write one - just musing that that might be the way out of that particular branch of the modbus cave...
there's different things going on here that don't add up
This is absolutely typical of HA hell. It's forum is chock a block with things that don't add up, incoherent and unexplained claims and more than enough illiteracy to make George Orwell explode.
This is why I am making the case for basic python. If you've got modbus over RS-485, you only need one very simple bi-directional RS-485/USB converter, plug it in to something that can run python, and write simple easy to construct code that makes sense. I'm just underlining @derek-m's pro-KISS approach.
Posted by: @stevenminimalmodbus requires full-fat Python, ESP can only run MicroPython. This snippet you've added doesn't touch Home Assistant so isn't a fair comparison with regards to complexity.
Not sure about full fat python. Can you also get semi-skimmed python? Perhaps Waitrose or M&S sell it, alongside the ostrich steaks.
My snippet isn't meant to touch HA, it's meant to avoid it, and demonstrate that code doesn't have to be complex. I think the comparison achieves that. The code is concise and easily understood, ie near perfect programming, compared HA coding, which is coding hell, overlong, packed with ludicrous complexity and often totally unreadable let alone maintainable. Numerous posts both here and and on HA's own forum amply establish that.
Midea 14kW (for now...) ASHP heating both building and DHW
@derek-m thats exactly what I did. I knew that having the WC (WL as samsung calls it) running would be constantly overwriting any LWT that I might try to set. So I put the system into fixed LWT mode using the HMI. I changed the target LWT using the HMI. I observed that register 68 "target LWT" changed (reading that register over modbus using HA via an ESP) to match that value. And, that this (eventually, once the system had run a bit) had the expected effect on actual LWT.
I then try to write to that register using modbus. thats the bit that fails. it always goes immediately back to the value set on the HMI.
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
Posted by: @iancalderbank@derek-m thats exactly what I did. I knew that having the WC (WL as samsung calls it) running would be constantly overwriting any LWT that I might try to set. So I put the system into fixed LWT mode using the HMI. I changed the target LWT using the HMI. I observed that register 68 "target LWT" changed (reading that register over modbus using HA via an ESP) to match that value. And, that this (eventually, once the system had run a bit) had the expected effect on actual LWT.
I then try to write to that register using modbus. thats the bit that fails. it always goes immediately back to the value set on the HMI.
I suspect that address 68 is just an 'output' and is being updated by the processor, either from the WC calculation, or directly from the HMI.
You need to discover which 'set LWT' 'input' is being changed by the HMI, which in turns causes address 68 to be changed.
Posted by: @stevenDid you try it with something simple like DWH temperature first? I just added the code I pasted the other day and it changed the DWH temperature successfully.
If that works for you, then perhaps it's to do with the pump controller configuration rejecting the LWT change. I've got it set up for weather comp / water law so it doesn't let me change LWT (reg 68). I don't have time at the moment to go and change the controller settings, but I might be able to later on.
I've enabled DHW and tried the same test, it fails for me:
[13:41:03][D][number:012]: 'DHW Target Temperature': Sending state 50.000000 << value on Wired controller [13:41:03][D][modbus_controller.sensor:025]: Sensor new state: 704.00 [13:41:03][D][sensor:126]: 'DHW Temperature': Sending state 70.40000 ºC with 1 decimals of accuracy [13:41:03][D][modbus_controller.sensor:025]: Sensor new state: 0.00 [13:41:03][D][sensor:126]: 'Flow Rate': Sending state 0.00000 lpm with 1 decimals of accuracy [13:41:10][D][number:054]: 'DHW Target Temperature' - Setting number value [13:41:10][D][number:113]: New number value: 49.000000 <<< I Change it in HA [13:41:10][D][modbus.number:059]: Updating register: connected Sensor=DHW Target Temperature start address=0x48 register count=1 new value=49.00 (val=490.00) [13:41:10][D][number:012]: 'DHW Target Temperature': Sending state 49.000000 [13:41:10][D][number:012]: 'DHW Target Temperature': Sending state 49.000000 [13:41:12][D][modbus_controller.sensor:025]: Sensor new state: 0.00 [13:41:12][D][sensor:126]: 'Compressor Frequency': Sending state 0.00000 Hz with 0 decimals of accuracy [13:41:12][D][modbus_controller.sensor:025]: Sensor new state: 147.00 [13:41:12][D][sensor:126]: 'Outdoor Temperature': Sending state 14.70000 ºC with 1 decimals of accuracy [13:41:12][D][modbus.number:023]: Number new state : 16.00 [13:41:12][D][number:012]: 'Target Indoor Temperature': Sending state 16.000000 [13:41:12][D][modbus_controller.sensor:025]: Sensor new state: 223.00 [13:41:12][D][sensor:126]: 'Return Temperature': Sending state 22.30000 ºC with 1 decimals of accuracy [13:41:12][D][modbus_controller.sensor:025]: Sensor new state: 231.00 [13:41:12][D][sensor:126]: 'Flow Temperature': Sending state 23.10000 ºC with 1 decimals of accuracy [13:41:13][D][modbus.number:023]: Number new state : 26.00 [13:41:13][D][number:012]: 'Target Flow Temperature': Sending state 26.000000 [13:41:13][D][modbus_controller.sensor:025]: Sensor new state: 0.00 [13:41:13][D][sensor:126]: 'DHW Status': Sending state 0.00000 with 0 decimals of accuracy [13:41:13][D][modbus_controller.sensor:025]: Sensor new state: 0.00 [13:41:13][D][sensor:126]: 'DHW Mode': Sending state 0.00000 with 0 decimals of accuracy [13:41:13][D][modbus.number:023]: Number new state : 50.00 << it resets back [13:41:13][D][number:012]: 'DHW Target Temperature': Sending state 50.000000 [13:41:13][D][modbus_controller.sensor:025]: Sensor new state: 704.00
my ESP config:
number:
- platform: modbus_controller
modbus_controller_id: ashp_modbus
name: "DHW Target Temperature"
id: dhw_target_temperature
register_type: holding
address: 74
unit_of_measurement: "ºC"
device_class: "temperature"
value_type: U_WORD
lambda: "return x * 0.1; "
write_lambda: "return x * 10.0; "
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
I would suggest that you check the following:-
'Restrictions on the remote control' in address 64. If it is set to anything other than 0x0000: No Restriction, then this may be prevent you from writing to the memory locations.
I would also suggest that you perform a 'read' of all address register from 1 to 100, noting the value found in each. The values can then be compared with the Modbus map, to ascertain how your system has been set up.
Reading addresses in, or not in, the present list should not have any detrimental affect.
@derek-m give me a min I was just typing the answer.... I did need to do some actual paid work this afternoon!
'Restrictions on the remote control" 64, is reading zero. 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) , using steven's code, and I am getting the expected value from all of them - the installer of the HP system is me so I know what the expected values are. you can see a snapshot of them in previous messages.
I'm just testing the most basic and of R/W attributes, which ought not to have any automated control loops competing with me to change its value. an on/off switch for "quiet mode" at register 78. that refuses to stay in the state I ask it to as well 🙁
[17:19:55][D][switch:013]: 'Quiet Status' Turning ON. << I TURN IT ON MANUALLY [17:19:55][D][switch:056]: 'Quiet Status': Sending state ON [17:19:56][D][modbus_controller.sensor:025]: Sensor new state: 0.00 [17:19:56][D][sensor:126]: 'Compressor Frequency': Sending state 0.00000 Hz with 0 decimals of accuracy [17:19:56][D][modbus_controller.sensor:025]: Sensor new state: 96.00 [17:19:56][D][sensor:126]: 'Outdoor Temperature': Sending state 9.60000 ºC with 1 decimals of accuracy [17:19:56][D][modbus.number:023]: Number new state : 16.00 [17:19:56][D][number:012]: 'Target Indoor Temperature': Sending state 16.000000 [17:19:56][D][modbus_controller.sensor:025]: Sensor new state: 0.00 [17:19:56][D][sensor:126]: 'Restrictions': Sending state 0.00000 with 0 decimals of accuracy [17:19:56][D][modbus_controller.sensor:025]: Sensor new state: 156.00 [17:19:56][D][sensor:126]: 'Return Temperature': Sending state 15.60000 ºC with 1 decimals of accuracy [17:19:56][D][modbus_controller.sensor:025]: Sensor new state: 166.00 [17:19:56][D][sensor:126]: 'Flow Temperature': Sending state 16.60000 ºC with 1 decimals of accuracy [17:19:56][D][modbus.number:023]: Number new state : 26.00 [17:19:56][D][number:012]: 'Target Flow Temperature': Sending state 26.000000 [17:19:57][D][modbus_controller.sensor:025]: Sensor new state: 0.00 [17:19:57][D][sensor:126]: 'DHW Status': Sending state 0.00000 with 0 decimals of accuracy [17:19:57][D][modbus_controller.sensor:025]: Sensor new state: 0.00 [17:19:57][D][sensor:126]: 'DHW Mode': Sending state 0.00000 with 0 decimals of accuracy [17:19:57][D][modbus.number:023]: Number new state : 50.00 [17:19:57][D][number:012]: 'DHW Target Temperature': Sending state 50.000000 [17:19:57][D][modbus_controller.sensor:025]: Sensor new state: 704.00 [17:19:57][D][sensor:126]: 'DHW Temperature': Sending state 70.40000 ºC with 1 decimals of accuracy [17:19:57][D][switch:056]: 'Quiet Status': Sending state OFF << TURNS ITSELF OFF [17:19:57][D][modbus_controller.sensor:025]: Sensor new state: 0.00 [17:19:57][D][sensor:126]: 'Flow Rate': Sending state 0.00000 lpm with 1 decimals of accuracy
is there a possible cause of all this that the modbus Write commands that I think I am sending to the ASHP are not actually getting there? I know the device whose job it is to construct and send them is doing something (that is the log above) but I mean actually onto the wire , received and succefully dealt with by the receiving end. The only successful data that I have is from ASHP to my device. Zero in the other direction. Can modbus have working comms one way but not the other? I know data comms protocols extremely well (my job) but never touched modbus before last week.
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,618 Topics
- 61.1 K Posts
- 645 Online
- 6,994 Members
Join Us!
Worth Watching
Latest Posts
-
RE: Renewables & Heat Pumps in the News
An article on funding for heat pumps in case anyone is ...
By Jeff , 35 minutes ago
-
RE: Indevolt Batteries UK Support & Info Thread
Thanks @editor , @indevolt-uk Subject to any comments ...
By JamesPa , 8 hours ago
-
RE: Share Your Experiences with Heat Pump Manufacturer Support
@seoras Sorry to hear that. I found Vaillant very help...
By JamesPa , 9 hours ago
-
The Watchdog That Watched and Waited
On 9 January 2026, Consumer Energy Solutions collapsed ...
By Mars , 13 hours ago
-
RE: GSHP Kaput After 16 Years: New Compressor or Switch to ASHP? Advice Welcome
Cool Energy in Grimsby sell ground source heat pumps an...
By DerekDeLeon , 13 hours ago
-
RE: Valliant Heat Pump Settings
Thats arguably a sign of a good installer - they unders...
By JamesPa , 14 hours ago
-
RE: Electricity price predictions
Well, we have so many cases where rain water mixes with...
By Batpred , 15 hours ago
-
RE: Two heating zones to one zone
@profzarkov They arent obviously wrong, but the only...
By JamesPa , 17 hours ago
-
RE: Towns water feed to air source heat pump system
The DHW circuit cant be separated (well it could, you c...
By JamesPa , 17 hours ago
-
Solis AC-coupled 3kW storage inverter
Solis AC-coupled 3kW storage inverterPylontech batterie...
By MartinRobinson , 23 hours ago
-
RE: My NIBE ASHP Nightmare: No Commissioning, High Bills and a Hostile Installer
As @transparent has observed above, this is not bad, an...
By cathodeRay , 1 day ago
-
RE: The Grid Says Yes.. Until It Doesn’t: Why Britain's Net Zero Push is Stalling at the Plug Socket
As I was reading this article Mars, I was thinking that...
By Toodles , 2 days ago
-
RE: Tell us about your Solar (PV) setup
Installed in May 2011: 16*Sharp 245 W monocrystalline p...
By txmartyn , 2 days ago
-
-
RE: Say hello and introduce yourself
That doesn't sound 'right' to me. The national Smart ...
By Transparent , 3 days ago
-
RE: Growatt battery disconnected
I doubt this will happen, but I will try and suggest it...
By Eliuccio , 3 days ago
-
Understood. That's why I decided from the outset on a ...
By JamesPa , 3 days ago
-
RE: My experience with 3 heat pump surveys: Heat Geek, British Gas & Octopus
On the litigation, I would not go there and definitely ...
By Batpred , 3 days ago
-
RE: Recommended home battery inverters + regulatory matters - help requested
I suppose if your pv inverter packs up, you have a plan...
By Batpred , 4 days ago
-
RE: New Vaillant aroTherm Plus in black - When will it come to the UK?
Firstly check you are using sound power not sound press...
By JamesPa , 4 days ago
-
That’s the solar up and running, I don’t think it’s the...
By David999 , 4 days ago
-
RE: Seeking ideas / information / commiseration - Pure Drive
I agree with @colinc that you can reuse some of it. A s...
By Batpred , 4 days ago
-
RE: Solar Power Output – Let’s Compare Generation Figures
@toodles Im trying me best to ignore orangeman, I figur...
By Papahuhu , 5 days ago



