hass_nibe icon indicating copy to clipboard operation
hass_nibe copied to clipboard

NIBE myUplink API

Open JoJa1101 opened this issue 3 years ago • 27 comments

Hello,

I have the NIBE VVM S320 and F-2120 Heatpump. It uses the new API service (https://dev.myuplink.com).

Is it possible to integrate my system with into HASS also?

Thanks in advance

JoJa1101 avatar Dec 22 '20 21:12 JoJa1101

Probably. But not with my plugin. Since I don't have such system i won't write that.

elupus avatar Dec 23 '20 06:12 elupus

Hello, Some news regarding MyUplink :)

I have started to create a new module for MyUplink and I have implemented the most of the myUplink Public API v2. A lot has changed but I can reuse a lot of code from the existing NIBEUPLINK-module created by ELUPUS, but I guess that the HASS integration also needs some rewritting.

andjom avatar Dec 31 '20 10:12 andjom

@andjom How have you got along with the MyUplink module?

timpea avatar Feb 01 '21 16:02 timpea

@andjom Just got a S1255 installed with the new MyUplink API. Pls let me know if you need any test/debug help with the implementation!

psysi avatar Feb 10 '21 11:02 psysi

@andjom I have S1255 and would love to have it added to HA so let me know if you need help with testing.

viippu avatar Feb 20 '21 20:02 viippu

@andjom @psysi @viippu i have had a bit of luck connecting directly via modbus tcp. just struggling with getting the register id’s for the different sensors. Let me know if you want the config settings I have used up to now. Probably should start a new repository so we can figure it out.

timpea avatar Feb 20 '21 21:02 timpea

Oh the new ones expose modbus over tcp?!? That would have been awesome.

elupus avatar Feb 20 '21 21:02 elupus

Hello, i have a CTC GSI 608 that uses the MyUplink and i am very interested in getting it into homeassistant.

msex67 avatar Jun 08 '21 05:06 msex67

Easiest way would be to enable the modbus TCP/IP from the settings of your heatpump and then add following to the configuration.yaml with your own settings. Homeassistant supports modbus from the scratch and more info can be found from https://www.home-assistant.io/integrations/modbus/

modbus:

  • name: CTC type: tcp host: your_heat_pump_ip_address port: 502 sensors:
    • name: Temperature_sensor unit_of_measurement: °C slave: 1 scale: 0.1 address: 1 scan_interval: 60 input_type: input

viippu avatar Jun 08 '21 06:06 viippu

I guess that in a soon future nibeuplink.com will be shut and connected units will be moved to myuplink (you can manuall change to f series in myuplink but not yet connect any units to it. myuplink can handle all connected manufactures in the nibe organisation like ctc, alpha innotec etc..

rickardnr1 avatar Nov 20 '21 09:11 rickardnr1

Hello, Some news regarding MyUplink :)

I have started to create a new module for MyUplink and I have implemented the most of the myUplink Public API v2. A lot has changed but I can reuse a lot of code from the existing NIBEUPLINK-module created by ELUPUS, but I guess that the HASS integration also needs some rewritting.

Did you work it out with success?

rickardnr1 avatar Nov 20 '21 09:11 rickardnr1

Hello, no i havent been able to connect to the modbus interface. Not realy shure why it not working. Nice to follow this.

regards /Micke

msex67 avatar Nov 21 '21 19:11 msex67

Hi! I want to follow the modbus path as well, but so far I'm not able to connect the my S1155. I think I have enabled Modbus in the pump via the installer menu but I do not see any configuration parameters while enabling ModBus and a port scan in the pump gives no access. Anyone giving a quick update on how to enable ModBus/TCP on the pump itself? Thanks!

NachoMas avatar Nov 25 '21 09:11 NachoMas

Hi! I want to follow the modbus path as well, but so far I'm not able to connect the my S1155. I think I have enabled Modbus in the pump via the installer menu but I do not see any configuration parameters while enabling ModBus and a port scan in the pump gives no access. Anyone giving a quick update on how to enable ModBus/TCP on the pump itself? Thanks!

Just enable it in the menu and its on. port 502 and you can find registers on nibes supportpage. also check that you have latest firmware and it works fast and stable.

rickardnr1 avatar Nov 25 '21 20:11 rickardnr1

Modbus list from CTC support. BMS_List_2021-11-08.pdf I have tried to connect, but cant get any information back.

/Micke

msex67 avatar Nov 29 '21 13:11 msex67

Modbus list from CTC support. BMS_List_2021-11-08.pdf I have tried to connect, but cant get any information back.

/Micke

cant answer for ctc as i cant try it myself. i can only test on nibe s series as i have an demo unit to try on ;)

rickardnr1 avatar Nov 30 '21 19:11 rickardnr1

I have a s1255 that I've connected to Home assistant through Modbus. Many of the functions available in MyUplink is present through Modbus but not all. Currently I'm mostly using "read input registers". Also depending on your accessories you'll have different Modbus functions available. A good reference (in Swedish) is https://proffs.nibe.se/upload/NEW/Support/Kommunikation/M12676SV.pdf

My current setup in configuration.yaml:

modbus:
  - type: tcp
    host:: 
    port: 502
    name: Nibe
    delay: 10
    #close_comm_on_error: true
    retry_on_empty: true
    retries: 3
    timeout: 14
    message_wait_milliseconds: 500
    sensors:
#
# Specifika register för Nibe S1155/S1255
#
      - name: "Nibe - Utetemperatur (BT1)"
        unique_id: Nibe.BT1
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 1
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Framledningstemperatur (BT2)"
        unique_id: Nibe.BT2
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 5
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Returledningstemperatur (BT3)"
        unique_id: Nibe.BT3
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 7
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Varmvatten topp (BT7)"
        unique_id: Nibe.BT7
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 8
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Varmvatten laddning (BT6)"
        unique_id: Nibe.BT6      
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 9
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Köldbärare in (BT10)"
        unique_id: Nibe.BT10      
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 10
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Köldbärare ut (BT11)"
        unique_id: Nibe.BT11      
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 11
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Kondensor fram (BT12)"
        unique_id: Nibe.BT12      
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 12
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Hetgas (BT14)"
        unique_id: Nibe.BT14      
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 13
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Vätskeledning (BT15)"
        unique_id: Nibe.BT5      
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 14
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Suggas (BT17)"
        unique_id: Nibe.BT17      
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 16
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
    #   - name: "Nibe - Rumstemperatur 1 (BT50)"
    #     unique_id: Nibe.BT50    
    #     unit_of_measurement: "°C"
    #     data_type: int16
    #     device_class: temperature
    #     address: 26
    #     input_type: input
    #     scale: 0.1
    #     precision: 1
    #     state_class: measurement
    #     slave: 1
    #- name: "Nibe - Extern Framledning (BT25)"
    #  unique_id: Nibe.BT25
    #  unit_of_measurement: "°C"
    #  data_type: int16
    #  device_class: temperature
    #  address: 39
    #  input_type: input
    #  scale: 0.1
    #  precision: 1
    #  state_class: measurement
    #  slave: 1
      - name: "Nibe - Kompressorgivare (EB100-BT29)"
        unique_id: Nibe.EB100-BT29      
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 86
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Driftläge köldbärarpump variant"
        unique_id: Nibe.adress.96      
        unit_of_measurement: "intermittent(10)/kontinuerlig(20)/10 dagar kont.(30)"
        data_type: int16
        address: 96
        input_type: input
        scale: 1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Värmebärarpumphastighet (GP1)"
        unique_id: Nibe.GP1      
        unit_of_measurement: "%"
        data_type: int16
        device_class: power_factor
        address: 1102
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Driftläge värmebärarpump"
        unique_id: Nibe.address.853      
        unit_of_measurement: "Manuellt"
        data_type: int16
        address: 853
        input_type: input
        scale: 1
        precision: 0
        state_class: measurement
        slave: 1
      - name: "Nibe - Värmebärarpumphastighet Manuell (GP1)"
        unique_id: Nibe.GP1.manual      
        unit_of_measurement: "%"
        data_type: int16
        device_class: power_factor
        address: 218
        input_type: input
        scale: 1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Aktuell kompressorfrekvens"
        unique_id: Nibe.address.1046      
        unit_of_measurement: "Hz"
        data_type: uint16
        device_class: frequency
        address: 1046
        input_type: input
        scale: 1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Kompressorstatus"
        unique_id: Nibe.address.1100      
        unit_of_measurement: "På"
        address: 1100
        data_type: uint16
        input_type: input
        scale: 1
        precision: 0
        state_class: measurement
        slave: 1
      - name: "Nibe - Köldbärarpumphastighet (GP2)"
        unique_id: Nibe.GP2      
        unit_of_measurement: "%"
        data_type: uint16
        device_class: power_factor
        address: 1104
        input_type: input
        scale: 1
        precision: 1
        state_class: measurement
        slave: 1
    #  - name: "Nibe - Driftläge köldbärarpump"
    #    unique_id: Nibe.address.1319      
    #    unit_of_measurement: "Manuellt"
    #    data_type: uint16
    #    address: 1319
    #    input_type: input
    #    scale: 1
    #    precision: 0
    #    state_class: measurement
    #    slave: 1
      - name: "Nibe - Köldbärarpumphastighet Manuell (GP2)"
        unique_id: Nibe.GP2.manual      
        unit_of_measurement: "%"
        data_type: uint16
        device_class: power_factor
        address: 222
        input_type: input
        scale: 1
        precision: 1
        state_class: measurement
        slave: 1
#
# Gemenssamma register alla Nibe-modeller
#
      - name: "Nibe - Flödesgivare (BF1)"
        unique_id: Nibe.BF1      
        unit_of_measurement: "l/m"
        data_type: int16
        device_class: power_factor
        address: 40
        input_type: input
        scale: 1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Ström (BE3)"
        unique_id: Nibe.BE3      
        unit_of_measurement: "A"
        data_type: uint32
        swap: word
        device_class: current
        address: 46
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Ström (BE2)"
        unique_id: Nibe.BE2      
        unit_of_measurement: "A"
        data_type: uint32
        swap: word
        device_class: current
        address: 48
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Ström (BE1)"
        unique_id: Nibe.BE1      
        unit_of_measurement: "A"
        data_type: uint32
        swap: word
        device_class: current
        address: 50
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Driftläge"
        unique_id: Nibe.address.237      
        unit_of_measurement: "auto(0)/manuellt(1)/endast tillsats(2)"
        data_type: uint16
        address: 237
        input_type: holding
        scale: 1
        precision: 0
        state_class: measurement
        slave: 1
    #  - name: "Nibe - Energimätare (BE7/BF3)"
    #    unique_id: Nibe.BE7/BF3      
    #    unit_of_measurement: "kWh"
    #    data_type: uint32
    #    swap: word
    #    device_class: energy
    #    address: 396
    #    input_type: input
    #    scale: 0.01
    #    precision: 1
    #    state_class: measurement
    #    slave: 1
    #  - name: "Nibe - Energimätare (BE6/BF2)"
    #    unique_id: Nibe.BE6/BF2      
    #    unit_of_measurement: "kWh"
    #    data_type: uint32
    #    swap: word
    #    device_class: energy
    #    address: 398
    #    input_type: input
    #    scale: 0.01
    #    precision: 1
    #    state_class: measurement
    #    slave: 1
      - name: "Nibe - Beräknad framledning"
        unique_id: Nibe.address.1017      
        unit_of_measurement: "°C"
        data_type: int16
        device_class: temperature
        address: 1017
        input_type: input
        scale: 0.1
        precision: 1
        state_class: measurement
        slave: 1
    #  - name: "Nibe - Beräknad framledning kyla"
    #    unique_id: Nibe.address.1567      
    #    unit_of_measurement: "°C"
    #    data_type: int16
    #    device_class: temperature
    #    address: 1567
    #    input_type: input
    #    scale: 0.1
    #    precision: 1
    #    state_class: measurement
    #    slave: 1
      - name: "Nibe - Total drifttid tillsats"
        unique_id: Nibe.address.1025      
        unit_of_measurement: "h"
        data_type: int32
        swap: word
        device_class: power_factor
        address: 1025
        input_type: input
        scale: 0.1
        precision: 1
        state_class: total_increasing
        slave: 1
      - name: "Nibe - Driftprioritering"
        unique_id: Nibe.address.1028      
        unit_of_measurement: "av(10)/varmvatten(20)/värme(30)/pool(40)/kyla(60)"
        data_type: uint16
        address: 1028
        input_type: input
        scale: 1
        precision: 0
        state_class: measurement
        slave: 1
      - name: "Nibe - Kompressorstarter EP14"
        unique_id: Nibe.EP14      
        unit_of_measurement: "antal"
        data_type: uint32
        swap: word
        device_class: power_factor
        address: 1083
        input_type: input
        scale: 1
        precision: 0
        state_class: total_increasing
        slave: 1
      - name: "Nibe - Drifttid Kompressor EP14"
        unique_id: Nibe.EP14.time      
        unit_of_measurement: "h"
        data_type: uint32
        swap: word
        device_class: power_factor
        address: 1087
        input_type: input
        scale: 1
        precision: 1
        state_class: measurement
        slave: 1
      - name: "Nibe - Flödesmätning varmvatten (inkl. tillsats)"
        unique_id: Nibe.address.1575      
        unit_of_measurement: "kWh"
        data_type: uint32
        swap: word
        device_class: energy
        address: 1575
        input_type: input
        scale: 0.1
        precision: 1
        state_class: total_increasing
        slave: 1
      - name: "Nibe - Flödesmätning värme (inkl. tillsats)"
        unique_id: Nibe.address.1577      
        unit_of_measurement: "kWh"
        data_type: uint32
        swap: word
        device_class: energy
        address: 1577
        input_type: input
        scale: 0.1
        precision: 1
        state_class: total_increasing
        slave: 1
      - name: "Nibe - Flödesmätning varmvatten (endast kompressor)"
        unique_id: Nibe.address.1583      
        unit_of_measurement: "kWh"
        data_type: uint32
        swap: word
        device_class: energy
        address: 1583
        input_type: input
        scale: 0.1
        precision: 1
        state_class: total_increasing
        slave: 1
      - name: "Nibe - Flödesmätning värme (endast kompressor)"
        unique_id: Nibe.address.1585      
        unit_of_measurement: "kWh"
        data_type: uint32
        swap: word
        device_class: energy
        address: 1585
        input_type: input
        scale: 0.1
        precision: 1
        state_class: total_increasing
        slave: 1
      - name: "Nibe - Aktivt larm"
        unique_id: Nibe.address.2195      
        unit_of_measurement: "larm"
        data_type: uint16
        address: 2195
        input_type: input
        scale: 1
        precision: 0
        state_class: measurement
        slave: 1
      - name: "Nibe - Larmnummer"
        unique_id: Nibe.address.1975      
        unit_of_measurement: "kod"
        data_type: uint16
        address: 1975
        input_type: input
        scale: 1
        precision: 0
        state_class: measurement
        slave: 1
      - name: "Nibe - Använd effekt"
        unique_id: Nibe.address.2166      
        unit_of_measurement: "W"
        data_type: uint32
        swap: word
        device_class: power
        address: 2166
        input_type: input
        scale: 1
        precision: 1
        state_class: measurement
        slave: 1

