Commit Graph
85 Commits
Author SHA1 Message Date
jjlawren e86c82e675 Tweak Sonos activity monitoring (#66207)
* Tweak Sonos activity monitoring

* Support new 'sleeping' vanish reason
* Check availability before last-ditch check
* Use short-timeout call for last-ditch check
* Adjust reboot logging message and severity

* Simplify activity check failure
2022-02-10 14:11:47 -06:00
jjlawren 9fd8428254 Sonos lock subscription actions (#66204)
* Move exception logging to helper

* Wrap subscription in lock

* Rewrite subscribe method to use new logging helper

* Mark entitites as unavailable sooner to avoid unnecessary polls

* Rename unclear method and update docstring

* Move lock to unsubscribe
2022-02-09 21:56:10 -06:00
jjlawren a7fd477c64 Refactor Sonos polling (#65722)
* Refactor Sonos polling

Explicitly rename fallback polling
Catch soco exceptions centrally where possible
Create SonosPollingEntity subclass
Remove unnecessary soco_error fixture argument
Remove unnecessary polling in update_volume()
Adjust log levels and wording
Set explicit timeout on library

* Adjust logging to use raised exceptions

* Simplify availabiliity checks when using built-in poller

* Fix typing for return values
2022-02-08 12:17:05 -06:00
jjlawren 36cfa7786d Clean up Sonos unsubscribe/resubscribe exception handling and logging (#66025) 2022-02-07 16:00:57 -08:00
jjlawren 8c0c4f9bca Log traceback in debug for Sonos unsubscribe errors (#65596) 2022-02-03 15:03:18 -08:00
jjlawren 770707f487 Fix vanished checks on old Sonos firmware (#65477) 2022-02-03 13:22:34 +01:00
jjlawren 4794625048 Detect battery-operated Sonos devices going offline (#65382) 2022-02-01 22:11:21 -06:00
jjlawren 2129972904 Add activity statistics to Sonos diagnostics (#65214) 2022-01-30 13:15:51 -08:00
jjlawren cdad1a9f27 Use local Sonos API for Plex music playback (#63357) 2022-01-25 21:10:11 -08:00
jjlawren ec88897d04 Add event statistics to Sonos diagnostics (#64845) 2022-01-24 22:52:40 -10:00
jjlawren a7982adc73 Discard duplicate sonos events (#64722)
* Throttle duplicate Sonos events

* Fix test by breaking reference
2022-01-23 00:40:08 +01:00
jjlawren e7f0962979 Improve Sonos diagnostics (#64586) 2022-01-20 13:14:08 -10:00
jjlawrenandPaulus Schoutsen 53aed22d5c Add diagnostics support to Sonos (#64576)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-01-20 13:26:54 -08:00
jjlawren 740a8c33ee Add audio_delay number entity to Sonos (#63566) 2022-01-10 16:04:40 +01:00
jjlawrenandJ. Nick Koston 8a8ffa1c08 Add support for Sonos microphone binary_sensor (#63097)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-01-04 18:45:40 +01:00
jjlawren 00a4b60f74 Fix night mode switch state on Sonos (#63009) 2021-12-29 17:25:29 +01:00
jjlawren 00307e1ade Bump soco to 0.25.2 (#62691) 2021-12-23 11:07:29 -08:00
jjlawrenandJ. Nick Koston 4475e88707 Fix Sonos updating when entities are disabled (#62456)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-12-21 20:36:12 -08:00
jjlawren 9a1109949f Fix Sonos sub & surround switch state reporting (#61531)
* Fix sub/surround states, refactor volume param handling

* Lint
2021-12-11 21:14:22 -07:00
jjlawren 3ae16caf6a Fix Sonos radio handling during polling (#61401) 2021-12-09 14:12:19 -08:00
jjlawren cbf2bf2e1f Add audio input format sensor to Sonos HT devices (#60884) 2021-12-03 10:06:56 -08:00
jjlawren b883014ed4 Add Sonos subwoofer and surround on/off controls (#60918) 2021-12-03 16:05:40 +01:00
jjlawren 60adccd549 Do not print full traceback during Sonos resubscription failure (#60644) 2021-12-02 08:11:08 -10:00
jjlawren e56a676fd5 Import helpers in Sonos instead of accessing hass (#60848) 2021-12-02 18:21:49 +01:00
jjlawren cb7e7e9bd1 Improve Sonos activity tracking (#60642) 2021-12-01 21:49:21 +01:00
jjlawren a88cc8b98c Move Sonos bass & treble controls to number entities (#60498) 2021-11-29 16:00:37 +01:00
jjlawren aa5cf175f4 Set Sonos availability based on activity and discovery (#59994) 2021-11-21 18:48:57 -06:00
J. Nick Koston 10d6247fee Bump to aiohttp 3.8.0 (#58974) 2021-11-04 10:07:50 -05:00
jjlawrenandTobias Sauerwein 084fd2d19f Expose Sonos features as switch entities (#54502)
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-10-23 23:11:27 +02:00
Robert Hillis d20936d175 Fix referenced before assignment error in sonos speaker (#57924) 2021-10-20 17:44:08 +02:00
Marc Mueller 565a9fea6b Import Callable from collections.abc (2) (#56776) 2021-09-29 14:06:51 +02:00
jjlawren 0d6aa89fd4 Refactor Sonos alarms and favorites updating (#55529) 2021-09-28 09:49:32 +02:00
Michael Chisholm 805e73f78c Add UPNP device connection for Sonos (#56702) 2021-09-27 17:36:47 +02:00
jjlawren 931cf4eaab Improve Sonos handling of TuneIn stations (#56479) 2021-09-27 12:07:14 +02:00
J. Nick Koston 0363c22dd8 Fix Sonos going offline with 13.3 firmware (#56590) 2021-09-23 20:39:20 -07:00
Marc Mueller 48bada5a18 Update pylint to 2.11.1 (#56364) 2021-09-18 13:52:59 +02:00
jjlawren 0619069ae6 Avoid a zeroconf race condition (#56240) 2021-09-14 22:07:31 -10:00
jjlawren b3e84c6ee8 Set up polling task with subscriptions in Sonos (#54355) 2021-08-26 09:35:35 -07:00
Ben Edmunds b167e05a56 Sonos add bass & treble EQ option (#53978) 2021-08-25 17:42:40 +02:00
jjlawren 6cf312f3c8 Fix Sonos missing group member race condition on startup (#55158) 2021-08-24 14:13:18 -05:00
jjlawren f4fb5f2f5a Skip Sonos zeroconf availability check in non-timeout scenarios (#54425) 2021-08-13 15:42:55 -05:00
jjlawren 084737dd01 Cleanup Sonos grouping event callback method (#54542) 2021-08-12 22:01:34 +02:00
jjlawren 87e0b14282 Log gathered exceptions during Sonos unsubscriptions (#54190) 2021-08-12 11:46:07 -05:00
Reuben Gowandjjlawren 74d41ac5e5 Force an attempted subscribe on speaker reboot (#54100)
* Force an attempted subscribe on speaker reboot

* Recreate subscriptions and timers explicitly on speaker reboot

* only create poll timer if there is not one already

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>

* Black

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2021-08-09 20:47:38 +02:00
jjlawren 6eae5231f1 Fix empty sonos_group entity attribute on startup (#53985) 2021-08-04 21:57:19 +02:00
jjlawren 550a6f159e Reduce repetitive noise in Sonos debug logs (#53352) 2021-07-26 00:54:38 -05:00
Anders Melchiorsen e85b0ec052 Move Sonos to upstream SoCo (#53351) 2021-07-23 00:40:30 +02:00
jjlawren 0707792bec Handle more Sonos snapshot restore scenarios (#53277) 2021-07-22 08:04:02 -10:00
jjlawren a2fbc4218d Cleanup regroup handling in Sonos (#53241)
Check event before creating coroutine
Remove unnecessary regrouping dispatcher
Update typing to reflect actual behavior
Add optimizations for polling mode
2021-07-20 20:21:48 +02:00
Ville Skyttä 470f2dd73f Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02:00