Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nibe F1145 heat pump #81

Open
scruysberghs opened this issue Nov 18, 2024 · 38 comments
Open

Nibe F1145 heat pump #81

scruysberghs opened this issue Nov 18, 2024 · 38 comments

Comments

@scruysberghs
Copy link

Hi

I have a F1145 that I want to control using Home Assistant and esphome (or modbus). Had a look inside and there are 2 controller boards in there (one for home and one for swimming pool I think) but they don't look like any of the other wiring schema's I've seen with the number 11 and 12 being used. Am I not looking in the right place? Anyone here with more Nibe HP experience that can shed a light?

image
image

@elupus
Copy link
Owner

elupus commented Nov 18, 2024

Please look at the official modbus 40 documentation from nibe.

@scruysberghs
Copy link
Author

ok thx, I'll have another look. For future reference:
image

@scruysberghs
Copy link
Author

scruysberghs commented Nov 28, 2024

So I have connected terminals 10 and 11 to my esp directly (don't have the modbus 40 device)
Number 10 is connected to A and 11 to B. These correspond to pin 1 and 3 of the esp according to the specs of the device I am using.
image
image
image

I have this UART setup in my esphome config

  • id: my_uart
    rx_pin: 1
    tx_pin: 3
    baud_rate: 9600

The esp has ip adres 192.168.0.125, home assistant is 192.168.0.243
I see this in my esphome log :

[14:48:42][C][nibegw:120]: NibeGw
[14:48:42][C][nibegw:122]:  Target: 192.168.0.243:9999
[14:48:42][C][nibegw:125]:  Source: 192.168.0.243
[14:48:42][C][nibegw:127]:  Read Port: 9999
[14:48:42][C][nibegw:128]:  Write Port: 10000

And yet in home assistant I get:
image

Any tips on what to try to get this working? I have tried swapping RX and TX pins already.
Could it be a signal quality issue? Cable is only 3 meters long.

The nibe section of my esphome yaml

uart:
  - id: my_uart
    rx_pin: 1
    tx_pin: 3
    baud_rate: 9600

external_components:
  - source: 
      type: git
      url: https://github.com/elupus/esphome-nibe.git
    components: [ nibegw ]

nibegw:


  # If you have a named uart instance, you can specify this here.
  uart_id: my_uart


  udp:
    target:
      - ip: 192.168.0.243

    source:
      - 192.168.0.243

  acknowledge:
    - MODBUS40

@scruysberghs
Copy link
Author

forgot to mention the heat pump goes into alarm mode if I enable the MODBUS40 accessory in the 5.2 menu so I guess something is wrong with the connection?

@elupus
Copy link
Owner

elupus commented Nov 29, 2024

Not sure what esp you have, but you may need to set up the tx/rx selection pin

@scruysberghs
Copy link
Author

my board definition in esphome is :

esp32:
  variant: esp32s3
  board: esp32-s3-devkitc-1

pin definitions:

#define _HOSTNAME             "Ultra-Dongle"
#define _DEFAULT_HOSTNAME _HOSTNAME
#define OTAURL              "http://ota.smart-stuff.nl/ultra/v5/"
#define PROFILE "[ULTRA]"

//poorten
#define IO_BUTTON             0 //multifunctional flash/button

#define RGBLED_PIN           42
#define BRIGHTNESS           50 // Set BRIGHTNESS to about 1/5 (max = 255)
#define DTR_IO               17
#define RXP1                 18
#define TXP1                 -1 //no txp1
#define TXO1                 21
#define O1_DTR_IO            15
#define P1_LED               16
#define SSL_RAND              4
#define LED              	 41 //fake 
#define PRT_LED           	 16

#define IO_S0_1             45 
#define IO_H2O_2            46
#define IO_WATER     		46 //double
#define GPIO5               5
#define GPIO6               6
#define GPIO7               7
#define GPIO8               8
#define GPIO9               9

//ETH API
#define INT_GPIO            14
#define MISO_GPIO           13
#define MOSI_GPIO           11
#define SCK_GPIO            12
#define CS_GPIO             10

//MODBUS
#define RXPIN       		1
#define TXPIN       		3
#define RTSPIN      		2
#define BAUDRATE  		 9600

What is the tx/rx selection pin supposed to do?

I am correct that on the heat pump I have to enable the MODBUS40 accessory and not the MODBUS setting?

@elupus
Copy link
Owner

elupus commented Nov 29, 2024

Rs485 chips need to know if they are transmitting or receiving, this is controlled by a pin on the chips. So it depends on what rs485 treanceiver your board is using and how it is connnected to the esp32

@elupus
Copy link
Owner

elupus commented Nov 29, 2024

Might be the RTSPIN in your case, but without looking at schematics or docs for the board its unknown. Also if its active high or low matters (but that you can test)

@elupus
Copy link
Owner

elupus commented Nov 29, 2024

This is the dir_pin config option in nibegw

@scruysberghs
Copy link
Author

scruysberghs commented Nov 29, 2024

Ok thx, I'll try with

  dir_pin:
    number: 2
    inverted: false

and inverted true and false.
There currently is only a MODBUS setting in menu 5.2 and not MODBUS40 as they mention in the MODBUS40 manual. The Heat pump might require a software update first?

@scruysberghs
Copy link
Author

on the same esp hardware I have successfully connected to a Huawei solar modbys RTU using:

uart:
  - id: mod_bus
    baud_rate: 9600
    rx_pin: 1
    tx_pin: 3
    rx_buffer_size: 1024
    data_bits: 8
    stop_bits: 1
    parity: NONE

modbus:
  - uart_id: mod_bus
    id: modbus1
    flow_control_pin: 2
    send_wait_time: 200ms

modbus_controller:
  - id: huawei_inverter
    address: 0x1
    modbus_id: modbus1
    setup_priority: -10
    command_throttle: 750ms
    update_interval: 15s

So the flow control pin is indeed 2 and what NibeGW calls the dir_pin
Is there no need to set data_bits, stop_bits or parity in the UART section for NibeGW?

@elupus
Copy link
Owner

elupus commented Nov 29, 2024

No usually not. It should defsult to the right thing i think.

@scruysberghs
Copy link
Author

I'm still missing something obvious I'm afraid. The heatpump goes into an alarm state the second the modbus option is enabled. I have tried with the dir_pin inverted true and false

@elupus
Copy link
Owner

elupus commented Nov 30, 2024

Do you get anything logged in the esp device when you turn on modbus in the pump?

@bmwmotor
Copy link

bmwmotor commented Dec 1, 2024

I have the F1145 as well and good working for two years.
This is my setup in NibeGW.yaml file

Seems they do not talk on the correct ports. I use 10090
Look in these files https://github.com/elupus/esphome-nibe/tree/master/examples

NibeGW.txt

@scruysberghs
Copy link
Author

Can you confirm your Home Assistant add-on settings?
That 10090 should match what is set in home assitant, no? If I use 10090 like in the file you shared I guess I should set it up like this in HA:
choose NibeGW
image
image

@bmwmotor can you confirm my wiring (the 10 and 11 port) is ok? I use an external power supply for the esp so I do not use the 5v from the heat pump to power the esp like you seem to do.

I understand it correctly I have to get the pump connected to the esp device before I can connect the home assistant nibe integration to the esp device?

@scruysberghs
Copy link
Author

I still worries me that the the home assistant add-on has the text "Verify that The MODBUS40 accessory has been enabled in the heat pump configuration." and my heat pump only allows me to enable a MODBUS setting in it's menu.

@elupus
Copy link
Owner

elupus commented Dec 1, 2024

@scruysberghs if you get errors toggling that setting. It is the right setting.

Dont bother with home assistant settings until you can turn that setting (modbus) on without errors. It should work standalone. Turn up logging in the esphome device and look if it is receiving data and/or trying to send.

Ps. Pump supplies 12 volt, not 5.

@bmwmotor
Copy link

bmwmotor commented Dec 2, 2024

image

This is how it is connected. The wires are on nr 9, 10,11 en 12. 9 and 12 are power.

@bmwmotor
Copy link

bmwmotor commented Dec 2, 2024

You find the correct pinnumbers on the docs with the board
image
IMG_3033

For the F1145 you use the RS485 connection.

So I use in ESPHome (HA): On the document PINMAP by the board you see the RS485 port = pin GPIO21 and GPIO22

uart:
rx_pin: GPIO21
tx_pin: GPIO22
baud_rate: 9600

@bmwmotor
Copy link

bmwmotor commented Dec 2, 2024

In the NIBE F1145 there are 2 menu's to change:

IMG_3036
IMG_3035

@bmwmotor
Copy link

bmwmotor commented Dec 2, 2024

Naamloos-1

In HA --> ESPHome go to LOGS at your heatpump. It opens a new window : click on wireless.
Then you see connection messages: UDP packet xx bit send......... Then you know your connection works.

When not look at your router if the IP adress is correct and fixed.

When this is oke then go to the NIBE add-on in HA. I do not remember how I filled in that ports. Just try some settings.
Choose NIBEGW in the menu. It is the add on is listening on the correct port (you put in the config at ESPHome)

This part in ESPHome config file is sending the messages to your HA - Nibe addon.

Configure NibeGW

nibegw:
udp:
# The target address(s) to send data to. May be a multicast address.
target:
- ip: 192.168.2.16
port: 10090

# List of source address to accept data from, may be empty for no filter
source:
  - 192.168.2.16

Be aware that the board stops communicating when it gets updates in HA-ESPHome. Then the F1145 gives an MODBUS error. Just cancel it on the heatpump and it will work. Thats normal. Good Luck

@scruysberghs
Copy link
Author

only thing in my esphome logs is this

[12:23:10][C][nibegw:120]: NibeGw
[12:23:10][C][nibegw:122]: Target: 192.168.0.243:10090
[12:23:10][C][nibegw:125]: Source: 192.168.0.243
[12:23:10][C][nibegw:127]: Read Port: 9999
[12:23:10][C][nibegw:128]: Write Port: 10000

when enabling the modbus option nothing is logged and the heat pump goes into alarm.
I do not have the 5.3 menu in @bmwmotor second picture. Not even after enabling MODBUS.

@bmwmotor
Copy link

bmwmotor commented Dec 2, 2024

Do you have Nibe menu 5.2.4? Scroll all the way down and activate MODBUS there

@scruysberghs
Copy link
Author

scruysberghs commented Dec 2, 2024

my esp device has a SP3485EN chip so I've ordered a LillyGo board to ensure that isn't the problem

@scruysberghs
Copy link
Author

scruysberghs commented Dec 2, 2024

Do you have Nibe menu 5.2.4? Scroll all the way down and activate MODBUS there

I only have a modbus option at the bottom of menu 5.2 there is no 5.2.4 menu

@bmwmotor
Copy link

bmwmotor commented Dec 2, 2024

and when you leave it on (ignore the alarm), can you then get 5.3 ?

Here is the compleet config file. You have to change IP adress and Wifi etc .
nibegw (1).yaml.txt

@elupus
Copy link
Owner

elupus commented Dec 2, 2024

@scruysberghs i wonder if you have some old variant of the f1145, since your photos of the boards dont seem to match the modbus40 images.

@scruysberghs
Copy link
Author

the pictures in my first post were the wrong boards somewhere in the back of the heat pump. Quite sure the cable now is connected to the right board like in @bmwmotor 's picture.
image

@bmwmotor
Copy link

bmwmotor commented Dec 2, 2024

I found the ports in the ESPHome logfile. You need them in the HA (Nibe) add-on screens

[13:43:36][C][nibegw:122]: Target: 192.168.2.16:10090
[13:43:36][C][nibegw:125]: Source: 192.168.2.16
[13:43:36][C][nibegw:127]: Read Port: 9999
[13:43:36][C][nibegw:128]: Write Port: 10000

seems the same as you :)

@elupus
Copy link
Owner

elupus commented Dec 2, 2024

Could your pump have a really old firmware version?

@scruysberghs
Copy link
Author

Could your pump have a really old firmware version?

that could well be the case. We are trying to upgrade it now (it never had a firmware update since it was installed)

@Sintyr
Copy link

Sintyr commented Jan 2, 2025

Hey, how did the firmware update go? I have the same issue I cannot log any data and I have the original Modbus 40 accessory connected to F1145. Still getting errors I tried serial connection to HA with RS485 to USB now I am trying with ELFIN11RTU to TCP. Looking for a solution too

@Swissgreen
Copy link

Look on page 10 of this manual, it says that the module software must be 1161 or later. Can you update through an USB key?

https://www.nibe.fi/assets/documents/9133/031725-4.pdf

@scruysberghs
Copy link
Author

Hey, how did the firmware update go? I have the same issue I cannot log any data and I have the original Modbus 40 accessory connected to F1145. Still getting errors I tried serial connection to HA with RS485 to USB now I am trying with ELFIN11RTU to TCP. Looking for a solution too

Did not do the upgrade myself but word of warning. The owner appartly used a wrong version of the firmware, got an error message after rebooting and after using the option to revert to the previous/original firmware the controlboard was bricked and had to be replaced... Mind you, this heat pump was 15 years old and still had the original firmware.

@markotanninen

This comment has been minimized.

@elupus

This comment has been minimized.

@markotanninen

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants