Open Mellbin opened 3 weeks ago
Not sure what might go wrong.. Can you keep that log window open when you try to add it in HA?
What is your config in HA?
The logs included are what I see when i try to connect the nibegw integration. It sends 3 of these requests but i don't see any answer to them. then the integration shows the warning that it's the wrong adress/port [23:43:20][D][nibegw:048][async_udp]: UDP Packet token data of 6 bytes received
Which config are you referring to?
The esphome config file, and a screenshot of your config attempt in HA
Config file:
esphome:
name: nibef370
friendly_name: NIBEF370
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key:xxxxxxx
ota:
- platform: esphome
password:xxxxxxx
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: true # Fast connect to connect to my hidden network
# It is recommended to disable powersave mode on wifi, to make sure the device does not miss UDP requests sent.
power_save_mode: none
# The device needs a static IP. Either do that here with the manual_ip node, or do it via another way (router)
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Nibef370 Fallback Hotspot"
password: "BFLlIBAvUMHf"
captive_portal:
# Load nibe component
external_components:
- source: github://elupus/esphome-nibe
# Set pins required for LilyGo T-CAN485 board
output:
- platform: gpio
id: ENABLE_PIN # Enable the chip
pin:
number: GPIO19
inverted: true
- platform: gpio
id: SE_PIN # Enable autodirection
pin:
number: GPIO17
inverted: true
- platform: gpio
id: ENABLE_5V_PIN # Enable 5V pin for RS485 chip
pin:
number: GPIO16
inverted: true
# Configure uart that will be used
uart:
rx_pin: GPIO21
tx_pin: GPIO22
baud_rate: 9600
# Configure NibeGW
nibegw:
udp:
# The target address(s) to send data to. May be a multicast address.
# When using Home Assistant: this is your Home Assistant IP.
target:
- ip: 192.168.1.166
port: 9999 #The Nibe Home Assistant integration listens to 9999 by default
# List of source address to accept data from, may be empty for no filter
source:
#- 192.168.1.166
#read_port: 10081
# write_port: 10082
acknowledge:
- MODBUS40
# Constant replies to certain requests cabe made
constants:
- address: MODBUS40
token: ACCESSORY
data: [
0x0A, # MODBUS version low
0x00, # MODBUS version high
0x01, # MODBUS address?
]
# Some helper functions to restart ESPHome from HA
button:
- platform: restart
name: Nibegw Restart
- platform: safe_mode
name: Nibegw Safe Mode Boot
Screenshot with modbus disabled on heatpump.
Screenshot with modbus enabled on heatpump.
Remote address in that screenshot seem empty? Should be the IP of the esphome device (maybe it got cleared on error?)
How is your home assistant installed? HAOS or some custom set up? (Need to accept reception of udp packets)
Yes, it clears on error.
I'm using HAOS on raspberry pi 5.
It does look like it sends to the pump and receives from the pump. Could be worth turning down debug level on the ESP if you are getting modbus errors on the pump. High debug logging can interfere with communication with the pump.
The pump should not go into error when you enable modbus40 accessory. If it does, something os wrong with the esp setup.
Maybe you have some other generation lf the lilygo tcan module?
Hmmm, decreased the log level to warn but did not seem to help.
Currently got the board revision v1.1 (2024-04-25). Don't know if anyone has confirmed this one to work? but should be similar enough?
The most common issue is with write commands not triggering write commands on the bus. I dont know if that chip has automatic switch between read and write (which the config assume)
What i gathered from checking the v1.0 board and mine is that the rs485 chip is the same
What do you think is the next step?
You could try the new release. I did some performance improvements for the auto rx/tx type chips. Not sure it is your problem.
Hi again,
So after a while I felt like working on this again and not sure what happened since the last time i tried but now when I try to get the HP to talk with the board i get this error. (Sorry for HDR screenshot)
Yea that is some new logging added. It very much looks like the pump is not seeing the things sent by the GW device at all. Sort of looks like the auto rx/tx function is not working on the device. Either config for that board is wrong. Board could be broken, or it could be wired up incorrectly.
Hmm. I seem to recall some issue with grounding on some boards.
Since I've tried 2 different boards (ordered 2 at the same time) it should not be the board unless there is some manufacturing issue?
I'm also guessing you can't see any issues on the config for the board that I sent?
So grounding may be the issue, any link to a discussion regarding this?
It was this issue: https://github.com/elupus/esphome-nibe/issues/46 but looks like that got that resolved.
I prob had warning log level in the last image, sorry for the confusion...
But when turning on the verbose logging it very much looks like the controller is talking to the HP. Maybe you can gather something from these logs, otherwise I will give up with the lilygo board...
All the: "Unexpected Ack/Nack: 5C" means the heatpump never receive what the nibegw sends.
Something is wrong with the transmission path to the heatpump. Maybe cabling, connections (though unlikely since we do receive data). Hardware, or pin setup. I cant really say without hooking up a logic analyser or oscilloscope to the cabling.
Yeah so I've now given up on this board. Have ordered the other recommended board T-RS S3 to test instead.
Do you want me to close this issue now? Or should I try the other board first? Ff the t-rs-s3 board works I will make a PR with example :)
Leave it open till you tested that board. Note that that board does not support auto rx/tx enabling. So you need to hook up dir_pin config on that one.
Not sure what I am doing wrong/what is breaking here.
Have setup lilygo espboard following #56 HP is connected and enabled. I can see when logging wireless that the nibe integration is trying to connect but it just gives me an error. (async UDP)
Tried changing to diffrent ports without success. Tried switching A and B cables, then i can't see any activity when checking logs.
HP also goes into alarm if that helps.