I've got the bones of an Alexa skill and companion LMS plug-in up and
running. Hopefully I'll get to record a video demo over the weekend and
people can let me know if they think it's worth progressing.


Right now, it only supports the following commands;

Alexa, tell Squeeze Server to register*
-Registers the user in the skill database

Alexa, ask Squeeze Server for my User ID
-Sends your Amazon skill user ID as a card to the Alexa App. You need to
enter this in the companion LMS plug-in to connect everything up.

Alexa, ask Squeeze Server to list devices
-Returns an enumerated list of of players currently connected to your
LMS

Alexa, tell Squeeze Server to select device (by number or by name)
-Gets the skill to tag one device as selected. Future commands will be
carried out on that device so it's not necessary to specify the player
each time

Alexa, tell Squeeze Server to play (device number / device name)
-Causes the previously selected or nominated device to play

Alexa, ask Squeeze Server to pause (device number / device name)
-Causes the previously selected or nominated device to pause



*To allow Alexa access your LMS, there are a few requirements;

-There must be access to your LMS port 9000 from the internet. This will
likely be achieved via port forwarding on your router
-I've written an LMS plug-in that allows you specify your public IP
address and port which the skill can use to access your LMS
-This information is saved in a skill-specific database, associated with
your Amazon User ID for the skill. You must also register your UID via
the plug-in
-I appreciate people might have concerns about sharing this info. That's
why I'd like to share at this early stage. However, note that the amazon
UID is unique to the specific skill and cannot be used to identify users
either across skills or in a general sense. 
-For those that don't have a fixed IP address, the plug-in supports
dynamic IPs as well :-)



A typical set-up and getting started process would be as follows;

-Add the Skill to your echo
-say "Alexa, ask Squeeze Server to register"
-say "Alexa, assk Squeeze Server for my user ID"
-Retrieve the user ID from the ALexa app
-Install the Alexa plug-in in the LMS
-Enter your publicly accessible IP address and port number in the
plug-in along with your user ID, retrieved above

Provided that the specified port is mapped to your LMS port 9000, you're
now ready to go.

-say "Alexa, tell Squueze Server to list my devices"
----alexa responds with something like "There are 3 players: Player 1,
'Kitchen' is connected.  Player 2, 'Squeezebox Touch' is connected. 
Player 3, 'Squeezebox Radio' is connected."
-say "Alexa, tell Squeeze Server to select player 1"
----alexa responds with something like "Player Kitchen is now selected"

-say "Alexa, tell Squeeze Server to play" 
----alexa will cause the currently selected player (Kitchen) to play
-say "Alexa, tell Squeeze Server to play on the Touch"
----this will cause Alexa to start the Touch playing, and store it as
the currently selected player
-say "Alexa, tell Squeeze Server to pause"
----this will cause the touch (as the currently selected player) to
pause.

This is fairly rudimentary right now but it's intended as a proof of
concept and an attempt to see how accessible the CLI might be.


A few queries & comments;

What's the best name for the skill? Amazon guidelines dictate that it
cannot be one word. 'Alexa, ask LMS to...' is a bit clunky. Suggestions
appreciated.

Once something is playing, it will hopefully be possible to bypass the
'ask squeeze server' for commands such as Pause, Resume, Next, Previous,
ShuffleOn, ShuffleOff as the skill implements the audio player
interface.

The way Alexa works, it's not possible to specify a free-form element
for selecting a device by name. I've implemented the enumerated device
approach so it would be possible to issue commands like 'Alexa, tell
Squeeze Server to play device one'. I have implemented a fuzzy text
search using levenshtein distance to determine the match scoring. This
works surprisingly well and the skill will do a good job of matching
what the users says to a player name for the list. (she tends to select
something rather than nothing). To make this work better, I've toyed
with the idea of automatically collecting skill user device names and
storing them to add to future versions of the skill to help improve
accuracy. (this would be enabled/disabled by users in the plugin). I was
wondering what people would think of this idea?

What would be the top priority commands people would like to see? The
current proof of concept uses the LMS http interface via JSON and
therefore has access to the full set of CLI commands. However, there's a
good deal of time required to implement, debug, test and polish each one
so if I'm moving ahead with this, I'd like to start with a  useful
sub-set and build from there.

Up to 10 enumerated devices are currently supported. Is this enough?

If anyone is interested, I'd be happy to havve a few testers. As it's a
skill in development at the moment, you'd need to have an amazon
developer account. I can associate up to 5 (I think) accounts with my
own which would allow the skill to be shared. Let me know.


------------------------------------------------------------------------
meep's Profile: http://forums.slimdevices.com/member.php?userid=12744
View this thread: http://forums.slimdevices.com/showthread.php?t=106149

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to