Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume bar of Snapcast group is not updated correctly #534

Closed
jojo141185 opened this issue May 3, 2020 · 12 comments
Closed

Volume bar of Snapcast group is not updated correctly #534

jojo141185 opened this issue May 3, 2020 · 12 comments
Labels
bug confirmed A bug that has successfully been replicated and can be resolved

Comments

@jojo141185
Copy link
Contributor

Describe the bug
The volume bar of the Snapcast group and its client is not in sync. Group volume bar is also not updated when it is changed via another program, e.g. Snapcast Android App or Homeassistant.
The page must be manually reloaded to update the group volume bar.

To Reproduce
Steps to reproduce the behavior:

  1. On Iris Web-Interface open Settings -> Services -> Snapcast
  2. Add one client to group
    3 a) Change Volume of this client in this group (vertical volume bar)
    b) Or open e.g. Snapcast Android App and change volume of the group.
  3. Volume bar of group (horizontal volume bar) isn't updated .
  4. Reload website (F5)
  5. Volume bar of group is synced correctly.
@jojo141185 jojo141185 added the bug label May 3, 2020
@jaedb jaedb added the confirmed A bug that has successfully been replicated and can be resolved label May 7, 2020
@jaedb
Copy link
Owner

jaedb commented May 7, 2020

Snapcast doesn't technically support a group volume, so this is an Iris-only control. What I think could be done is to revisit how it is calculated. Right now it is only calculated when a client volume is changed in Iris.
A more resilient approach would be to have a group volume as a realtime representation of the average client volume, which would be updated when a client is updated outside of Iris. The challenge is when the number of clients change, the group volume would appear to change too (1 client at 50% volume, then another client connects at 100% would make the group volume change from 50% to 75%).

@jaedb
Copy link
Owner

jaedb commented May 20, 2020

Resolved in release 3.49.0

@jaedb jaedb closed this as completed May 20, 2020
@jojo141185
Copy link
Contributor Author

jojo141185 commented May 22, 2020

Hello Jaedb,
Thanks for taking care of that bug so fast.
Unfortunately, after updating to version 3.49.0 I still have the problem that the volume of the snapcast group does not automatically synchronize with the clients. Only after manual refreshing the web interface (F5) in browser the volume bar is updated correctly. In contrast, the update of the mute function/icon works perfectly.
For better explanation I have recorded the phenomenon in the following video/gif:
Iris 2020-05-22_edt

@jaedb
Copy link
Owner

jaedb commented May 24, 2020

The version number indicates what version you have installed, but if your browser has cached an old version's javascript you won't be seeing the latest and greatest.

So, please try clearing your browser cache and then re-trying. You can also do a forced refresh which should achieve the same thing but without affecting your settings.

Let me know if this does the trick or not.

@jojo141185
Copy link
Contributor Author

Thanks James, for your answer. I have successfully deleted the browser cache. After redoing the settings and giving access to all my accounts, unfortunately the same behaviour appears as before.
Can you reproduce this problem on your computer? If not, I will try a complete reinstallation of iris.

@jaedb
Copy link
Owner

jaedb commented May 31, 2020

I am unable to replicate, but I've been using the Snapcast Android application as my benchmark for triggering Snapcast events. It looks like you're using some kind of HASS extension, and I wonder if that may be playing a part.

There are a few ways to verify this:

  • open an incognito browser window with Iris and manipulate the volumes there to observe whether the two windows stay in-sync; and/or
  • use the Snapcast Android app to observe whether Iris is receiving the volume changes.

It would also be useful to check whether any errors were being encountered in the browser. Initiate the Iris Test Mode (Settings > Debug > Test mode) and open your Developer Console to see if any errors appear.

@jojo141185
Copy link
Contributor Author

jojo141185 commented Jun 11, 2020

Hello James,
I've completely reinstalled my small server in the last days (hardware change) - including mopidy and iris.The problem is still there. An identical behaviour is shown with the Snapcast Android app as well as with a second incognito window in Firefox.
The volume control of the Snapcast group in the other window is not synchronized. Only by updating the Iris web interface (Ctrl + F5) the volume of the group will be synchronized.
The volume control of the Snapcast clients is synchronized perfectly.
Iris 2020-06-11

@jojo141185
Copy link
Contributor Author

Updated to latest Snapcast Android Client v0.20.0.0.
No improvement - same behavior!

@jaedb
Copy link
Owner

jaedb commented Jun 22, 2020

@jojo141185 thanks again for the screen capture, very helpful.
I notice you're using... Mandriva? Have you tried accessing Iris from another OS? Is the issue present there as well? Do you notice any errors in your developer console (F12)?

@jojo141185
Copy link
Contributor Author

jojo141185 commented Jun 22, 2020

@jaedb No, the client I used to record the screen capture runs on Ubuntu 20.04 with Firefox 77.0.1 (64-bit).
Currently Iris + Mopidy are running in a docker container on Ubuntu Server 18.04. Before re-installing the machine I had both running in python venv.
The behaviour is the same on all clients (Windows, Ubuntu, Android, ...) with different browsers (Firefox, Edge, Chrome, ...).
On Firefox I can catch the following css errors - but only on the first (re-)loading [ctrl +F5]:

[HTTP/1.1 200 OK 116ms]
19:27:15.321
Unbekannte Eigenschaft 'appearance'.  Deklaration ignoriert. app.min.css:2:14
19:27:15.322
Unbekannte Eigenschaft '-moz-osx-font-smoothing'.  Deklaration ignoriert. app.min.css:85:234324
19:27:15.327 Name einer Medienfunktion erwartet, aber '-o-min-device-pixel-ratio' gefunden. app.min.css:85:536687
19:27:15.327 Name einer Medienfunktion erwartet, aber 'min-device-pixel-ratio' gefunden. app.min.css:85:536735
19:27:15.327 Name einer Medienfunktion erwartet, aber '-o-min-device-pixel-ratio' gefunden. app.min.css:85:536998
19:27:15.327 Name einer Medienfunktion erwartet, aber 'min-device-pixel-ratio' gefunden. app.min.css:85:537046
19:27:15.327 Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:538536
19:27:15.327 Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:538713
19:27:15.328 Unbekannte Pseudoklasse oder Pseudoelement '-ms-input-placeholder'.  Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:546956
19:27:15.328 Unbekannte Pseudoklasse oder Pseudoelement '-ms-input-placeholder'.  Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:547294
19:27:15.329
Fehler beim Verarbeiten des Wertes für 'animation-delay'.  Deklaration ignoriert. app.min.css:85:560659
19:27:15.329
Fehler beim Verarbeiten des Wertes für 'animation-delay'.  Deklaration ignoriert. app.min.css:85:561084
19:27:15.330
Unbekannte Eigenschaft '-moz-osx-font-smoothing'.  Deklaration ignoriert. app.min.css:85:735779
19:27:15.331 Unbekannte Pseudoklasse oder Pseudoelement '-ms-thumb'.  Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:737162
19:27:15.331
Fehler beim Verarbeiten des Wertes für '-webkit-appearance'.  Deklaration ignoriert. app.min.css:85:738399
19:27:15.331 Name einer Medienfunktion erwartet, aber '-o-min-device-pixel-ratio' gefunden. app.min.css:85:746853
19:27:15.331 Name einer Medienfunktion erwartet, aber 'min-device-pixel-ratio' gefunden. app.min.css:85:746924
19:27:15.331 Name einer Medienfunktion erwartet, aber '-o-min-device-pixel-ratio' gefunden. app.min.css:85:748055
19:27:15.331 Name einer Medienfunktion erwartet, aber 'min-device-pixel-ratio' gefunden. app.min.css:85:748126
19:27:15.332 Name einer Medienfunktion erwartet, aber '-o-min-device-pixel-ratio' gefunden. app.min.css:85:748738
19:27:15.332 Name einer Medienfunktion erwartet, aber 'min-device-pixel-ratio' gefunden. app.min.css:85:748809
19:27:15.332 Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:758323
19:27:15.332 Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:759085
19:27:15.333 Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:759846
19:27:15.333 Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:760618
19:27:15.333 Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:761361
19:27:15.333
Fehler beim Verarbeiten des Wertes für 'animation-delay'.  Deklaration ignoriert. app.min.css:85:766635
19:27:15.334
Fehler beim Verarbeiten des Wertes für 'animation-delay'.  Deklaration ignoriert. app.min.css:85:769498
19:27:15.334 Name einer Medienfunktion erwartet, aber '-o-min-device-pixel-ratio' gefunden. app.min.css:85:770102
19:27:15.334 Name einer Medienfunktion erwartet, aber 'min-device-pixel-ratio' gefunden. app.min.css:85:770173
19:27:15.334
Unbekannte Eigenschaft 'pointer'.  Deklaration ignoriert. app.min.css:85:776799
19:27:15.335
Fehler beim Verarbeiten des Wertes für 'white-space'.  Deklaration ignoriert. app.min.css:85:783486
19:27:15.336 Regelsatz wegen ungültigem Selektor ignoriert. app.min.css:85:800456
19:27:15.336
Fehler beim Verarbeiten des Wertes für 'justify-items'.  Deklaration ignoriert. app.min.css:85:807946
19:27:15.336
Fehler beim Verarbeiten des Wertes für 'animation-delay'.  Deklaration ignoriert. app.min.css:85:809027

I don't think these errors are connected to the problem.

@jaedb
Copy link
Owner

jaedb commented Jun 23, 2020

I'll be honest, I have no clue why this isn't working for you. I've tried Mac, Windows and Mandriva with the mainstream browsers and all appear to be working as expected.

The errors you mention in the console output above all refer to CSS issues (and browser support prefixes) so shouldn't be involved.

The fact that the client volume updates shows that the Snapcast websocket is working properly, which would be my first port of call. So clearly the volume changes are being broadcast and received correctly. The next step is the volume change triggering a state change in the Iris app, which also clearly works.

The group volume is simply an average of the client volumes, calculated on render of the SnapcastGroup component. So the issue should be very easily replicated, but it is not.

Is the issue across all of your Snapcast groups? Or one group in particular?

jojo141185 added a commit to seppi91/Iris that referenced this issue Aug 9, 2020
* Display general Spotify error messages that are provided by API

* Calculating group volume on render rather than on load, fixes jaedb#534

* Removing group when last client is removed from it

* Properly cancellable processes; Playlists that refuse to load tracks

* Removing data_dir in favor of Extension.get_data_dir, jaedb#547

* Creating SearchResults component

* Search results grid layout; Tracklist

* Clearable search results

* Ditching thumbnail glow on mobile - performance suffering too much

* Play/queue actions on playlist save tracks to index for faster reuse

* Fixing context menu trigger silencing; Search form polish

* Letter spacing

* Fixing theme tweaks; Fixing prefers-color-scheme of false, resolves jaedb#549

* Buildout

* Black and flake fixups (still no check_manifest working reliably)

* Removing old helpers

* Fill prop for thumbnails on Queue and Artist for large screens

* Getting a feel for desired multi-language approach jaedb#424

* Language as window.language for access in pure function

* Exposing components for translation mapping; Queue and AAlbum views now moved to translation file

* Renaming Content to I18n to avoid naming clashes; Artist and Debug views mapped

* Mapping Playlist view

* Clickable flags; Adding links to version release notes

* Merging into main dev stream

* Mapping all remaining views - just modals and components to go

* All views done this time; Language file mapping for modals.. Will need to do destructuring in second sweep

* Halfway through modals mapping

* Final components done, dynamic language selector

* Adding error boundary around Notifications to catch issues like jaedb#565

