Open wozz opened 10 months ago
updated so the default remains the same, with a config option to enable the new processing logic
This looks promising ❤️ !
I tested it on an ESP32 and it's dropping a lot of frames. Wondering if my connection is bad or not. It's also a little too slow still.
I tested this branch, but it seems to make no difference in my log spam "Component esphome.coroutine took a long time for an operation (77 ms)." It recurs at the interval of victron: throttle, so I was optimistic that it might helpful.
This change updates the loop to yield between processing fields from the UART bus and publishing data to home assistant. This is recommended by esphome to avoid blocking longer than 20ms at a time.
However, it appears that some devices cannot keep up with the serial processing when it's done this way. Checksum verification is added to drop frames that may overrun the buffer.
fixes #132