fxmike08 / custom-esphome

GNU General Public License v3.0
9 stars 2 forks source link

Missing KNX bus prevents remaining actions #1

Closed cuthulino closed 5 months ago

cuthulino commented 7 months ago

Hello, I am integrating an ESP32 with esphome into my KNX additional to requesting everythin over the api into homeassistant.

I recognized, when the KNX bus is missing, everything else stops working. Homeassistant cant connect to the api, no sensor data is send and the logs can no longer be viewed. OTA updates still work.

Removing the lambda expression for sending or connecting the knx bus resolves this issue.

It would be great to extend this component, so a missing knx bus does not prevent everything else from working. Maybe you can add this functionality somehow?

fxmike08 commented 7 months ago

Hi there,

First of all, there is no software solution for detecting if serial connection is working or not. This is the user responsibility to check that all connections are proper done ! The connection between ESP and KNX bus coupler is mandatory for transmitting data otherwise it will crash.

I recognized, when the KNX bus is missing, everything else stops working. This depends very much by your scenario.

The "crash" happens only when you try to send data over TP (KNX bus) and its not connected. So, one solution for your problem could be:

... so a missing knx bus does not prevent everything else from working.

Indeed, lets keep this issue opened until I find a solution for that crash.

If you need more help please post your scenario the yaml file.

fxmike08 commented 5 months ago

@cuthulino Please check again the behavior from this issue. I've added the serial_timeout parameter as an optional setting to handle UART connection issues.

You can verify this without making any changes. Just ensure the component is not loaded from the cache.

You can fine-tune the serial_timeout as needed. For more details, refer to the README file.

Let me know if you are still facing this issue.