Samsung ASHP schedu...
 
Notifications
Clear all

Samsung ASHP scheduling help

232 Posts
24 Users
27 Reactions
37.2 K Views
(@iancalderbank)
Noble Member Contributor
3665 kWhs
Joined: 2 years ago
Posts: 643
 

@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


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

Posted by: @cathoderay

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

if 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.


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

Posted by: @steven

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.

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


   
👍
1
ReplyQuote



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

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.

 


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

Posted by: @derek-m

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

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

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

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.

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


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

@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


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

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.

 


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

Posted by: @steven

Did 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


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

@iancalderbank

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.


   
ReplyQuote



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

@iancalderbank

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.


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

@iancalderbank

So what did you find in address register 64?


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

@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


   
ReplyQuote
Page 8 / 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