Change default Sonos callback port (#768)
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Mon, 10 Jul 2023 21:23:32 +0000 (23:23 +0200)
committerGitHub <noreply@github.com>
Mon, 10 Jul 2023 21:23:32 +0000 (23:23 +0200)
music_assistant/server/providers/sonos/__init__.py

index fb0ef2db681cb0a63e32710510f1acb501666ddd..dc4d30996348da87661756755e6c650de60b7d69 100644 (file)
@@ -9,6 +9,7 @@ from dataclasses import dataclass, field
 from typing import TYPE_CHECKING, Any
 
 import soco
+from soco import config
 from soco.events_base import Event as SonosEvent
 from soco.events_base import SubscriptionBase
 from soco.groups import ZoneGroup
@@ -36,6 +37,10 @@ PLAYER_FEATURES = (
     PlayerFeature.VOLUME_SET,
 )
 
+# set event listener port to something other than 1400
+# to allow coextistence with HA on the same host
+config.EVENT_LISTENER_PORT = 1700
+
 
 async def setup(
     mass: MusicAssistant, manifest: ProviderManifest, config: ProviderConfig