/Jörgen

jorgen-zafir avatar Mar 08 '22 00:03 jorgen-zafir

  - name: "Nibe - Värmebärarpumphastighet (GP1)"
    unique_id: Nibe.GP1      
    unit_of_measurement: "%"
    data_type: int16
    device_class: power_factor
    address: 1102
    input_type: input
    scale: 0.1
    precision: 1
    state_class: measurement
    slave: 1

@jorgen-zafir, is there a reason for setting scale: 0.1? The NIBE docs say "Factor: 1" for that function.

The docs also say "Size: u8", but I can't get it to work setting data_type: uint8. Any idea why?

ehn avatar Mar 10 '22 09:03 ehn

GP1 scale was a typo. I discovered it myself yesterday when comparing with the data in MyUplink. So it should be set to "1".

I never got the "uint8" data type to work either. "uint16" seems to be working instead.

Since my posting I've also added all holding sensors that is working for my setup. (They are missing in my post above).

jorgen-zafir avatar Mar 10 '22 12:03 jorgen-zafir

Thanks for confirming! Would you mind posting your config for the holding sensors as well? Would be great to compare.

ehn avatar Mar 10 '22 12:03 ehn

Ok, I'll post the "entire" thing again now including the holding sensors. Note that I've commented the sensors not present in my setup and hence haven't been able to test them myself.

