Remove group management
Deploy HEOS panel / deploy (push) Successful in 25s

This commit is contained in:
2026-09-16 13:43:31 +02:00
parent 5b82a24ac4
commit 58a2dedc03
15 changed files with 358 additions and 588 deletions
+12 -6
View File
@@ -1,8 +1,9 @@
"""Stand-in HEOS hardware: just enough of the CLI protocol to test against.
The grouping rules are the part worth pinning down -- what a set_group
call does to a stereo pair is the kind of thing you do not want to find
out by experimenting on the speakers at eleven at night.
call actually does to players already in a group is the kind of thing
you do not want to find out by experimenting on the speakers at eleven
at night.
"""
import json
@@ -11,9 +12,14 @@ import threading
class FakeHeos(threading.Thread):
"""A HEOS CLI server on localhost, with four players and a pair."""
"""A HEOS CLI server on localhost, with three players.
NAMES = {1: "Home Cinema", 2: "Lego Room", 3: "Denon Home 200 L", 4: "Denon Home 200 R"}
"Denon Home 200 L" stands in for the living room's stereo pair --
HEOS pairs that kind of In-Room Group at the hardware level, so it
is one player, one pid, exactly like any other room.
"""
NAMES = {1: "Home Cinema", 2: "Lego Room", 3: "Denon Home 200 L"}
# What browse/browse?sid=<AVR pid> reports: HEOS's own list of the
# AVR's local inputs, already under whatever names you gave them in
@@ -26,10 +32,10 @@ class FakeHeos(threading.Thread):
def __init__(self):
super().__init__(daemon=True)
self.groups = {3: [3, 4]} # gid -> pids, leader first
self.groups = {} # gid -> pids, leader first
self.volumes = {pid: 20 for pid in self.NAMES}
self.play_states = {pid: "play" for pid in self.NAMES}
self.group_volumes = {3: 25}
self.group_volumes = {}
self.now_playing_mid = {1: "inputs/mediaplayer"} # pid -> what get_now_playing_media reports
self.now_playing_sid = {} # pid -> its source id; 4 is Spotify
self.now_playing_track = {} # pid -> song/artist/image_url fields