WebThingsIO / gateway

WebThings Gateway - a self-hosted web application for monitoring and controlling a building over the web
http://webthings.io/gateway
Mozilla Public License 2.0
2.62k stars 339 forks source link

Alexa Skill #654

Open claell opened 6 years ago

claell commented 6 years ago

Hope this is the right place for this request.

benfrancis commented 6 years ago

@andrenatal has a working prototoype. Not sure what it would take to turn it into a published Alexa skill? Could use the same speech commands as our internal intent parser.

One challenge might be how to configure the base URL of your own gateway. Also, would this use OAuth and does our OAuth implementation have the features required?

benfrancis commented 6 years ago

We discussed this in a meeting yesterday, @andrenatal is working on an Alexa Skill. The idea is to create an Alexa skill which uses the Web Thing API on the gateway and requests access using OAuth. There will probably be a configuration option in the skill in the Alexa app which will let you specify your gateway URL and you will be prompted for your gateway username and password to give Alexa a JSON Web Token which grants it access.

siobhter commented 6 years ago

Does this Alexa skill exist yet? Alternatively, is there support for Google Home?

sogaani commented 6 years ago

@siobhter The MozAssist I develop support connecting Google Home and your Gateway. This is not Mozilla official project, but my personal project.

mrstegeman commented 6 years ago

If we want to go the decentralized route, I've found some other examples from openHAB and Home Assistant. Both give users instructions on how to set up their own AWS endpoint.

benfrancis commented 6 years ago

Same question as in https://github.com/mozilla-iot/gateway/issues/655#issuecomment-430970076

What is the technical constraint that prevents a single Alexa skill talking directly to multiple gateways?

mrstegeman commented 6 years ago

The primary issue is that you have to have a single endpoint for the skill/action to authenticate against via OAuth. For us, that means running a separate cloud service that either proxies connections or somehow redirects to the user’s gateway. That is, unless @hobinjk found a way around that.

flatsiedatsie commented 6 years ago

It's nice to see Alexa and Google voice control being a target for version 0.7.

I would hope that the gateway will also support a local, cloudless voice control option.

Personally I would even prioritise that, as it would seem to be a better fit with the Mozilla values:

  1. Avoid tracking and privacy violation. Cloud based voice control systems are not privacy friendly.
  2. Consistently communicate this as a feature and as a value.
  3. As IoT scandals inevitably increase, reap the benefits of the built up narrative of being an ethical alternative that does things in a more respectful manner, and that has the vision and leadership capabilities to point to a better way forward.

So far the IoT market has been 'cloud first' oriented. In my opinion that has to be switched around to 'cloud only if necessary'. Make the gateway "edge first".

cr0ybot commented 5 years ago

Can I at some point just hack my Echo Dots and replace the firmware with something that would just run the Things Gateway Assistant? 😉

In all seriousness, not having Alexa support is probably the only thing that will prevent me from relying totally on the Things Gateway as the central brain of my house. I have like 4 or 5 Echo Dots scattered around, and I really only use them for smart home commands. If the Skill development gets to a point that it works but only if you're willing to setup your own development version of it and connect it yourself I'd be willing to give that a go.

Since this has been removed from release 0.7, will it make it into 0.8?

andrenatal commented 5 years ago

Hi @cr0ybot and @flatsiedatsie.

I recently released an add-on which enables hands-free controlling of the gateway, keyword activated, and utilizing 100% local speech processing.

You just need a USB microphone and a speaker connected to the raspberry pi to use it. Expect an update with new features soon.

Give it a try and let me know if you have issues and if that fits your expectations.

Thanks

Andre

http://github.com/andrenatal/voice-addon/

screenshot 2019-01-12 20 55 54
cr0ybot commented 5 years ago

Hey @andrenatal, your addon is very cool!

However, my house is older and is not a very open-plan design, so this is why I have 5 Echo Dots scattered about. A central microphone/speaker doesn't work well in this environment. I'm tempted to set up your addon as a stopgap somewhere in the kitchen, but ideally I'd like to use the devices I already have, which happen to be Alexa devices.

andrenatal commented 5 years ago

Hi Cory,

I'm working on a standalone version, where the voice controller runs separated of the gateway on its own device, but that would require you to have more raspberry PIs to replace the Dots.

I would love to find a way to flash the Dots with our software though.

I'll ping you as soon I have that ready.

Cheers

On Sun, Jan 13, 2019, 10:22 AM Cory Hughart <notifications@github.com wrote:

Hey @andrenatal https://github.com/andrenatal, your addon is very cool!

However, my house is older and is not a very open-plan design, so this is why I have 5 Echo Dots scattered about. A central microphone/speaker doesn't work well in this environment. I'm tempted to set up your addon as a stopgap somewhere in the kitchen, but ideally I'd like to use the devices I already have, which happen to be Alexa devices.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mozilla-iot/gateway/issues/654#issuecomment-453853228, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7aTL6mYxgKRE-5Ik92IWtoVBSjvMArks5vC3lRgaJpZM4SA9cZ .

flatsiedatsie commented 5 years ago

@andrenatal: you are making my day! Fantastic!

I own two Playstation Eye microphones (since the test by Snips showed they performed really well) and I have an extra Pi Zero W, so if you want I can help test things.

@cr0ybot Snips supports running 'satellites' which pass the audio on to the main system. So you could have Raspberry Pi Zero W devices (15$) with Playstation Eye devices ($12 new, $5 second hand) or a pi-hat for voice recognition ($10 for 2 microphone version, and going up from there). So an surveillance-free voice controller smart home would cost you about $25 per room.

flatsiedatsie commented 5 years ago

For anyone else exploring this, I installed the Watch part of Snips to more easily see what the system thinks it hears:

On your Pi: sudo apt-get install -y snips-watch

And then if you install SAM on your Linux/Mac laptop: sudo npm install -g snips-sam and then sam devices and then sam connect gateway you can do: sam watch

You can then see the words it hears come by.

tim-hellhake commented 5 years ago

I just submitted a PR for Alexa support 😬 https://github.com/mozilla-iot/addon-list/pull/320

sasivarnan commented 4 years ago

Any update on this?

I would really love to see this happen.

th0mpy commented 4 years ago

Really excited to see this progress. Any updates?