Battery camera push updates:
- Add aiohttp WebhookServer
- Add subscribe/unsubscribe webhook functions for battery cameras
- Automatically start internall WebhookServer when calling subscribe_events for battery cams
- Implement webhook_push_callback and parsing
- Use self._subscribed, events_active and add webhook_subscribed for battery cams
- Also send cmd_id=31 when subscribing using webhook
- Do not reset events_active when logout when webhook subscribed
- Protect agains raising errors in subscribe_events during webhook subscription
- Check if Baichuan webhook is supported
Additions:
Bug fixes:
- Drop the connection when getting a UDP timeout to start with a fresh connection and wake the camera
- Fix Baichuan PIR supported detection
- Base snapshot capability also on "osdCfg" flag
- Fix baichuan is_doorbell detection
- Fix protocol is None error when dropping connection
Optimizations:
- Re-use connection class and remember UID to prevent UDP discovery step
- Accept UDP D2C_S_R message even if message_id does not match
- Add loop typing
- Prevent drop_coroutine.close on a running coroutine
Full Changelog: 0.20.1...0.21.0