john30 / ebusd

daemon for communication with eBUS heating systems
GNU General Public License v3.0
594 stars 136 forks source link

Issues reading/writing to ebus #1028

Closed palonsorodriguez closed 1 year ago

palonsorodriguez commented 1 year ago

Description

Issue

My heatpump is managed from Home assistant so I can heat the water during low energy prices or when my solar panels have surplus energy. I'm experiencing long delays reading/writing data from/to ebus (minutes, even hours) via ebusd

Environment

Actual behavior

Symptoms

I noticed that very often the heatpump is having a hard time following the commands written by Home Assistant timely and the heatpump started/stopped when it was not desired, and also the read water temp variable doesn't update for a long time, not being able to see the actual temp.
Among others I'm reading HwcStorageTemp and writting to HwcTempDesired On the other hand, I'm able to read/write the same variables almost instantly using the heatpump remote (MiPro Sense)

Troubleshooting

Wifi looks stable and strong (AP is less than 1m from the adapter), getting signal 100%, -29dBm Doing a ping from the ubuntu (where docker is running) to ebusd adapter

25 packets transmitted, 25 received, 0% packet loss, time 24037ms
rtt min/avg/max/mdev = 3.279/10.690/51.585/9.607 ms

Tried different latency values in ebus env variables ranging from 50 to 200 (ms)

Stopped Home Assistant (so no active client is using the bus) and run manual commands reading/writting to ebusd and noticed that often it takes 3/4 tries getting eg when reading from ebus

read -f -c bass2 HwcStorageTemp
ERR: SYN received

read -f -c bass2 HwcStorageTemp
ERR: wrong symbol received

read -f -c bass2 HwcStorageTemp
ERR: read timeout

read -f -c bass2 HwcStorageTemp
35

when writing to ebus

write -c bass2 HwcTempDesired 65
ERR: read timeout

write -c bass2 HwcTempDesired 65
ERR: SYN received

write -c bass2 HwcTempDesired 65
done

Expected behavior

I used a different adapter before and I didn't experience this issue. Instead I saw ERR often in the heatpump controller screen, sometimes blocking the heatpump, so I decided to get the official ebusd adapter

ebusd version

23.2

ebusd arguments

docker-compose.yaml

Operating system

Debian 12 (Bookworm) / Ubuntu 22-23 / Raspberry Pi OS 12 (including lite)

CPU architecture

x64

Dockerized

None

Hardware interface

adapter 5 via USB

Related integration

No response

Logs

Finally I scripted the reads so I can have timestamps to be able to correlate to the logs. Below one reproduction

Note: the script reads HwcStorageTemp. If it is not a number it will wait 3 seconds and try again until it gets a number, in the case below until it reads 59°C

./getHwcTemp.sh 2023-09-27T22:55:37+00:00Z value: ERR: SYN received isnumber:false retry:0 2023-09-27T22:55:43+00:00Z value: ERR: SYN received isnumber:false retry:1 2023-09-27T22:55:48+00:00Z value: ERR: read timeout isnumber:false retry:2 2023-09-27T22:55:53+00:00Z value: 59 isnumber:true retry:3

The corresponding ebus logs are attached here ebusd_2023_09_27.log