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

[1337sup3rh4x0r]96_Snapcast.pm hang after multi client update response #11

Open
thecb1 opened this issue Sep 3, 2018 · 1 comment
Open

Comments

@thecb1
Copy link

thecb1 commented Sep 3, 2018

Error

FHEM hangs after
Not a HASH reference at ./FHEM/96_Snapcast.pm line 247.
when an API response with multiple clients is received

Reproduce

snapdroid lets you set the volume of groups with >1 clients with a single slider. It concats the client update requests into one string. The API call looks like
[{"id":8,"jsonrpc":"2.0","method":"Client.SetVolume","params":{"id":"b8:27:eb:ab:24:32","volume":{"muted":false,"percent":50}}},{"id":8,"jsonrpc":"2.0","method":"Client.SetVolume","params":{"id":"08:60:6e:80:80:4c","volume":{"muted":false,"percent":50}}}]
The response from the server looks like this
[{"jsonrpc":"2.0","method":"Client.OnVolumeChanged","params":{"id":"08:60:6e:80:80:4c","volume":{"muted":false,"percent":88}}},{"jsonrpc":"2.0","method":"Client.OnVolumeChanged","params":{"id":"b8:27:eb:ab:24:32","volume":{"muted":false,"percent":81}}}]

This is where i get the error above.

@1337sup3rh4x0r
Copy link
Contributor

Ok, I see what you mean now.
To be honest I am rarely using the android app so I have never tested this. I guess for this the json parsing part in the module would have do be adjusted.
I currently don't have the time to dive into that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants