Saturday, December 16, 2017

Test v0.1.2

I released test version 0.1.2 to a limited number of signed-up testers yesterday. The main focus was to determine if the major issues with the previous test round had been resolved, so I wanted to limit to a few who had experienced those issues.

The good news is that, yes, the significant issues that prevented the plugin working and, in fact broke, some LMS installs completely ( :-O ) are now resolved. Indeed, a couple of testers actually managed to get the whole thing working and controlled squeezeboxes by voice. Success.

Of course, that success is tempered by bugs but at least they're the solvable, pliant kind of bugs, not the 'OMFG it's destroyed everything, including the neighbours house' kind of bugs.

The project is also sparking some interesting discussions around security and community development that are areas I haven't been very involved in before so a lot of learning going on as well.

 

A Few Solutions....

Composing yesterdays post, I was frustrated. Nothing was working and my newbie perl abilities were letting me down.

I decided to stop developing and start reading. I browsed through the developer section at forums.slimdevices.com, looking out for discussions that were relevant to my problems and might make more sense now that I'm several months into my perl career.

I few discussions rang some bells and some pointers were noted. The overriding impression I took away was that I needed to be working with the LMS, not against it. I'd been trying to shoehorn a http server running in a background process using external libraries. But what if I could leverage the LMS to manage a lot of this?

Bingo! In a couple of hours today, I got a http daemon running under the Slim::Networking::Select loop using addRead. No more background process voodoo required. It's a quick and dirty implementation right now but it behaves impeccably; no conflicts and no shutdown problems - and it works on Windows and Linux. Yay!

There's a bit more to do - I need to manage the stop and restart of the server if the user changes port or elects to switch it off, but that should be reasonably straightforward. There's also http client support inside LMS itself, maybe with HTTPS capabilities. Who knew??

I really feel that I'm making progress, which is good news!

 

A Few Issues...

Hmm. This is not easy.

One of the main issues arising from user testing on v0.1.1 was the fact that the LMS plug-in was not shutting down properly and thus locked LMS and prevented it from closing cleanly.

Looking into this in more detail, I found the that perl HTTP::Daemon was misbehaving and refusing to stop when asked politely. I changed to the Mojolicious Mojo::Server running as a deamon and this appeared to be much better behaved, facilitating clean LMS shutdowns.

In testing prior to release, however, it seems that's another issue raising it's head: the http daemon seems to be interfering with squeezebox connections to the LMS.

Read more: A Few Issues...

Test v0.1.0 / 0.1.1

The first test version of the skill went out on the Teamwork portal this week. Results were both good and bad.

The positives were that there's a really great team of testers involved with all levels of technical ability which really helps in finding both technical and usability issues. Everyone who tested is very engaged with great feedback and helpful suggestions.

The negative is that, at the moment, it doesn't really work :-(

Read more: Test v0.1.0 / 0.1.1

Verifying Alexa

Working through the Alexa Skill code in node-red, I discovered that there are fairly onerous requirements for verifying the origination of skill requests from Amazon. I looked at a few options but the easiest seems to be node-red-contrib-alexa-verifier which is a wrap of the JS alexa-verifier.

Initially, this doesn't seem to do much but when I attempt to pass a faked call to the skill code from postman, it's rejected with a 401 unauthorized status and a helpful description of the reason. This is good news as it's another hurdle down on the road to eventual certification.

 

 

 

Login Form

About Hab-Tunes

Hab-Tunes is an in-development skill for the Amazon Echo that allows voice control of Squeezebox devices. This site is intended to document the skill development and help give some idea of progress.

Follow Updates

Search #habtunes on twitter

Want to Help?

If you can contribute time, skills or ideas, find out how you can get involved.

Cron Job Starts