/
/
/
1"""Constants for the Bose SoundTouch player provider."""
2
3from __future__ import annotations
4
5DOMAIN = "bose_soundtouch"
6PLAYER_ID_PREFIX = "bose_soundtouch_"
7
8# Optional Bose SoundTouch developer app key. When configured, announcements are
9# sent natively to the speaker as an overlay that ducks and resumes playback.
10CONF_APP_KEY = "app_key"
11
12# Bose SoundTouch exposes a local HTTP API on port 8090 and a websocket
13# notification channel on port 8080 (the "gabbo" subprotocol).
14API_PORT = 8090
15NOTIFICATION_PORT = 8080
16WS_SUBPROTOCOLS = ("gabbo",)
17WS_HEARTBEAT = 30
18REQUEST_TIMEOUT = 10
19RECONNECT_DELAY = 10
20
21# mDNS service type advertised by SoundTouch speakers on the network.
22MDNS_TYPE = "_soundtouch._tcp.local."
23
24# physical favorite/preset buttons available on the SoundTouch speakers.
25PRESET_IDS = range(1, 7)
26
27# now_playing "source" value reported while the speaker is in standby.
28SOURCE_STANDBY = "STANDBY"
29
30# Transport/control keys understood by the /key endpoint.
31KEY_PLAY = "PLAY"
32KEY_PAUSE = "PAUSE"
33KEY_STOP = "STOP"
34KEY_NEXT_TRACK = "NEXT_TRACK"
35KEY_PREV_TRACK = "PREV_TRACK"
36KEY_POWER = "POWER"
37KEY_MUTE = "MUTE"
38
39# playStatus values reported by the /now_playing endpoint.
40PLAY_STATE = "PLAY_STATE"
41PAUSE_STATE = "PAUSE_STATE"
42BUFFERING_STATE = "BUFFERING_STATE"
43