dvdgeisler / DirigeraClient

Dirigera Client API: Java written client API to interface IKEA's new smarthome hub DIRIGERA
MIT License
74 stars 9 forks source link

WIP: Feature/add speaker device #45

Closed TheMrBooyah closed 1 year ago

TheMrBooyah commented 1 year ago

Started to implement the speaker device. No clue yet on how to implement starting playback on them. Maybe if you have an idea?

dvdgeisler commented 1 year ago

I guess you may control the playback using the SpeakerStateAttributes.playback field. In the IKEA app I found the following enum constants:

public enum PlaybackState {
        IDLE,
        PLAYING,
        PAUSED,
        NEXT,
        PREVIOUS,
        BUFFERING
}

IDLE proly corresponds to the "playbackIdle" state then. Thus, the enums are look like to be serialized according to the pattern "playbackX". I will give it a try and push the changes here.

TheMrBooyah commented 1 year ago

Yeah I guessed that would be the case. Just don't know what the gateway accepts in the playback field. I suppose all music services