Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Feature requests & roadmap / Re: Alexa and amazon echo skill
« Last post by garagevibes on December 06, 2016, 08:48:19 pm »
Haha hilarious it just so happens thats the exact oauth2 server scripts I've been using anyway so should be quite simple to change over to this and my steps to add in the database tables wont be needed either.

I'll just have to change some of the required paths, Ill give this a go and see how i get on once thats done ill upload all the code. I haven't contacted polly yet for a git account ill do that in a min.

cheers all.
22
Feature requests & roadmap / Re: Alexa and amazon echo skill
« Last post by golgoj4 on December 06, 2016, 06:34:57 pm »
link to code?
23
Feature requests & roadmap / Re: Alexa and amazon echo skill
« Last post by phenigma on December 06, 2016, 06:12:52 pm »
Okay the OAuth2 implementation that was chosen some time ago is described here: https://bshaffer.github.io/oauth2-server-php-docs/cookbook/

I believe the appropriate files are all packaged into the lmce package 'lmce-oauth2-server'.  "apt-get install lmce-oauth2-server" on a core.

This will install the OAuth2 files in /var/www/lmce-admin/include/OAuth2/ and two files "oauth2-server.php" and "oauth2-token.php" in /var/www/lmce-admin/.  When the package installs it creates the database and the appropriate tables.

That's as far as that has made it.  Anything can change as far as configs, etc.

J.
24
Feature requests & roadmap / Re: Alexa and amazon echo skill
« Last post by phenigma on December 06, 2016, 05:42:44 pm »
Awesome stuff!  I think you're right in line with conversations in the irc dev channel!  I'll get you some more info and a git account if polly/ochorocho hasn't been able to yet.  Send me a PM with your name/username/email and I'll get an account up.

Thanks!

J.

Sent from my Nexus 5 using Tapatalk

25
Feature requests & roadmap / Re: Alexa and amazon echo skill
« Last post by garagevibes on December 06, 2016, 05:32:36 pm »
Thanks guys for getting back to me, Yes phenigma if you could send over the details of the LMCE oauth2 server details ill get it integrated into that and ill ask polly for some git login details so I can store the code there.

I've created an interface for a central web api portal which is used an intermediate for web services to connect to so for the moment the system works a bit like the quick diagram I've attached.

So there are basically 2 Oauth2 servers in use 1 on the core and 1 one this new web portal the idea being that a number of different web services can connect through the same web portal and it will route the messages to the correct users core and a user can break the chain at either end at any point if they ever need to, this means also that any app we produce can hopefully be released in to the public store's.

Looking on the amazon developer console I believe i can add people as developers to my account if I have there email address so they can add the skill for testing and view the code behind it, the web portal site is simply a router I wanted to keep all the api itself on each users core so that updates and things will stay as they are and hopefully the site will never have to change.

Ive had the idea of including alexa as a voice service as well but thats another task once I have this one solved :)
                                 
26
Feature requests & roadmap / Re: Alexa and amazon echo skill
« Last post by phenigma on December 06, 2016, 04:37:27 pm »
I'll pass on the existing LMCE OAuth2 information when I get home later today.  You will be the first to use it so it is very likely to not be completely set up properly.  I will leave it to you to let me know what needs to be changed/altered in gitlab issues.  Thanks for this!

The other thing that we're going to need to look at is setting up a proper LMCE interface with Alexa.  I understand you have created some 'skills' or whatever they are called on the Amazon side and we'll need to get an official LMCE setup with Amazon.  We can discuss this more as we go forward.

My intent is to implement Alexa on the RPi for use with LMCE, although my time is split between a whole lot of things.

Thanks again!  Don't forget to get some git credentials and we'll setup a branch to store this stuff in.

J.
27
Feature requests & roadmap / Re: Alexa and amazon echo skill
« Last post by posde on December 06, 2016, 02:33:18 pm »
Great news! Check with polly here on the forum to get some git credentials. We don't want to loose stuff.
28
Feature requests & roadmap / Re: Alexa and amazon echo skill
« Last post by garagevibes on December 06, 2016, 11:28:15 am »
So last night the magic happened 8)
I had Alexa discovering all my lighting devices from my core, added them to the Alexa app and more importantly spent the night pissing off my family by repeatedly requesting Alexa to turn my living room lights on, off and up and down. It was amazing.

Now i need to tidy up my code mess along the way and strengthen the oauth2 server I added to my core as at the moment for testing there is no password or anything to authorise which kind of defeats the point but I note phenigma that you said we now have one already on LinuxMCE? I've updated and I cant see any sign of one? I'm happy to use the one built in one though I mean who whats 2? :) its a basic web standard so should require no more than a url change in my code to switch anyway.

At the moment I've only linked in lights but over the next few days ill try and add thermostats and scenarios although I only have a z-wave boiler control not a thermostat so may be in the dark a bit there so may need some help to test.

I'm excited about scenarios but I've read that amazon will only allow up to 12 "scenes" as they call them to be discovered which may be a pain.

Ive tried my best to make the api as simple and flexible as possible and not have it only for Alexa but indeed any web service its a bit rough at the moment so will probably no doubt need changes and tweaks that I'm sure all you guys on here can offer advice and assistance on.

At the moment because I'm using my own oauth2 server on the core the interface requires the following:
  • A small folder of web pages to be placed in the  /var/www/lmce-admin folder on your core.
  • The creation of 7 small mySQL tables to handle the access tokens ect.
  • A SSL cert but it can be self signed we just want an encrypted connection for security - I think this is now done by default anyway.?
  • Allow remote access to the web admin via https on the standard port and ensure you can then access your web admin from the web.
  • An Alexa enabled product and the Alexa app
Note also that the intermediate site I've built will store your cores IP address and the required access tokens there is no way around this as I said before this site should i believe be stored on this linuxmce.org domain securely but for the moment I have it on a test site I can promise you Im not interested in accessing your core, but at the moment this is the only way I can see it being possible, you still have full control of the outh server on your core and revoke all access at any point.

So anyway I guess the fun question is once I've ironed out the few bits today who has a system they don't mind playing with that wants to test this?
29
Can you pastebin the output of the following on your 1204 core:
Code: [Select]
apt-cache policy lmce-md-metaJ.
30
New lmce packages were pushed to our repo, no idea why you wouldn't be seeing them off the top of my head.

Sent from my Nexus 5 using Tapatalk

Pages: 1 2 [3] 4 5 ... 10