* Responsive for < 350px devices, fixes jaedb#532

* Prod buildout

* Correcting snapcast config and path

* Updating with corrected Snapserver config file path

* Mobile polish; Performance experimentation; Loader screen; ; Minor code bugs

* Previewing items to add, in prep for random selection (jaedb#546)

* Fixing library URI setting (destructuring), possibly related to jaedb#571

* Adding generic loadItem (refactor elsewhere); Adding foundation for Add Random

* Modal detection through less-than-ideal jQuery

* Add to queue random functional

* Adding jest coverage

* Added sv.yaml

This is the first version of a Swedish translation for Iris.

* Upgrading jest

* Add German translations

* Upgrading to Babel 7; Fixing failing tests

* Disable lifecycle methods

* Buildout

* 3.51 buildout

* Adding jest to ci jobs

* Adding Code Climate coverage reporter

Co-authored-by: James Barnsley <[email protected]>
Co-authored-by: el97 <[email protected]>
Co-authored-by: Fabian Dennler <[email protected]>
@jojo141185
Copy link
Contributor Author

jojo141185 commented Aug 14, 2020

Updated to version 3.51.0 yesterday. The problem is fixed now :)
@jaedb Thanks James, for your continued support and your great work here. Iris is a masterpiece!

jojo141185 added a commit to seppi91/Iris that referenced this issue Aug 22, 2020
* Display general Spotify error messages that are provided by API

* Calculating group volume on render rather than on load, fixes jaedb#534

* Removing group when last client is removed from it

* Properly cancellable processes; Playlists that refuse to load tracks

* Removing data_dir in favor of Extension.get_data_dir, jaedb#547

* Creating SearchResults component

* Search results grid layout; Tracklist

* Clearable search results

* Ditching thumbnail glow on mobile - performance suffering too much

* Play/queue actions on playlist save tracks to index for faster reuse

* Fixing context menu trigger silencing; Search form polish

* Letter spacing

* Fixing theme tweaks; Fixing prefers-color-scheme of false, resolves jaedb#549

* Buildout

* Black and flake fixups (still no check_manifest working reliably)

* Removing old helpers

* Fill prop for thumbnails on Queue and Artist for large screens

* Getting a feel for desired multi-language approach jaedb#424

* Language as window.language for access in pure function

* Exposing components for translation mapping; Queue and AAlbum views now moved to translation file

* Renaming Content to I18n to avoid naming clashes; Artist and Debug views mapped

* Mapping Playlist view

* Clickable flags; Adding links to version release notes

* Merging into main dev stream

* Mapping all remaining views - just modals and components to go

* All views done this time; Language file mapping for modals.. Will need to do destructuring in second sweep

* Halfway through modals mapping

* Final components done, dynamic language selector

* Adding error boundary around Notifications to catch issues like jaedb#565

* Responsive for < 350px devices, fixes jaedb#532

* Prod buildout

* Correcting snapcast config and path

* Updating with corrected Snapserver config file path

* Mobile polish; Performance experimentation; Loader screen; ; Minor code bugs

* Previewing items to add, in prep for random selection (jaedb#546)

* Fixing library URI setting (destructuring), possibly related to jaedb#571

* Adding generic loadItem (refactor elsewhere); Adding foundation for Add Random

* Modal detection through less-than-ideal jQuery

* Add to queue random functional

* Adding jest coverage

* Added sv.yaml

This is the first version of a Swedish translation for Iris.

* Upgrading jest

* Add German translations

* Upgrading to Babel 7; Fixing failing tests

* Disable lifecycle methods

* Buildout

* 3.51 buildout

* Adding jest to ci jobs

* Adding Code Climate coverage reporter

Co-authored-by: James Barnsley <[email protected]>
Co-authored-by: el97 <[email protected]>
Co-authored-by: Fabian Dennler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed A bug that has successfully been replicated and can be resolved
Projects
None yet
Development

No branches or pull requests

2 participants