Тёмный

Smart Mirror Part 2: Running Scripts from Alexa Commands 

Ben Eagan
Подписаться 2,6 тыс.
Просмотров 73 тыс.
50% 1

In this video I demonstrate a smart mirror with Alexa built in receiving voice commands to turn the screen on and off, and switch between Magic Mirror configurations.
Mirrored Window Film: amzn.to/2BUmL1q
Raspberry Pi: amzn.to/2CSUgTC
Build guide: www.cyber-omele...
Darkest Child by Kevin MacLeod is licensed under a Creative Commons Attribution license (creativecommon...)
Source: incompetech.com...
Artist: incompetech.com/

Наука

Опубликовано:

 

24 янв 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 113   
@TC2105
@TC2105 6 лет назад
The soundtrack is very ominous. Like the beginning of a scifi movie where AI eventually takes over the world. Very chilling.
@arianebenoliel
@arianebenoliel 7 лет назад
Sweet book collection.
@chuxxsss
@chuxxsss 7 лет назад
Thanks Ben, never got Alex working on my pi. Had a lot of problems with the Audio system. I replaced the internal system with a USB audio card which worked. But I more on the red-node for my home automation system. This is very cool stuff mate. Keep up the good work.
@stanruta8254
@stanruta8254 7 лет назад
Really nice implementation of the concept. I'm making one for my wife. I ran into issues with getting the google voice API to run properly, so I'm switching over to Alexa, which I think will be an easier implementation. It may be more limited though in what it can ultimately control. I'll be scoping out your links for more ideas. Thanks!
@BenjaminEagan
@BenjaminEagan 7 лет назад
Very cool, I hope your switch to Alexa goes smoothly. I wish Google had a similar "run on any platform" solution like Alexa does. If I could use the technique in this video to chrome cast a google music playlist to my sound system I would be very happy.
@cyberphox
@cyberphox 7 лет назад
nice work..definitely adding this to my mirror! and cheers fellow Canuck!
@__-cd9ug
@__-cd9ug 7 лет назад
Could you control, say, Philips Hue lights? And a thermostat? We're slowly becoming Black Mirror characters :p
@BenjaminEagan
@BenjaminEagan 7 лет назад
Totally! I have Philips Hue now actually, and they just work out of the box - no custom scripts required. I think Nest thermostats do too, but you could build your own as well and integrate with this method.
@TheEvamummy
@TheEvamummy 7 лет назад
what about adding a selfie option, then storing selfies to a folder so you can access over the network and edit or upload :)
@BenjaminEagan
@BenjaminEagan 7 лет назад
Good suggestion. Raspberry pi even has a super cheap camera add on: www.raspberrypi.org/products/camera-module/ I wonder if hiding a camera behind the two way mirror borders on a bit creepy though... Maybe give it an obnoxiously loud shutter effect.
@DarrylHebbes
@DarrylHebbes 7 лет назад
How about asking Alexa "who is at the door?" Raspberry PI activates a camera at the door and relays it back the mirror...
@BenjaminEagan
@BenjaminEagan 7 лет назад
Great suggestion! I'm actually working on a pi camera project right now, the only missing piece would be sending video stream over wifi...
@latzobear
@latzobear 6 лет назад
smart smart smart
@bgtops
@bgtops 4 года назад
Hey Ben great work! I know you haven’t worked on this project in a while, but I’m currently working on my senior project in which I need Alexa to run scripts on my RPi. I was able to create the Alexa skill as well as the sqs queue and the iam account , but when I try to run the check_queue.py ikeep getting a clientError denying access. All of my credentials are correct so I’m really not sure what the problem is, hoping you can help me with this issue. Any suggestions or ideas would be a great help.
@BenjaminEagan
@BenjaminEagan 4 года назад
Hi Percy, did you get this figured out? I'd suggest sticking to Amazon's FAQs if it's an issue with connecting to the SMS queue. It's possibly the API calls in my post are out of date by now too.
@soeby666
@soeby666 7 лет назад
Hi. First of all, nice work on the mirror. Doing an attempt myself. Whenever I turn off or reboot the PI seems to forget the Alexa part. Do you know if there is a way to make the Alexa voice assistant boot up with the PI? Thanks
@BenjaminEagan
@BenjaminEagan 7 лет назад
I haven't found a way yet, because the app authorization requires you to login to a web browser. This is something I would really like to figure out though. My solution for now is to never reboot... Turning off in this case is just putting the monitor to sleep.
@ingliss
@ingliss 6 лет назад
Interesting thanks. With an appropriately sized screen, would it be feasible to watch video? This would be in a dim / darkened room.
@BenjaminEagan
@BenjaminEagan 6 лет назад
Yes, obviously the brightness suffers but you can still see colour and everything. You can see a snippet from snow white in daylight here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Z00TOAu3If4.html
@natedawg809
@natedawg809 7 лет назад
You said it runs a script based on commands right? Well when you changed to simple you saw the Pi Dashboard, why don't you suspend the monitor for X amount of seconds and turn back on once it's changed display settings? so don't really see the clutter on the Pi dashboard. some but something.
@BenjaminEagan
@BenjaminEagan 7 лет назад
Yeah, you could definitely do that. I sort of like the peek behind the curtains at how it all works, but if it was on display somewhere that would be a great change.
@Greenpigeon52
@Greenpigeon52 6 лет назад
How hard would it be to get this to work like an amazon show? For example Alexa show me my calendar. And pulls up a calendar on the screen? Or even reading the prompts across the screen?
@BenjaminEagan
@BenjaminEagan 6 лет назад
Yeah I think it should be pretty possible, I will take a look at the show API info. That would be a great addition.
@roykolk1302
@roykolk1302 7 лет назад
if got a question. if i ask alexa to turn de mirror off she says i cant help you with that. if i run a test on the lambda page with off than my screen goes off. what do i need to do to fix it?
@user-gm8ll5hs4x
@user-gm8ll5hs4x 7 лет назад
Very Nice, very very nice. but in which video you tell how to build???
@BenjaminEagan
@BenjaminEagan 7 лет назад
Full guide is on my blog here - www.cyber-omelette.com/2016/12/smart-mirror.html This video walks through the main steps: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ig9G36-8vJA.html
@fakeapplestore4710
@fakeapplestore4710 7 лет назад
The size of this is wonderful
@johnnywest5445
@johnnywest5445 3 года назад
I know this is a bit old, but I've just started researching and Alexa and scripts and this was one of the first things I found. Can Alexa get feedback from the script? I have an idea to create my own smart devices (lamps working now) with ESP8266's and would like to get feedback such as if it's on, brightness level etc. from the device back to Alexa. I'm rather surprised Alexa can't get this data from current smart bulbs.
@BenjaminEagan
@BenjaminEagan 3 года назад
Hey Johnny, that's actually going to depend on your specific smart light. Philip's Hue has a pretty decent local control API (or at least did when I made this add on: www.cyber-omelette.com/2017/10/haunted-home-automation.html) Otherwise you can try doing some customer smart home setup which has lots of examples if you google, and say you've got an Arduino controlled light, then it's just up to you to track the state. From a high level, I'd say don't expect Alexa to tell you any light values, in this setup she's really just a way to smash a button in the cloud that sets of a chain of events that you control from after the cloud button is hit.
@johnnywest5445
@johnnywest5445 3 года назад
@@BenjaminEagan Thank you for the reply Ben. I already have a working prototype for the light that returns on-off status and other information when I poll it from my computer. What I was wondering is if I can get this information back to Alexa in some way, as well as dim level when I get that portion working on the ESP8266, so I can ask it if the light is on or of, or what the light lever is. The ESP8266 is just an Arduino with WiFi built on to it. I'm definitely working on some custom smart home devices, and will eventually replace my thermostat with one of my own design. I find everything, including Alexa and the Google Nest severely lacking in features I want, and may look into Mycroft in the future to replace them as well.
@jdacnc2343
@jdacnc2343 6 лет назад
Fun project. What is the quality of the mirror coating? Does it look just like a mirror, or is the fact that it's not a regular glass mirror detectable?
@BenjaminEagan
@BenjaminEagan 6 лет назад
It's detectable, I wouldn't use it as the only mirror in my house. If you follow the blog links there are some better photos on there.
@jdacnc2343
@jdacnc2343 6 лет назад
Ben Eagan OK, thanks!
@ludwig666zz
@ludwig666zz 7 лет назад
Hi Ben, nice setup. What about using node.js and socket.io to get a real time response and avoid checking the queue every 5sec?
@BenjaminEagan
@BenjaminEagan 7 лет назад
Hey, thanks for the suggestion, I'm sure that would work too. I just used the tools I'm familiar with, and I've got zero experience with node.js. Would you still use a queue in this case? The 5s is just to keep queue queries in the monthly "free tier", so if node.js uses the same queue then I think you're still facing that delay.
@ludwig666zz
@ludwig666zz 7 лет назад
Nope, you're basically constantly waiting for an event to be pushed, so no queue here, it's real time communication. See github.com/socketio/socket.io , their main website is down atm. You can setup a small node.js server on an AWS instance using the free tier.
@BenjaminEagan
@BenjaminEagan 7 лет назад
Nice, that sounds like a great solution (dare I say the "right" solution?)
@ludwig666zz
@ludwig666zz 7 лет назад
Feel free to send me a PM if you need help.
@ryu9383
@ryu9383 7 лет назад
I believe if you setup a node.js server on an AWS instance you could easily overflow your "free tier". stackoverflow.com/questions/41040795/how-to-use-socket-io-in-aws-lambda-functions
@PuerinTheHunter
@PuerinTheHunter 7 лет назад
While I was watching this video my own Alexa said it couldn't find that skill and kept complaining about it through out the video, ahahah!
@chilly_willy_allentech8328
@chilly_willy_allentech8328 4 года назад
with the new 2 screen raspberry PI 4 have you thought about a 2 screen update ??
@BenjaminEagan
@BenjaminEagan 4 года назад
Interesting, are you suggest two physical displays behind one mirror? Or two mirrors hosted by one Pi?
@chilly_willy_allentech8328
@chilly_willy_allentech8328 4 года назад
?both ? I like 2 in 1 mirror for 2 different things . Maybe Alexa show ipcams and maps etc
@tdragon87
@tdragon87 7 лет назад
How about using a proxy? And intercepting the request instead of checking it on amazon :)
@BenjaminEagan
@BenjaminEagan 7 лет назад
Yeah, that could work too! If you want Alexa to do the language processing though it's hitting Amazon servers anyway. SQS also lets multiple systems get commands from the same queue which would be handy for home automation with multiple controllers. Plus you don't have to do port forwarding.
@akhilchowdary2067
@akhilchowdary2067 7 лет назад
hi sir it was great project ,I have installed Alexa it' working great, can you please explain me how to install facial recoginition in my smart mirror.
@BenjaminEagan
@BenjaminEagan 7 лет назад
Glad to hear it's working well. I can't explain how to install facial recognition, though because I haven't done it! Good luck.
@jonerikroldan6413
@jonerikroldan6413 7 лет назад
Do you have Alexa library installed in your Pi or is your Pi talking to an amazon echo/dot? What I saw from other people is that Alexa running on Pi takes a lot of time to compute, making Alexa's responses very, very unresponsive. Yours is surprisingly responsive!
@BenjaminEagan
@BenjaminEagan 7 лет назад
It's running the RPi3 and the delay just hasn't been a problem. I have heard the microphone levels can have a big impact on how responsive it is though, I would check your levels as you talk to make sure the input isn't clipping. Also checkout your "top -u %CPU" to see what CPU is at. Another user was seeing crazy high CPU usage which would definitely hinder performance.
@jonerikroldan6413
@jonerikroldan6413 7 лет назад
Got it! I checked your blog after reading your reply. I guess the big difference between yours and from what I've seen from others is that you have computing help through Lambda, which I've never heard of before. Thanks for sharing and I hope I can pull this off on my mirror project!
@BenjaminEagan
@BenjaminEagan 7 лет назад
I just want to clarify, Alexa responds very quickly to normal queries like what's the weather, but my custom scripts can take from 1 - 10s . So if you're writing your own skills, there is still some delay.
@SteveCanNL
@SteveCanNL 7 лет назад
The mirror appears distorted in the video, is it like this in person. Looking to make my own and I'd like to save some money using the film that you talked about in your previous video.
@BenjaminEagan
@BenjaminEagan 7 лет назад
The mirror quality is going to be worse than the expensive real glass version. It's a product of the glass it's attached too, so a thick sheet of glass in a frame would have less distortion.
@manalirfan9798
@manalirfan9798 7 лет назад
Does the alexa and magic mirror software are on the same raspberry pi or do we need 2 different raspberry pies
@BenjaminEagan
@BenjaminEagan 7 лет назад
Yes it runs on the same pi, only 1 is needed.
@tamir5940
@tamir5940 5 лет назад
Do you have a tutorial on how to build it with what hardware parts?
@BenjaminEagan
@BenjaminEagan 5 лет назад
Sure do! Check out this video and the links to the blog ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ig9G36-8vJA.html
@tamir5940
@tamir5940 5 лет назад
Thank You that helped a lot! I got the google Ayi hooked up now with Alexa... did you ever try to hook up a pir sensor to that?
@BenjaminEagan
@BenjaminEagan 5 лет назад
Not a pir sensor specifically but it's a pretty simple case of GPIO. You can checkout my plant watering tutorial which reads from a moisture sensor and does "things" and adapt the scripts a bit so that a GPIO signal triggers the on action, and "off" kicks in after a timeout of no motion.
@tamir5940
@tamir5940 5 лет назад
@@BenjaminEagan That seems close to what Im doing. See the problem that I am having is.. I bought google AYI voice kit to go onto the Raspberry Pi to have alexa hooked up to the Smart Mirror. With that being said, All the Gpio pins were used in that process on the Raspberry Pi. I needed 3 GPio pins for the same sensor that You have to work but I dont have any pins left. Not sure what to do.
@BenjaminEagan
@BenjaminEagan 5 лет назад
@@tamir5940 there may be pin extenders for RPi, but you could also buy the Arduino YUN and use the AWS IOT "thing" service. The arduino would publish movement, and the pi would subscribe and take actions. That's a shame though as all you need is one pin!
@denniswilliamsjr5646
@denniswilliamsjr5646 6 лет назад
Hi can you make an updated tutorial for Pi zero please?
@ByBixtt
@ByBixtt 6 лет назад
Really nice
@NenaKPlans
@NenaKPlans 7 лет назад
You're amazing!
@sintbernard1
@sintbernard1 7 лет назад
Hi Ben, Massive thanks for all your work. It is possible to display a chessboard and play it via voice commands? Regards, Arthur
@BenjaminEagan
@BenjaminEagan 7 лет назад
Love the idea! Definitely possible. Any objections to me trying it out? Probably not anytime soon, but I think the smart mirror visual voice game would be very well received by users.
@sintbernard1
@sintbernard1 7 лет назад
Yeah, ofcourse! As long as I get to copy the sourcecode.
@BenjaminEagan
@BenjaminEagan 7 лет назад
Absolutely. In fact, when I do get around to it I'll make sure to work in a github repo that you can join in on if interested.
@sintbernard1
@sintbernard1 7 лет назад
Awesome!
@audunthebest
@audunthebest 7 лет назад
Please do!
@abhilashreddyvedavally4440
@abhilashreddyvedavally4440 6 лет назад
Can you please tell me microphone you have used for pi?
@BenjaminEagan
@BenjaminEagan 6 лет назад
If you follow the link to the blog post you can find all materials linked
@ToadCold
@ToadCold 7 лет назад
He Ben, Need Your Help. While Testing The Code In Lambada Function. It Displays An Error Of Failed Test. Without Successful Test Am Not Able To Go Ahead With The Work. I Checked The Python Code It's All Correct But Still The Test Appears To Be Failed. Any Solution For This? Please Reply ASAP.
@BenjaminEagan
@BenjaminEagan 7 лет назад
Can you share the exact error?
@vaibhavahire5243
@vaibhavahire5243 Год назад
Which module mirror on off
@BenjaminEagan
@BenjaminEagan Год назад
No module, this video is about how to build it using scripts and an AWS Lambda function
@GabitoE
@GabitoE 7 лет назад
How did you add alexa? With a module? Could you please share the installation steps? Thanks!
@BenjaminEagan
@BenjaminEagan 7 лет назад
Hey Gabriel, it's all in my blog posts that can be found here: www.cyber-omelette.com/2016/12/smart-mirror.html
@GabitoE
@GabitoE 7 лет назад
Ben Eagan thanks! I was checking, looks great. Is any way to ask alexa "display movie trailer" and bring to magic mirrow the video? (RU-vid integration or something like that)
@BenjaminEagan
@BenjaminEagan 7 лет назад
You could probably modify this solution to do so, but finding the desired youtube url from the voice command would be the tricky part I think. Good luck!
@fman901
@fman901 7 лет назад
Is there possible to integrate Alexa with photo booth software for parties? That way client will only need to talk to the mirror photo booth. If anyone has a clue to doing this please reply thank you
@BenjaminEagan
@BenjaminEagan 7 лет назад
If you can run it from a command line interface, this could definitely be used for a photo booth experience.
@JanJanJanJanJanJanJanJanJan2
@JanJanJanJanJanJanJanJanJan2 6 лет назад
plus: you could name your skill "photo booth" so the user only needs to say "start photo booth"
@tamir5940
@tamir5940 5 лет назад
So I finally built it but my question is... do you have to pay for the Alexa being on there? Their site says I have to put my credit card in
@BenjaminEagan
@BenjaminEagan 5 лет назад
You definitely don't have to pay, what site is asking for your cc?
@tamir5940
@tamir5940 5 лет назад
Ben Eagan Weel when I first followed this project, I followed this guy’s instructions on RU-vid. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-HO326ptdlco.html. That’s his link. I followed everything with the magic me a program and the voice and still nothing works. I get to the point on Google assistant website where I needed a credit card saying that if I use over 500 usages that I’ll be paying like $.15 or something for using their services
@BenjaminEagan
@BenjaminEagan 5 лет назад
Well I can't help you with someone else's tutorial (that is a really good one though), but I'd just stick to the Amazon setup for Raspberry Pi Alexa: developer.amazon.com/docs/alexa-voice-service/set-up-raspberry-pi.html this has always been free so far, so if there is payment required I'd be surprised. Please provide a screenshot of what instructions you're following and what page is asking for money. Note - once you get to writing your own skill like in this video, you do have to provide CC for some of the AWS services you use, but I keep usage within the free tier.
@tamir5940
@tamir5940 5 лет назад
Ben Eagan actually i seen it on the instructions on aiyprojects website as the instructions to get it working
@tamir5940
@tamir5940 5 лет назад
Ben Eagan actually the instructions that you sent me is the best I seen! Thanks! Will this work on the google aiy kit?
@learnapplybuild
@learnapplybuild 7 лет назад
can we ask alexa to switch on and off LED lights around the frame
@BenjaminEagan
@BenjaminEagan 7 лет назад
Definitely. You'd have to write the code to turn them on and off, but Alexa could be used to trigger that event.
@leglessinoz
@leglessinoz 5 лет назад
Or you could just use Alexa to control a Sonoff switch connected to the LEDs.
@brandonm4471
@brandonm4471 6 лет назад
ho much did it cost about to make this?
@BenjaminEagan
@BenjaminEagan 6 лет назад
This was about $100-150 Canadian for everything, half of that being the monitor
@amandarodgers4639
@amandarodgers4639 7 лет назад
ok Alexa open Kodi now being able start and stop a Mead sinter on the Mirror is a good idle
@Chris-jz1ru
@Chris-jz1ru 6 лет назад
Did anyone else catch the book on the table? "Images you shouldn't masturbate to"? Now I'm curious as to what is in the book more than the mirror.
@BACRULES
@BACRULES 5 лет назад
I whant this so bad but for google assistent
@QuickMind
@QuickMind 7 лет назад
Can a similar thing be done with Siri?
@BenjaminEagan
@BenjaminEagan 7 лет назад
No! As far as I know, Alexa is the only smart assistant that can be installed on a raspberry pi.
@QuickMind
@QuickMind 7 лет назад
well... alexa is better then nothing, grest idea using that window film!! Going to try and also install homebridge to get some automation goin on with siri and some cheap smart plugs/bulbs
@BenjaminEagan
@BenjaminEagan 7 лет назад
Been meaning to checkout homebridge myself. If all you want is home automation though, the philips hue lights work great with this. Haven't tried anything else.
@QuickMind
@QuickMind 7 лет назад
Not just hue, want to have some smart plugs too, idea is to control tv, let strips, blinds and maybe some sensors, would be cool if i coult tell siri to wake the mirror or maybe add a motion sensor...
@BenjaminEagan
@BenjaminEagan 7 лет назад
Very cool... If you pull it off, please let me know how you do it!
@rithunroshkc2331
@rithunroshkc2331 6 лет назад
I just want the Indian time. Is it possible
@BenjaminEagan
@BenjaminEagan 6 лет назад
You want the time in India to display on the smart mirror? Yes, that is possible.
@dirgosalga
@dirgosalga 6 лет назад
I just want to tell Alexa to tell my RaspberryPi to run a script that send a wake-on-lan magic packet to my PC. Can anybody point me in the right direction?
@MrNikhilSmart
@MrNikhilSmart 6 лет назад
Are you Gilfoyle?
@dugemaniac
@dugemaniac 7 лет назад
1:22 awkward :D
Далее
10 Tips to help you build your best Magic Mirror
16:36
Glass vs Film Smart Mirror Faceoff
5:23
Просмотров 67 тыс.
Jumbo Billy Bass in action! (Best working one?)
1:12
Просмотров 4,4 тыс.
IT'S ALIVE! Barn door tracker gets electricity.
8:55
Touchscreen Smart Mirror
3:28
Просмотров 2,1 млн
Alexa Powered Raspberry Pi Magic Mirror
3:18
Просмотров 33 тыс.
Smart Mirror with added functionality
4:53
Просмотров 49 тыс.
DIY Smart Mirror - Full Tutorial
20:06
Просмотров 1,7 млн
Чем нельзя протирать экран?
0:44
S23 ultra screen 💥 #Fixit
1:01
Просмотров 2,5 млн