Modbus configuration for NIBE S series heatpumps

Little update from my side:

So far I’m very satisfied with my HA Nibe integration. I do the follwing:

  • Automation to make warm water only during daytime (setting the hot water start temperature to lower values)
  • Switch off heating at nighttime
  • Control Hystereses/Degree Minutes

What I’m still missing:

  • Cant find the right register to read compressor start count
  • How can I influence which frequency the compressor will run in. I would prefer a lower setting an longer runtimes. I think it depends in the the actual demand…
2 Likes

Which register to you use to control the DM?

And are you able to set the target temp as well?

For me its register 11. But could be different for yours. You have to export the registers.

Which target temp do you mean? For heating it is calculated by the heat curve and offset. I can read and set those values too. For Hot water it is start and stop temperature.

You need to do some register digging and testing for that. I got the right registers by checking the UI of SMO 40s and searching the corresponding register value.

Still one issue. I cannot use the climate entity to configure the the degree minutes difference. It only accepts values above zero. Has anybody manged to create a slider to set modbus values?

Finally got that solved:

create a integration helper input_number.degreeminutes_start

initial: null
editable: true
min: -300
max: -60
step: 10
mode: slider
icon: mdi:bank-minus
friendly_name: Degree Minutes Start

Add that to the UI as a slider.

Create an automation like that:

alias: Set Gradminuten Differenz
description: ""
trigger:
  - platform: state
    entity_id:
      -input_number.degreeminutes_start
condition: []
action:
  - service: modbus.write_register
    data:
      address: 97
      slave: 1
      hub: Nibe
      value: "{{ 2**16 - (trigger.to_state.state | int| abs) }}"
mode: single
1 Like

What kind of integration helper did you use? I want to see if I can do this for the climate offset!

Integration → helper → number

1 Like

Its really a shame that something like that has to be sort of revers engineered. What does Variable Size field in the Modbus USB export csv file even mean?

It ranges form 1-6 I assumed that 6 is a int32 since it the field values should range from -2147483648 to 2147483647 but then I saw a field with 6 and range 0 to 9999999 very confusing.

Anybody?

How can you set offset value to negative? I can only send positive value. Could you share the code? I like to control my pump by electricity price and I think change the offset is way to do that.

- name: Nibe
  type: tcp
  host:  # put in your server ip address here
  port: 502
  climates:
    - name: "Offset"
      address: 30
      input_type: holding
      count: 1
      data_type: int16
      max_temp: 20
      min_temp: 0
      offset: 0
      precision: 1
      scale: 1
      target_temp_register: 30
      temp_step: 1

I can only adjust positive offset with that not negative.

that is true. If you need negative offset then use the solution above for degree minutes (including the helper)

Now I figured it out. Whit this I can set offset value to -1.

2 Likes

@reusje have you been able to get the energy data from the pump? I get all of the rest parameters, but as soon as I try the energy it fails.

Hey Jusba, what pump do you have?

How are you connecting to HA?

I have Nibe S1255 connected wirelessly via modbus.

How did you connect it and what can you control?

Here is Nibe modbus list that show what you can control and what only read. https://www.nibe.eu/download/18.3db69dc1795e0d992c5722/1622634529178/Modbus%20S-series%20EN%20M12676EN-1.pdf
You can send command using Service Modbus: Write register

Thanks, that I have and posted on this thread a while ago.

For me it was about writing to the registers that’s a challenge. For example, how did you if you did write to the offset which is a slider from -10 to +10?

I don’t use slider, I use direct command like this. This change offset to +2.