Additions:
- Open TCP and UDP connection concurrently
- Ensure only used connections run the close callback
- Always first connect in _get_nonce (also when connection_type is still unknown)
- Improve close_callback unused filtering
- Prevent repeated new connections when connection_type is changed
- Do not logout of baichuan when login into HTTP, normal logout unchanged
- Implement Baichuan firmware upload
- Add payload argument to Baichuan send (unencrypted payload sending)
- Implement UDP resent when requested by ACK payload and pace UDP send with a 10 packet send window
- Add xor_baichuan_v3 encryption/decryption
- Add BC connection type udp_tcp
- Add the battery work mode for cameras behind a Hub
Bug fixes:
- Improve two_way_audio capability detection
- Be less strict in filtering two_way_audio capability
- Fix asyncio.wait not accepting generator in older python version (logout)
- Remove username and password from logout and don't retry on err 400 during logout
- In case baichuan_only flips, re-read get_host_data
- First try cmd_id 1 login before throwing LoginAccountDeviceError
- Reset tamper state when going to sleep
Optimizations:
- Speed-up baichuan encryption/decryption
- Add comment about when udp_tcp connection is supported
- Add max message size check in Baichuan
- Use 1 << channel instead of pow(2, channel), identical results
Full Changelog: 0.21.18...0.22.0