Guidance for OAuth integration between myopenhab.org and my Alexa Skill

Hi,

I’ve decided to have a go at developing an Alexa Custom Skill that integrates with myopenhab.org, partly as a learning exercise but also to fulfill a need that the existing openHAB Alexa Smart Home Skill doesn’t meet. I am using openHAB to control my internet radio and there are some items that do not map very well to the Lighting and Thermostate focus of Home Skills. So my intent is to develop a Custom Skill with a rich interaction model that allows you to use Alexa to interogate your entire openHAB setup, and provides good support for all of the item types.

However to do this I need to set up OAuth account linking between my Alexa skill and myopenhab.org. I have done comprehensive searching and some trial and error, but I can’t find the correct settings to complete the OAuth integration. I’m also wondering if there’s a out-of-band registration stage that needs to be completed to authorize my Skill for OAuth with myopenhab.org.

Please could someone advise me about this and help me find the details I need to complete the OAuth integration? Given that there is an existing Alexa Skill and IFTTT already integrated, I believe what I want to do is possible, but I don’t think documentation has been produced for the integration.

Cheers.

OAuth on myopenhab is not a service you can connect arbitrary applications to. We have exchanged oauth “secrets” with IFTTT and the Alexa service to support the official apps, but do not have a management interface or other way to support something like user provided keys/tokens (for now at at least)

For development however, this is not needed to use myopenhab for access, basic authentication can be used to access REST resources.

Also not sure if you have seen other projects like https://github.com/arch1v1st/alexa-ha ?

If you are thinking about wanting to contribute a public OH alexa app, then I might suggest to make it compatible with our existing app so we don’t have lots of similar code bases.

@digitaldan I am running my own openhabcloud and alexa skill. Everything is working when I use basic authorisation but I am keen to use the oauth token.

What do I need to do to exchange secrets with the Alexa service? I assume that I need to insert these into mongodb but not entirely sure. Can you assist?