feat: add VIS Sonos Control widget - #359
Open
kosmix1980 wants to merge 30 commits into
Open
Conversation
Ship a classic VIS widget with the adapter so one control can switch rooms, manage groups, and start favorites, playlists and queue tracks. Playlist names are now also exposed as adapter states for the widget. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
ioBroker starts the adapter from build/main.js. That folder was gitignored, so a GitHub install had no start file. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Classic VIS often has no global $, and waiting for a wildcard getStates left the widget empty. Render immediately, discover players via getObjectView, and ship CSS/JS inside sonos.html. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Grouped rooms were displaying the last local title (often paused) because Sonos only emits transport-state on the coordinator. The widget now reads playback from the group master, the adapter copies that track onto members, and each room keeps a recent-tracks list in a new Zuletzt tab. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Play, pause, next, prev and seek go to the group coordinator only when the selected room is actually a member. A room that is not in a group keeps controlling itself. Volume stays per room. Elapsed time is now copied onto group members so the progress bar keeps moving. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
The seek bar only moved when VIS forwarded adapter elapsed updates, which often never arrived. The widget now advances the bar every 500 ms from the last known position and resyncs when Sonos reports a new elapsed time. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
ioBroker Admin can now show this fork as 4.1.0 instead of 4.0.3. The VIS widget also displays 4.1.0 next to the SONOS label. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Rooms in one group share a name color. A room that is not in a group stays white. Admin and the widget show version 4.1.1. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
The coordinator keeps the full group color and a slightly lighter chip. Other rooms in the same group use a darker shade of that color. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
The widget browses the Sonos content directory. YouTube and other music services are listed by name only; their catalogs need the Sonos app, so play them via favorites. Version 4.2.0. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Spotify always appears under Quellen. Opening it lists matching Sonos favorites and playlists so they can be started from that folder. Version 4.2.1. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
The VIS Sources tab talks to music services over SMAPI: browse, search and play. Tokens come from the speaker when readable, otherwise App-Link sign-in. Version 4.3.0. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Parse namespaced SMAPI/UPnP XML so Spotify folders and search results are not dropped. Add a Search button and App-Link when the catalog is empty. YouTube Music has no SOAP catalog. Version 4.3.1. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Show TuneIn, Spotify, library, shares and line-in when the browse path is empty, reload root if a stale service result is left over, and translate the emptySources label. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Google's YouTube Music endpoint rejects third-party SMAPI calls. List YTM like Spotify, match sid 284, and search favorites, playlists and recently played tracks from the Sonos app. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Search lists public YTM songs. Play sends a sid=284 SMAPI URI to the speaker so it can resolve the track. No stream proxy. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Arc, Beam, Playbar, Playbase, Ray and Amp switch via x-sonos-htastream on the selected room, same as the Sonos app TV input. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Sonos leaves track metadata blank for the HDMI input, so the widget fell through to Nichts spielt. Map x-sonos-htastream to TV / HDMI. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
The HDMI input has no track duration, so the seek bar is omitted when the widget detects TV as the current source. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Sonos reports the compression as stream content (Stereo PCM, Dolby…). Now-playing keeps the title TV, shows that format, and uses a television cover instead of the vinyl No Cover placeholder. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Drop the oldest changelog item so package tests stay within the limit. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Also read the HDMI audio format from HTAudioIn (Stereo PCM, Dolby…) and remember the last selected room across page reloads. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
On TV HDMI the transport row now shows mute only. TV HDMI is the first item in Quellen so it is visible without scrolling. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
SetAVTransportURI starts HDMI; a following Play often returns HTTP 500. Transport commands are ignored while TV is selected. Errors now include the state name and room so the next 500 is identifiable. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
HTAudioIn is polled while TV is selected. Codes for no signal (0, 21, 22, silent PCM) clear current_artist instead of keeping the last format. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Favorites, playlists, queue, recent and sources are pill buttons under the rooms. A click opens a covering sheet with search; playing a title or clicking outside closes it. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
The sheet over the player uses a translucent background so cover and now-playing remain faintly visible underneath. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Match the official adapter for an upstream PR: keep 4.0.3, put the widget work under WORK IN PROGRESS, and gitignore compiled output again. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Document the player, library sheet, sources and TV HDMI views and drop the outdated note that this branch ships build/. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
Point GitHub installs at cursor/vis-sonos-widget-93d4, which ships the compiled adapter so the start file is present. Co-authored-by: kosmix1980 <kosmix1980@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a VIS widget Sonos Control (
data-vis-set="sonos"). One widget can switch rooms, control playback, form groups, and start favorites, playlists, queue tracks, recent tracks and sources (including TV HDMI).The adapter version stays 4.0.3. Changelog entries are under
### **WORK IN PROGRESS**so the release script can set the next version. Compiledbuild/is not committed (same as today; CI /prepublishOnlystill compiles).Widget
sonos.0— not a singleplaystate.common.restartAdapters). Reload the VIS editor with Ctrl+F5.localStorage).Sources
sid=284URI to the speaker (the official YTM account on the player). There is no YouTube stream extraction or proxy. If a title does not start, save it as a favorite in the Sonos app.x-sonos-htastream:{UUID}:spdif) is the first source item and plays on the selected room (Arc, Beam, Playbar, Playbase, Ray, Amp).TV HDMI
HTAudioIn); empty when there is no signal.Playis not sent afterSetAVTransportURI(that call returns HTTP 500 on HDMI).HTAudioIncodes).Adapter / states
New or used per-room states for the widget:
playlist_list/playlist_list_arrayrecent_tracksmedia_browse/media_browse_resultmedia_playuri,metadata,favorite,playlist,tv)play_urinight_mode/speech_enhancementwidgets/is included in the npm package files.Docs
README section VIS widget with install steps and screenshots.
Notes for reviewers
favorites_list_html,queue_html) are unchanged.