Hi, I'm using this nice library in home-assistant, but I found (and solved) an issue after a disconnection there.
See: blindlight86/HA_USR-R16#5
The problem can be solved by updating handle_disconnect_callback function:
$ diff protocol-old.py protocol.py
293a294,296
> self.active_transaction = None
> self.in_transaction = False
> self.active_packet = None
I will create a pull request with the fix.