Congrats! I was thinking about a Connect Amp at some point, for another room, so let me know how well it works for you.
What is clearly missing is some basic controls on the Sonos device. We have none and everything has to be done through scenes.
Yeap. Making the UI pieces, and ensuring they work under both UI4 and UI5 is quite an art. My focus for the moment is on getting the API's in, and cleaning up the code.
If folks want to revamp the UI, then I’m sure @anker would be up for providing access to do that.
I tested with successl in scenes: Mute (Sonos1 service), UnMute (Sonos1 service), SetVolume (Sonos1 service), Pause (AvTransport service), Next (AvTransport service), Previous (AvTransport service).
Most of the Sonos1 services now have standard UPnP counterparts. It may be worth using them in some of the cases. Longer term, with @anker's approval, I'd like to put some of the Sonos1 services on an obsolescence track - mostly where they have a direct overlap with a standards-based API call.
This would likely start by simply making them in the UI, so that people know not to use them.
What could be difficult, even very difficult, for normal users, IMHO:
- how to get the IP address of the Sonos device, I don't think it is written somewhere in the Sonos control software. You need a network sniffer to identify it...
Agreed. Not sure how to do that just yet, at least not without implementing my own device discovery... which seems a little wasteful.
- There are a lot of actions available (are they all already implemented ?), some have the same name but are available in different services. How to know which one to choose ?
- The wiki page should be updated to list all the available callbacks, whether they are implemented or not, and what they do.
The MiOS UI's drive off the information described in the service files, without consideration for what's actually implemented (action-by-action) within the Implementation file. This is unfortunate, as many of the routines cannot be implemented.
eg. The “Get*” methods cannot be implemented as MiOS has provided no way for UPnP Actions to return values (as would be required by a UPnP-compliant device) from it’s Lua stuff.
In general, the Get calls have been internally implemented in Polling calls, so that the data is available for people to use. Some of the UPnP calls for “setting” things (like saving the Playback list) also return values. Currently these are thrown away as again, there’s no way in MiOS to return the values. This part will have to be thought out more when we get to using those particular calls.
The “what they do” part is for folks to determine. There’s very little doc on any of them, so they’re going to need some experimentation. My goal was to get them all exposed, in some form, so that people could start to experiment with them.
The Sonos forum does mention quite a few of them, through use, but that information is spread widely across that forum.
Once people discover their true usage, it can be converted into appropriate sections on the code.mios.com wiki pages for the Sonos Plugin.
Identified problems:
2) After a lua engine reload in Firefox, the device does not initialize correctly: generic icon, nothing displayed in the dashboard and only the label "Device settings" in the Control tab. A Control+F5 is required in Firefox to restore icon and information.
Yeah, that "icon" is loaded from a remote site. There's a 50% chance it won't actually load. Don't know what that's about.
Guessed, do you want some help ? I would like to add some basic controls in the control tab. Is it in your TODO list ?
I will start looking the code to see if I understand it ;D
If you're up for it, the UI needs the most work, and it's definitely not my focus. I would ask that anything we do in this space is done for both UI4 and UI5 users, as we still have both (I use UI4, for example, and only code-test against UI5)
This will be limiting in some ways, but we do have some control. For example, we could use the Toggle-action on the icon to do something meaningful (like toggle Play/Pause, or Mute/NoMute, or External Input) without consuming any additional space.
Anyhow, this is probably the area with the most immediate need… unless you wanted to play with UPnP disco, which would definitely make things easier for folks to install.