esphome / esphome/feature-requests
Configurable read timeout for UART
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
I would like to be able to modify the 100ms read timeout value ([specified here](https://github.com/esphome/esphome/blob/cd57469e06aaf223c518c72b17c07e80722982fc/esphome/components/uart/uart_component.cpp#L14)) used by the UART component.
**Please describe your use case for this integration and alternatives you've tried:**
I'm communicating with some HVAC equipment at 2400 baud, and 100ms is only enough to read **at most** 30 bytes before timing out.
**Additional context**
In my particular case, I'm attempting to use a while loop to wait for `available()` to show enough bytes before calling `read_array()` that I shouldn't need to wait, but for some reason this is also resulting in timeouts (I've opened an [issue here](https://github.com/esphome/issues/issues/4330) to see what's going with that). That said, being able to adjust this 100ms timeout directly rather than adding a larger delay in a loop before calling `read_array` would streamline the process and be ever so slightly quicker.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.