Discussions about Nibe S-series and the integration

Hi @wijsman and @alfabetagama

Thanks for your example config regarding the COP calculations. I have modified your code slightly to fit my S1155 unit. The utility meters are working fine (contains data). However the COP calulations are «unavailable».

Here´s my code in configuration.yaml (I´m quite new to this so the error might be obvious, sorry😜):

modbus:
  - name: "NibeS1155"
    type: tcp
    host: 192.168.1.104
    port: 502
    sensors:
      - name: "S1155 External Supply Temp BT25"
        unique_id: "nibe_s1155_ext_supply_temp_bt25"
        data_type: int16 # int8
        address: 39
        input_type: input # R/W
        scale: 0.1
        precision: 1
        state_class: measurement
        device_class: temperature
        unit_of_measurement: "C"
        slave: 1
        scan_interval: 30
      - name: "IN - Nibe S1155 used energy floorheat last hour"
        unique_id: "nibe_s1155_in_energy_heating"
        data_type: int16 # int8
        address: 2291
        input_type: input # R/W
        scale: 0.01
        precision: 2
        state_class: measurement
        unit_of_measurement: "kWh"
        slave: 1
        scan_interval: 900
      - name: "OUT - Nibe S1155 produced energy floorheat last hour"
        unique_id: "nibe_s1155_out_energy_heating"
        data_type: int16 # int8
        address: 2283
        input_type: input # R/W
        scale: 0.01
        precision: 2
        state_class: measurement
        unit_of_measurement: "kWh"
        slave: 1
        scan_interval: 900
      - name: "IN - Nibe S1155 used energy hot water last hour"
        unique_id: "nibe_s1155_in_energy_hot_water"
        data_type: int16 # int8
        address: 2293
        input_type: input # R/W
        scale: 0.01
        precision: 2
        state_class: measurement
        unit_of_measurement: "kWh"
        slave: 1
        scan_interval: 900
      - name: "OUT - Nibe S1155 produced energy hot water last hour"
        unique_id: "nibe_s1155_out_energy_hot_water"
        data_type: int16 # int8
        address: 2285
        input_type: input # R/W
        scale: 0.01
        precision: 2
        state_class: measurement
        unit_of_measurement: "kWh"
        slave: 1
        scan_interval: 900

template:
  - sensor:
      - name: "Nibe S1155 COP Total"
        unique_id: "nibe_s1155_cop_energy"
        unit_of_measurement: ""
        state: >
          {% set nibe_s1155_out_energy_cop = states('sensor.nibe_s1155_out_energy_heating') | float + states('sensor.nibe_s1155_out_energy_hot_water') | float %}
          {% set nibe_s1155_in_energy_cop = states('sensor.nibe_s1155_in_energy_heating') | float + states('sensor.nibe_s1155_in_energy_hot_water') | float %}

          {{ (nibe_s1155_out_energy_cop / nibe_s1155_in_energy_cop) | float | round(2) }}

  - sensor:
      - name: "Nibe S1155 COP Heating"
        unique_id: "nibe_s1155_cop_energy_heating"
        unit_of_measurement: ""
        state: >
          {% set nibe_s1155_out_heating = states('sensor.nibe_s1155_out_energy_heating') | float %}
          {% set nibe_s1155_in_heating = states('sensor.nibe_s1155_in_energy_heating') | float %}

          {{ (nibe_s1155_out_heating / nibe_s1155_in_heating) | float | round(2) }}
  - sensor:
      - name: "Nibe S1155 COP Hot water"
        unique_id: "nibe_s1155_cop_energy_hot_water"
        unit_of_measurement: ""
        state: >
          {% set nibe_s1155_out_hot_water = states('sensor.nibe_s1155_out_energy_hot_water') | float %}
          {% set nibe_s1155_in_hot_water = states('sensor.nibe_s1155_in_energy_hot_water') | float %}

          {{ (nibe_s1155_out_hot_water / nibe_s1155_in_hot_water) | float | round(2) }}

1 Like

Following this thread with excitement. I would like to have this one also for my S1155. I got the same status “Unavailable”. My HA knowledge is just building up so trying to learn step by step.

The sensors names that are refered to in the template sensor are probably named differently.
In my environment the

name: “Nibe S1155 COP Total”
unique_id: “nibe_s1155_cop_energy”

will result in a sensor entity sensor.nibe.s1155_cop_total instead of sensor.nibe_s1155_cop_energy.
So it seems a derivative of ‘name’ is used instead of ‘unique_id’ . Just have a look at the entity names in Settings-> Devices to find the correct names.