nibe.txt

You can see many other parameters in MyUplink than is present through Modbus. It could be that there are more Modbus parameters available than presented in the Nibe documentation. Possibly you could discover more by doing a Modbus register "dump" through the USB port.

Another tip is to use a Modbus CLI for debugging. I selected "pymodbus" and its "pymodbus.console" as it seems to be working rather good. Byte order problems are a bit cumbersome in this tool though.

Even though Modbus isn't as complete as MyUplink I managed to construct a COP sensor through Home assistant. It let me better understand how a heat pump work when it comes to the heating and hot water generation. The higher temperature required the less efficient the heat pump is. So a COP just above 4 is present for the current low level heating while hot water generation often gives a COP of down to 2.

/Jörgen

jorgen-zafir avatar Mar 10 '22 13:03 jorgen-zafir

Hi, There is alot of more modbusregisters but they are not finished making the official yet. Every setting, temp,stats etc.. got a modbusregister so i would say modbus is way better than myuplink. Reading cop isnt that easy because you will need a external energymeter since the internal just reads the power of the inverter and not cirk.pumps and electric add. Same with the flow meter, it´s not that accurate so you will need a more relaible flow meter to get good looking COP. Of course you can mesaure the cop with internal bf1, in/out temp and power of inverter but keep in mind that its not reliable.

rickardnr1 avatar Mar 11 '22 06:03 rickardnr1

@rickardnr1 : Thanks for the info! I suppose I need to download the entire Modbus register list from the USB port.

Well I think the "easy" COP measurement that I've setup in Home assistant at least gives an indication on what level you are at. There is also the question on what you want to include in the COP calculation. Should you include everything. E.g. mine has 273 kWh/year consumption regardless of its production.

/Jörgen

jorgen-zafir avatar Mar 11 '22 10:03 jorgen-zafir

Just a small comment on my former text. By definition my COP calculation is wrong. This because I'm using the power measurements as a base. The real COP value is based on the energy measurements. However, I wanted to display the momentary efficiency of the heat pump and not the efficiency over time. Maybe I should have called the constructed sensor something else?

/Jörgen

jorgen-zafir avatar Mar 11 '22 13:03 jorgen-zafir

Hello, nice work with the modbus settings for NIBE. I am trying to understand how to make this work on a CTC608. The NIBE modbus manual seems very easy to understand, but the CTC version is not as easy. Can someone explain how to write a correct sensor for CTC ? The NIBE outdoor temp: - name: "Nibe - Utetemperatur (BT1)" unique_id: Nibe.BT1 unit_of_measurement: "°C" data_type: int16 device_class: temperature address: 1 input_type: input scale: 0.1 precision: 1 state_class: measurement slave: 1

adress 1 = ID1 from Nibe PDF.

CTC pdf doesent have that kind ID, just BMS values?

image

i cant find a way to download the Modbus register list to USB either. ( on the CTC )

Please help me understand this. regards /Micke

msex67 avatar Mar 22 '22 06:03 msex67

Hello, I am also interested in an implementation for myUplink (would also agree to be a tester). Are there already efforts or (progressing forks) in this direction?

Gravmac avatar May 22 '22 09:05 Gravmac

any news on myUplink integration? I would like to try it if possible. Eddie

eddiex666 avatar Aug 11 '22 13:08 eddiex666

Hello, Some news regarding MyUplink :)

I have started to create a new module for MyUplink and I have implemented the most of the myUplink Public API v2. A lot has changed but I can reuse a lot of code from the existing NIBEUPLINK-module created by ELUPUS, but I guess that the HASS integration also needs some rewritting.

Hi. Did you ever finish the project? i got a vvm s320 & S2125-8 in case you need someone to test stuff for you.

JeroenM1 avatar Nov 25 '22 08:11 JeroenM1

If anybody does continue this. I suggest adding support to https://github.com/yozik04/nibe

Then it will end up in HA automatically. Much less work needed.

elupus avatar Nov 25 '22 08:11 elupus

Ps. Home assistant can connect natively to S series pumps in next release (or current dont remember if its released already). You dont need my uplink.

elupus avatar Nov 25 '22 09:11 elupus