/
/
/
1"""Constants for the Bose SoundTouch player provider."""
2
3from __future__ import annotations
4
5from enum import StrEnum
6
7DOMAIN = "bose_soundtouch"
8PLAYER_ID_PREFIX = "bose_soundtouch_"
9
10IDLE_POLL_INTERVAL = 30
11PLAYBACK_POLL_INTERVAL = 20
12
13# Optional Bose SoundTouch developer app key. When configured, announcements are
14# sent natively to the speaker as an overlay that ducks and resumes playback.
15CONF_APP_KEY = "app_key"
16
17# Bose SoundTouch exposes a local HTTP API on port 8090 and a websocket
18# notification channel on port 8080 (the "gabbo" subprotocol).
19NOTIFICATION_PORT = 8080
20# e.g. http://1.2.3.4:8091/Xml/AVTransport3.xml
21UPNP_PORT = 8091
22UPNP_CONTROL_ENDPOINT = "AVTransport/Control"
23WS_SUBPROTOCOLS = ("gabbo",)
24WS_HEARTBEAT = 30
25REQUEST_TIMEOUT = 10
26RECONNECT_DELAY = 10
27
28# mDNS service type advertised by SoundTouch speakers on the network.
29MDNS_TYPE = "_soundtouch._tcp.local."
30
31# physical favorite/preset buttons available on the SoundTouch speakers.
32PRESET_IDS = range(1, 7)
33
34# now_playing "source" value reported while the speaker is in standby.
35SOURCE_STANDBY = "STANDBY"
36SOURCE_INVALID = "INVALID_SOURCE"
37
38# strings for overwriting a preset
39ACTION_OVERWRITE_PRESET_1 = "action_overwrite_preset_1"
40ACTION_OVERWRITE_PRESET_2 = "action_overwrite_preset_2"
41ACTION_OVERWRITE_PRESET_3 = "action_overwrite_preset_3"
42ACTION_OVERWRITE_PRESET_4 = "action_overwrite_preset_4"
43ACTION_OVERWRITE_PRESET_5 = "action_overwrite_preset_5"
44ACTION_OVERWRITE_PRESET_6 = "action_overwrite_preset_6"
45
46
47class PlayerOptionKeys(StrEnum):
48 """PlayerOptionKeys."""
49
50 NETWORK_NAME = "network_name"
51 BASS = "bass"
52