How do I config modbus tcp for Nibe S1255?

Cool, that is exactly the same I‘m trying to achieve with my S320 and PV.
I wasn‘t aware that you can control power limits with the S320, how are you doing that? Habe you installed the power metering clamps and read it via BE1/BE2/BE3?

Would be awesome if you could share your nibe config and the PV automation yaml :slight_smile:

1 Like

I am trying to use the switch in my Nibe S1155 which has the same holding register, but it does not seem to react to the modbus write. Did you get the integer value for the on from the export in the pump? I do not see in my export row in the csv which value I should use.
Thanks!

Yes, you can control the limit by using call service modbus.write_register and write to address 102 with these values:
0 - 0 kw, as in off.
200 - 2 kw
300 - 3 kw

700 - 7 kw
900 - 9 kw

There is no option for 8 kw.
You can use the same address to read the current limit.

Here is a simple YAML config to get you started:

alias: Automation - Nibe Auto
description: ""
trigger:
  - platform: time_pattern
    seconds: /10
    id: Every 10 seconds
condition: []
action:
  - if:
      - condition: trigger
        id: Every 10 seconds
      - condition: numeric_state
        entity_id: sensor.solar_production
        above: 1000
        alias: Solar Panels producing more than 1 kW
      - condition: numeric_state
        entity_id: sensor.nibe_power_usage
        above: 1.5
        below: 3.5
        alias: Heater uses 2 kW
    then:
      - service: modbus.write_register
        data:
          address: 102
          slave: 1
          hub: Nibe
          value: 300
        alias: Raise Nibe power limit to 3 kW
        enabled: true
    alias: If Power production greater than power consumption - Raise power limit by 1 kW
  - if:
      - condition: trigger
        id: Every 10 seconds
      - condition: numeric_state
        entity_id: sensor.power_consumption
        above: 200
        alias: Power consumption greater than 200 W
      - condition: numeric_state
        entity_id: sensor.nibe_forbrukning
        above: 1.5
        below: 2.5
        alias: Heater uses 2 kW
    then:
      - service: modbus.write_register
        data:
          address: 102
          slave: 1
          hub: Nibe
          value: 0
        alias: Set Power Limit to 0 kW, ie. turn off heater
    alias: If power consumption greater than power production - lower Power Limit by 1 kW
mode: single

It depends on which function/address you’re trying to write to.
The modbus manual from Nibe (google it) sometimes gives you the available options for that specific address.

For those of you who read 2166 Instantaneous Power here. I see that you read it as int16. The databases have it as int32 with an odd unit of “Ws”. Could you guys verify the value you get from this perhaps against your whole household usage?

It could be that it should be int32 with a scaling factor of 100 and in kW. That would match how this field is set up on the F-series pumps.

Hi Marcel,

did you manage to achieve this?
I’m trying to do basically the same thing.
But when reading the flow meters, I only get bogus results. I’ve compared them to the ones shown in the device itself. And the ones in HA are nowhere near…

Kind regards,
Manuel

Hi birdman86, I just setup a S320 with F2125 and ran into a problem. Register 2166 as in document M12676EN does not give me a correct value, this should be the instantaneous power consumption but after 5 days of monitoring this appears constantly at 875w, this is quite strange. Did you also use the same registry?
Thank you

Hi @SteveOmero,
How did you implemented your S320 as the default integration (Nibe Heat Pump - Home Assistant) for S320 is not working on my end?
I am not getting any values.
Thanks for your feedback.

Hi T_A I have implemented a monitor through NODERED+Ignition as DB and Graphana to publish the result. I’m monitoring at the moment few data like BT1 BT2 BT3 GP1 and BT50 get from MODBUS
I’m looking for any other value. In the document M12676EN many registers don’t work with S320.

Hi, Is it simply stored in Watt seconds (Ws) ?

Can you tell me what entity is the compressor status… Mine is an SMO S40 but in the compressor status it just has values of 20 or 60

Not sure what you mean? I have an entity on my S1255 which is called compressor status and displays either a value of 1.0 for On or 0.0 for Off.

Hi all! I have a quite weird behavior that I’m not able to sort out in my Modbus connection to my S1155. I have solar panels with an EME20 and the instantaneous power is exported through coil 2178. If I use mbpoll I get the following value:

$mbpoll -a 1 -r 2178 -t3 -l 10000 192.168.1.34
[2178]: 212

which corresponds to 2.12 kW which is correct, but in my home assistant sensor, configured like this:

  • name: “Nibe_solcell_total_avg_power”
    unique_id: “nibe_solcell_tot_avg_power”
    data_type: uint32 # int8
    address: 2178
    input_type: input # R/W
    precision: 2
    state_class: measurement
    unit_of_measurement: “kW”
    scale: 0.01
    slave: 1
    scan_interval: 30

I get a completely different value of 135661.57 kW, which obviously is quite wrong… What am I doing wrong in the configuration of the sensor? Any hints?

The info in the Nibe manual for Modbus tends to be outdated, but an export of the modbus registrers shows the folllowing:
Title Register type Register Division factor Unit Size of variable Min value Max value Default value
Total average power (EME 20) MODBUS_INPUT_REGISTER 2178 100 kW 6 0 0 0
Total energy MODBUS_INPUT_REGISTER 2180 10 kWh 3 0 0 0

Note the different in the variable size between the register 2178 (size 6… bytes I assume?) and the register 2180 with size 3… I don’t get any wiser on how to map that variable size to the modbus data type…

Thanks!
/Nacho

Have you tried the built-in integration for nibe heatpumps? Maybe that gives correct values.

Yes, it does, but it is too heavyweight with thousand of options for my taste, that is why I was trying to replicate it directly in Modbus by using just the coils I’m interested in. I’m a bit baffled by the modbus registers export of my heatpump. According to the export the variable size is 6, which I’m not sure what it means and how to translate it to the data type. Anyone knows how to map the variable size to a data type? One of the two variables in the dump from the pump has a size of 6 and the other 3

Thanks!

Has anyone had broken entities after the HA Core update 2023.11.0?

Several of my entities broke but some I have fixed. The one i am having trouble with is number.hot_water_demand_mode_40057

It has been replaced by select.hot_water_demand_mode_40057 but when I activate that entity it kills all the others.

They have changed values too some of the entities.

Thanks for sharing the file. I would like to have the same dashboard!
I created a file nibe.yaml, copied and pasted your script lines into it and saved the file in the same folder as configuration.yaml.

I added the line nibe.yaml into the configuration.yaml:

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
nibe: !include nibe.yaml

However when restarting HomeAssistant. I get an error stating nibe.yaml not found.
Do you know what I am missing?

Just starting to learn integrations.

@ARTSRAY you cannot use nibe: to inlcude.

I am actually now using the the nibe integration. which works well with S1255.

You can find it here:

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

Caveat: The hot water mode selection is currently broken and is being worked on.

OK will use that one. Can you advise me how to enable the dashboard you shared within this thread? Still learning HA basic concepts.

Sure install the integration and getting it running.

The dashboard I am using looks like this and we can go through the steps to configure each section.

Section 1 are indicators:

image

Everything on there applies to your heat pump except for the circulation pump. Hot water demand is broken at the moment but they are working on fixing it.

Section 2 are controls:

image

Section 3 are also indicators for temperature and consumption:

image

image

1 Like