Also if the heatpump did not produce any heat or hot water in that hour, the in_energy values will be 0. And it seems a division by zero results in an ‘unavailable’ value.

1 Like

Thanks @mirakels,

That solved the issue. Is there a way to solve the «unavailable» value when no hot water produced last hour? Maybe the last recorded cop calulation could be shown instead of just «unavailable».

It would be really nice if you could share the code for that card - looks like you´ve got the most important entities configured nicely. Thanks :smiley:

@Cregeland thanks! Not all perfect, but you can find the code I used and shared on this thread

https://community.home-assistant.io/t/how-do-i-config-modbus-tcp-for-nibe-s1255/353874/86

1 Like

I have successfully integrated my Nibe S735 with modbus over tcp integration.

With nibepi and my former Nibe F370 i could write to the registers through mqtt publish. I used it to take the average house temperature from all my sensors and populate the climate setpoint and controll my heating based on the house averege temperature. Is there a way to write to the indoor temperatures register? Thank for any help and directions i can get

Hi @mirakels , it seems an easy fix but I am overlooking something.

  1. I copied the example without change to my config (for a Nibe S1155)
  2. I got the same “unavailable” message for the cop settings

This is from my devices screen:

I try to make the adjustments however I don’t understand how to resolve it.
Can you please help me resolve the issue? I am new to programming HomeAssistant so still learning.

use
| float(0)
to set default to 0 if not available

Has anyone found a solution to display the NIBE with the complete power consumption in the Energy Dashboard? I have an S320 and I looked at the registers: https://www.waermepumpen-24.de/fileadmin/kaelteklima/Dokumente/Wärmepumpen/modbus-ih-s-serie-v-2335.pdf With the register ID and the following configuration, I only get a ‘not available’:

   - name: NibeS320
     type: tcp
     host: 192.168.125.20
     port: 1502
     sensors:
       - name: "nibe_energy-total"
         unit_of_measurement: W
         slave: 1
         address: 2166
         input_type: input
         data_type: int32
         precision: 1
         scale: 1

Thank you!

Just wondering if anyone has been able to change the time at which the heat pump does its weekly hot water run through modbus? I have a dynamically priced energy contract and I usually see the energy prices low at night in winter times and in the summer I would like to do this run when I have a surplus of PV, but can’t find the register to trigger the hot water run. Hoping you smart guys have found something…

I have a S1255 and wanted to link this with my inverter from Goodwe via Modbus TCP/IP to optimize heating when there is a surplus of solar energy. For some reason i cant get the connection between the inverter and the heathpump to work so i wondered if there is a possibility to do this through Home Assistant.
What i want to do is, when there is injection to the grid, put the heatcurve of the hot water and the floor heating one point higher (this is the thing nibe does with her modbus PV).

Thanks!

You can:

switch it on (switch.periodic_hot_water_40066)
set interval in days(number.periodic_hot_water_interval_40067)
set start time (number.start_time_periodic_hot_water_40068)

get date (sensor.date_periodic_hot_water_31562)

You can try to create automation to switch it on, set start time and interval (0? or 1) days and wait for it to kick in
And another automation to switch it off

Let us know how it goes if you try this…

1 Like

I am sure this is possible with automation. For nibe you can set heating curve and offset via modbus from HA

1 Like

Try looking at register 26 (heating curve) and 30 (offset curve), if you increase this during surplus PV this should speed up the heating. You can set this register between -5 and 5.

1 Like

Thanks, will try!

Do you have an overview of the different registers?

Check this directory: https://github.com/yozik04/nibe/tree/master/nibe/data . CSV files are raw exports from pumps.,/control modules. JSON files are used for nibe integration in haos. NIbe itself does not have good docs on modbus registers. I am using SMOS40 integration because S2125 is missing energy log registers for some reason. Here is my automation for setting Hot water demand to Medium at 22:00 in the evening. Ou can define any triggers you want.

Thank you! Can you send me the yaml-code of the automation?
Can make the necessary adaptations then.

I have been struggling with the same (COP calculations). One solution can be to use the statistics integration (link). I have defined averages (using time weighted values via ‘average_linear’) for 24 hours and 7 days but you can extend this to other periods of course.

One problem could be how periods without heat production are handled. COP is ‘undefined’ during these periods but I’m not sure how this influences the statistics in Home Assistant.

I would also welcome other solutions to actually use the energy used to produce the ‘heat’. Cumulative ‘heat’ produced is available via sensors heating_compressor_only_31586 and heating_including_int_add_heat_31578 in the Nibe integration.