How do I config modbus tcp for Nibe S1255?

Any luck? Did you manage to get it setup?

Hello, I am from iobroker and I am trying to integrate my Nibe S1155 in HA.
Reading registers works so far, but how do I describe registers?
I thought about so “input_number” for the registers
59 Hotwater start
63 Hotwater stop
but this does not work.

I would also like to be able to set the heating displacement via slider, but I am not sure how to configure this.

Welcome to the club Chris!

Are you connecting through modbus tcp? If so look the example a few posts up on how to create the on/off for the “more hot water” function. Essentially it’s an on off switch.

I am trying to figure out how to create a switch with multiple states for example heat pump operating mode which consists of Auto, manual, additional heating.

Still haven’t figured it out yet.

The only way i found is like this, but it is not sync.

input_number:
  heizkurve:
    name: Heizkurve Verschiebung
    initial: 0
    min: -4
    max: 4
    step: 1
automation:
- alias: SET Heizkurve Verschiebung
  trigger:
    platform: state
    entity_id: input_number.heizkurve
  action:
  - service: modbus.write_register
    data:
      hub: nibe
      unit: 1
      address: 30
      #value: '{{ (states.input_number.heizkurve.state | int)+65024 }}'
      value: '{{ (states.input_number.heizkurve.state | int) }}'

Have you checked the heat pump if it really reacts to the command?
I’ve tried it but my pump doesn’t turn on more hot water, but it looks like it’s turn on in HA.

yes, but only positiv value, negativ are not allowed.

I have the same issue - somehow negative values are not allowed and produce an error of the automation:

Setting >=0 values works.

@ple I´ve managed to get an updated helper with the following automation:

alias: Nibe-Offset-Read-Value-Set-Helper
description: >-
  Reads the sensor value of Nibe Offset curve and writes it to the helper to
  update the latest status
trigger:
  - platform: state
    entity_id:
      - sensor.heatpump_heating_curve_offset
condition: []
action:
  - service: input_number.set_value
    data:
      value: "{{ states('sensor.heatpump_heating_curve_offset') | int  }}"
    target:
      entity_id: input_number.nibe_offset_input
mode: single

On my S1125 it does!

Have you guys seen this???

This is a new integration with the latest core update.

Supported devices:

  • F1145
  • F1155
  • F1245
  • F1255
  • F1345
  • F1355
  • F370
  • F470
  • F730
  • F750
  • SMO20
  • SMO40
  • VVM225
  • VVM310
  • VVM320
  • VVM325
  • VVM500

Sadly no S series!!! :cry:

Have you tried this?

https://www.home-assistant.io/integrations/input_number/

You can configure a negative value

Yep, I´m using the input_number helper value. The value itself can also be set to negative values, only if I´m trying to use it as part of the automation to use the modbus.write_register service, I´m getting the error that it must be at least 0

here´s my automation:

alias: Nibe-Offset-Set-InputHelper
description: Automation writes to Nibe Modbus with input of helper value
trigger:
  - platform: state
    entity_id: input_number.nibe_offset_input
condition: []
action:
  - service: modbus.write_register
    data:
      address: 30
      slave: 1
      hub: Nibe
      value: "{{ states('input_number.nibe_offset_input') | int  }}"
mode: single

and the input value settings

Ok but you are way ahead of me! The only thing I was able to do with the help of other is additional hot water switch. What model heat pump do you have? What have you managed to control?

I have the VVM S320. So far I was able to read a few things like priority state, various temperatures, rpm of the compressor fan and so on. From this thread managed to set the hot water demand and now I‘m trying to manipulate the heatcurve offset - so far only successful with >=0 values :slight_smile:

1 Like

Once you have the Nibe modbus integration setup, you can use call service “Modbus: Write coil” and just enter address, state, slave and hub name and you’re set.
Example to create a switch to turn on/off “More Hot Water”:

      - name: nibe_morehotwater
        write_type: holding
        address: 697
        slave: 1
        command_on: 2
        command_off: 0

You can use the same principle for many others functions, such as offset.

I control the pump with the above switch for the hot water and for heating, I’ve created an input select list to control the heater power limit with an automation, using the call service mentioned above.

I’ve even managed to automate this with our solar panels, with triggers, that if solar production > 1kw, increase heater power limit by 1kw.
If buying > 1kw from grid, decrease heater power limit by 1kw.
Basically minimizing consumption from the heater when in “buying” mode and maximizing when we have more energy being produced from the solar panels.

To save energy from when the heater isn’t needed, I can just turn the heating function off completely by setting the power limit to 0kw.

3 Likes

Birdman86, this is cool but can you share examples of your switches code? I have the more hot water one, but other like offset etc?

Also which model heat pump do you have?

The code for the switches are simple and identical, except of course for the addresses and the on/off commands.
I deleted all my switches as I figured that I no longer need them for my setup.
I have the S320 modell.

Are you connecting via modbus tcp? Does your system use the Nibe uplink or myUplink service?

Connecting through Modbus TCP.
Not sure how it is connected to the Uplink service, or if you’d require a Premium account to use the modbus function but I have an active myUplink service subscription since I have an S-series heater/pump, the S320.

Again, the switch code is the same. You just need to figure out the address for the correct function and also the command for each function.
Those are all in the Nibe Modbus manual, or alternatively if you have a S-series model, you can just plug in a USB stick and dump all the available commands on it and find out which ones you need.

Yes we are trying to figure all that out in another discussion. Elupus the author of the current Nibe integration is trying to incorporate all that. I have sent over all the registers.

Maybe if you have any information to contribute that would be great.

Checkout the thread here.

https://community.home-assistant.io/t/how-to-connect-to-nibe-heat-pump-without-the-cloud/381099/49

It seems the modbus.write_register service wont allow negative numbers, but we can write a positive number that when interpreted as a signed 16-bit integer it turns into the negative number we want. So for -1 you would write 65535, -2 is 65534 and so forth.

I tested this just now on my VVM S320, setting register 30 (i.e. heating curve offset). Verified both by reading it back in home assistant and using the MyUplink app. You can use 2’s compliment to turn e.g. negative slider values into the correct value to write. I’m new to everything HA and it’s the middle of the night so that will be a task for another day. I’ll post the configuration then, unless somebody beats me to it.

Edit: Ehm actually just add 65536 to the number, if it’s negative

2 Likes