nugget / python-anthemav

Python asyncio module to interface with Anthem AVM and MRX receivers
MIT License
17 stars 26 forks source link

Command retry on connection lost #17

Open orenskl opened 3 years ago

orenskl commented 3 years ago

I added a command resend mechanism to allow on/off of the receiver in case the connection is lost

Hyralex commented 3 years ago

What is the reason to add this mechanism? The library is reconnecting itself as soon as the TCP connection is lost. Is it that the connection was lost or that the command failed to execute the first time?

orenskl commented 3 years ago

I will try to describe the problem I was trying to solve. I tried to connect to my MRX from two separate end points, one is the home assistant and one is the MRX iOS app. Once I connect from home assistant the TCP connection stays ok, but when I turn on the iOS app the connect the previous connect to the home assistant gets lost. If I now turn on the MRX from the home assistant I get an error since the connection is lost.