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

Add additional commands #139

Closed
sebbo2002 opened this issue Apr 6, 2021 · 2 comments
Closed

Add additional commands #139

sebbo2002 opened this issue Apr 6, 2021 · 2 comments

Comments

@sebbo2002
Copy link
Contributor

Thank you for this great library. While testing the library, I noticed that some commands are still missing that I currently use in my home automation. As far as I can see, these are currently:

Was there a reason for this or was it simply not needed until now? Otherwise, I would try to make a pull request for this at the weekend, if that's okay. Is there anything I should bear in mind?

@svrooij
Copy link
Owner

svrooij commented Apr 6, 2021

Hi @sebbo2002 those commands are not missing 😉. They just don't have a shortcut (yet), you can call them by sending an advanced command which lets you call all the sonos service commands

The AddMember and RemoveMember calls can also be accomplished by joingroup and leavegroup, or do I miss something being different with the AddMember/RemoveMember, never used those myself.

If you want you can add them to the shortcut commands (to call them more quickly), in that case:

  1. Add the lowercase command name here (mind alphabetic order)
  2. Add the mapping to the sonos command here (mind alphabetic order)
  3. And please document them here (pick matching emoji 😛)

And it really helps a lot if you start from the beta branch and also send the PR to the beta branch. That way I can accept the pr without going to my computer and doing some merge magic.

The first command for instance can be controlled by sending the following to topic sonos/uuid_of_speaker/control:

{
  "command": "adv-command",
  "input": {
    "cmd": "DevicePropertiesService.SetLEDState",
    "val": {
      "DesiredLEDState": "On"
    }
  }
}

@sebbo2002
Copy link
Contributor Author

I have made a PR (#140) for the shortcuts, I hope it's fine for you. I haven't had a chance to test the whole thing yet, I also somehow overlooked joingroup and leavegroup when I quickly looked through them. Thanks for that.

I'll close the issue for now, but if I run into any problems while testing, I'll get back to you. Thanks for your work and this great library 🎉

svrooij pushed a commit that referenced this issue Apr 10, 2021
- SetLEDState
- SetButtonLockState
- SetNightmode
- SetBass
- SetTreble
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants