Please apologize for this big commit with many - partly unrelated - changes in one.
But I figured that maybe others could benefit from it too.
After my changes, the receiver works reliably now for some weeks.
it used to vanish after a while and never be found anymore, except after some restarts.
I found out that the problem was that the receiver sort of randomly switches between listening to port 23 and 8102. I don't know if this applies to other models too, but judjing from some forum posts, it is likely. The component now tries both ports in sequence, at every connect. In this version, the port added to the configuration yaml is basically ignored.
I also made sure that it will try reconnects whenever the connection is lost (a few cases were left off in the original)
Remove warnings on hassio 2024.* by:
make all calls asyncio-compatible
update the supported_features to use the MediaPlayerEntityFeature-prefixed features
Please apologize for this big commit with many - partly unrelated - changes in one. But I figured that maybe others could benefit from it too. After my changes, the receiver works reliably now for some weeks.
Please note that all credits belong to https://github.com/realthk/asyncpioneer
I just updated some of the code to: