sarkonovich / Alexa-Hue

Control Hue Lights with Alexa
131 stars 28 forks source link

Better skill instructions #1

Closed shunopoli closed 9 years ago

shunopoli commented 9 years ago

Can you post a more descriptive instructions on setting up the skill? Having issues on what exactly to enter on slot type

sarkonovich commented 9 years ago

I will do that.

There are three files you need for setting up the skill in the developer portal: intent_schema.txt, sample_utterances.txt, and custom_slots.txt.

For the custom slots, you need to create a custom slot for all the values in that file (LIGHTS, ATTRIBUTE, COLOR, etc.) For the values in the LIGHTS custom slots, just replace the examples I gave ("bedroom lights", etc) with the names of your own lights and groups. Remember, for a single light the value should be "example light" and for a group of lights the value should be "example lights".

Hope that helps...

Steve

On Sun, Oct 18, 2015 at 3:15 PM, Jarren Oliphint notifications@github.com wrote:

Can you post a more descriptive instructions on setting up the skill? Having issues on what exactly to enter on slot type

— Reply to this email directly or view it on GitHub https://github.com/sarkonovich/Alexa-Hue/issues/1.

shunopoli commented 9 years ago

Ok I think that's where I made the mistake. So I will need multiple slots for each value. Cause I think the way I did was you had all the examples in one txt file put couldn't define the all the values.

shunopoli commented 9 years ago

Ok I get it know. Appreciate the quick responses. One more question. Do I need add slots of the AMAZON.LITERAL?

sarkonovich commented 9 years ago

Jarren,

No, you don't (and you can't.)

I see why what I said was confusing. Yes, for each item in the custom_slots.txt (LIGHTS, SCENES, LEVEL, etc) you'll need to create a custom slot type, and fill it in with the appropriate values (either the ones I supplied for generic values like those in LEVEL, or your own values for SCENES and LIGHTS.)

Let me know if you get it working!

Steve

On Tue, Oct 20, 2015 at 10:53 AM, Jarren Oliphint notifications@github.com wrote:

Ok I get it know. Appreciate the quick responses. One more question. Do I need add slots of the AMAZON.LITERAL?

— Reply to this email directly or view it on GitHub https://github.com/sarkonovich/Alexa-Hue/issues/1#issuecomment-149646952 .

shunopoli commented 9 years ago

Hey appreciate your help. Had a pain on trying to determine the version of ruby. So I have it everything as far it accepting my commands and forwarding over to sinatra, but getting a ssl error OpenSSL::SSL::SSLError - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed:

Do you know why?

sarkonovich commented 9 years ago

On Tue, Oct 20, 2015 at 4:41 PM, Jarren Oliphint notifications@github.com wrote:

OpenSSL::SSL::SSLError - SSL_connect returned=1 errno=0 state=SSLv3

Hmm. Not exactly. Are you communicating with an HTTPS server anywhere? Somewhere, you are being presented with an SSL certificate...that's the problem. But I don't know why. Is your route Lambda Passthrough -> ngrkok tunnel -> sinatra server?

Steve

shunopoli commented 9 years ago

It has something to do with the ruby version. I only can get the "ruby app.rb" to run if i use 2.2.1. There is appears to be an SSL bug with that version and was trying different workarounds. When I just to run app.rb with other version I get a syntax errors

sarkonovich commented 9 years ago

On Tue, Oct 20, 2015 at 5:26 PM, Jarren Oliphint notifications@github.com wrote:

There is appears to be an SSL bug

Hmm. Sorry it's such a pain. Yes, it does required a recent version of Ruby. But I don't know what the SSL thing is. (I'm also running 2.2.1)

What do you get if you run this from the command line:

ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'

steve

sarkonovich commented 9 years ago

You could also try to use an earlier version of ruby with with the file enclosed. (I'm guessing that all the syntax errors have to do with alexa_objects.rb and the hash format.

Steve

On Tue, Oct 20, 2015 at 5:31 PM, Steven Arkonovich sarkonovich@gmail.com wrote:

On Tue, Oct 20, 2015 at 5:26 PM, Jarren Oliphint <notifications@github.com

wrote:

There is appears to be an SSL bug

Hmm. Sorry it's such a pain. Yes, it does required a recent version of Ruby. But I don't know what the SSL thing is. (I'm also running 2.2.1)

What do you get if you run this from the command line:

ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'

steve

shunopoli commented 9 years ago

/etc/openssl/cert.pem is in that location. What file attached not seeing anything.

sarkonovich commented 9 years ago

Hmm. Sounds like some weird install problem. Are you running OSX? This might be of some help????

http://toadle.me/2015/04/16/fixing-failing-ssl-verification-with-rvm.html

Steve

On Tue, Oct 20, 2015 at 6:24 PM, Jarren Oliphint notifications@github.com wrote:

/etc/openssl/cert.pem is in that location. What file attached not seeing anything.

— Reply to this email directly or view it on GitHub https://github.com/sarkonovich/Alexa-Hue/issues/1#issuecomment-149752327 .

sarkonovich commented 9 years ago

And a final thought. I hope something works!

https://gemfury.com/help/could-not-verify-ssl-certificate

On Tue, Oct 20, 2015 at 6:52 PM, Steven Arkonovich sarkonovich@gmail.com wrote:

Hmm. Sounds like some weird install problem. Are you running OSX? This might be of some help????

http://toadle.me/2015/04/16/fixing-failing-ssl-verification-with-rvm.html

Steve

On Tue, Oct 20, 2015 at 6:24 PM, Jarren Oliphint <notifications@github.com

wrote:

/etc/openssl/cert.pem is in that location. What file attached not seeing anything.

— Reply to this email directly or view it on GitHub https://github.com/sarkonovich/Alexa-Hue/issues/1#issuecomment-149752327 .

shunopoli commented 9 years ago

Got it to work. Your link worked thanks. Now I have to figure out the group things. Cause it changes all lights not just the group. Does this look for the the group names that you have setup in your echo app?

sarkonovich commented 9 years ago

Great! So, what was the problem, exactly? Did you need to update the certs?

It will (it should!) work with the groups that are listed on the Hue Bridge, that is, the ones that you set up in the Hue app. I'm not sure if the echo app actually creates groups on the bridge or not.

To see all the info about your bridge that the app should work with (groups, scenes, lights) you can do the following. In the terminal

  1. Install pry: gem install pry (this isn't strictly necessary, but it's easier to see the information if pry is installed.)
  2. Run pry: pry
  3. Inside of pry type the following require 'hue_switch' s = Switch.new

(You could skip step 1. and in step 2. type: irb. Step 3. will work, but the information will be presented in one long mess...)

You should get a list of all sort of information. (Or, you'll get a message saying to press the button on your bridge.) Once you see all the info, you should be good to go.

Steve

On Tue, Oct 20, 2015 at 7:42 PM, Jarren Oliphint notifications@github.com wrote:

Got it to work. Your link worked thanks. Now I have to figure out the group things. Cause it changes all lights not just the group. Does this look for the the group names that you have setup in your echo app?

— Reply to this email directly or view it on GitHub https://github.com/sarkonovich/Alexa-Hue/issues/1#issuecomment-149765808 .

shunopoli commented 9 years ago

I didn't need to update the certs. I followed the guide on installing ruby like this "rvm install 2.2.0 --disable-binary" I guess having rvm install actually compile the binary works. Kinda of strange if you ask me. Ok I will check that information when I get home. I appreciate the help and was actually not expecting any response on this.

I just don't understand why the native echo app has yet to implement any color changing or scene features.