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 get/set LED state commands to player #89

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wiegraff13
Copy link
Contributor

Adds the ability to get and set the LED state of a player.

@jishi
Copy link
Owner

jishi commented Jul 21, 2016

What is the use case for the getLED method? I usually don't implement polling actions for data that is evented, but rather keep that info as state. I don't remember if led state is evented though

@wiegraff13
Copy link
Contributor Author

wiegraff13 commented Jul 21, 2016

The system we are using this in has a blink command so that users may quickly determine what device they are talking to. Our blink implementation for the Sonos is to toggle the LED a couple times. In order to ensure we leave the LED in the same state it was pre-blink, we must first get its state.

I don’t think the LED state is gettable via events. Looking at the upnp XML for my Sonos, LEDState has sendEvents set to no.

@jishi
Copy link
Owner

jishi commented Jul 24, 2016

The data can still be evented by another property, that is the case with AVTransport events, all of them are sent as part of LastChange, not individually. But DeviceProperties doesn't have a LastChange, so you maybe right.

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

Successfully merging this pull request may close these issues.

2 participants