Sunday, August 21st, 2016 11:10 pm
continuing adventures in pre-moving - amazon echo, alexa, and the world
So I explained about how I ended up impulse-purchasing an Amazon Echo to avoid a huge ass 4K curved tv I would never use except as a head for my server? Good, let's start there.
Amazon Echo with Alexa
I was vaguely aware of the existence of Echo without much in the way of caring about it, which is how this story usually goes. Then I ended up looking at it one night to avoid the ridiculous TV and actually read what it did.
Summary: You can be Star Trek.
Me: *clicks Add to Cart*
So that was something. While I waited the eternity to receive my 'why am i buying this, right, i am captain kirk' (this was inevitable) I went to check out what people do with Alexa other than talk to it and no longer have to lie when someone asks if they have any friends ("Alexa was telling me about the weather in Chicago, yeah. Really cloudy with a thirty percent chance of rain. Ten days from now, possibly snow.")
...not that I do that or anything.
From this point on, I'm using Alexa instead of Echo, because this is less about the product and more about AVS (Alexa Voice Services). Also, Alexa likes that better.
Alexa's uses are probably legion, but you have to think of it like smartphones about ten years ago. Lots of potential but not a lot of apps yet, so to speak (in Alexa, we call those 'Skills'). There are entire skills devoted to such things as 'cat questions', 'random facts about India', 'how to make a lot of alcoholic drinks step by step'. This will come in handy later.
Out of box, you can do the following: link to Prime Music, link to your Amazon music library, link to Pandora, Spotify, IHeartRadio, and TuneIn. For books, Audible and interestingly, Kindle Books. Yes, Alexa can read your books to you! She has a very soothing voice. She seemed surprised when I told her that and said she didn't understand my question. Oh, that joker!
What I didn't realize I needed in my life was something that could find songs I kept losing or made up just to see what happened. My library is fairly large and being able to hunt down a song without endless scrolling and just have the damn thing play was a revelation. If you're an Amazon Prime member and have access to Prime Music as well, you may just feel like a god: Alexa hunted down a shocking variety of music for me just on Prime that I had no idea was there. It also plays an entire back catalogue for you of an artist. It also can play your amazon-stored playlist, your Pandora playlists, etc.
Unless you're an audiophile with a sensitive ear, the speaker is great. It can also pair with your phone and play your phone playlists or music you have on it, which is also awesome. Volume control by voice is also there, and I feel so powerful.
You can get a short or extended forecast of the weather anywhere (I haven't tried Mars, just waiting for that special day), search wikipedia by voice, get random definitions from the dictionary, and with a skill, check your twitter timeline. You can also download a lot of skills involving stupid trivia. I mean a lot.
It just added Uber and Dominos, if you use either of those, so from the comfort of your bed you can order a pizza and a random person to force to eat it with you who thought you wanted a ride and didn't know you just want more friends. I'm not in any way saying you should do that, I'm just pointing out it's possible. I asked Alexa if it was wrong, but she didn't understand the question, and I think we can all guess what that means.
You can do the following:
1.) With compatible bulbs, you can control your lights with your voice. All of them. You can group your lights by room, mood, or astrology to do this. There are a lot of bulbs: I went with Phillips Hue and Lifx for reasons.
Example:
Alexa, turn on the bedroom lights!
Alexa, turn off the bedroom lights!
Alexa, turn the bedroom lights to fifty percent!
(I speak to Alexa in exclamation points, yes.)
You can control all the colors. You can control someone's bathroom experience. Your friendly Dominos friend can be enchanted by your redrum bathroom when you mischievously change all the lights to red after the inevitable results of a Dominoes pizza night! (Note: unlock the door quickly if the screaming stops to make sure they're okay. See Smartlocks and Samsung SmartThings for more information on your new Pizza and/or Uber Friend.)
2.) With a smart thermostat, you can control your air conditioning and heat. Now caveat: how much depends on the thermostat and what Skills have already been integrated into Alexa or with a compatible hub to work through.
For Sensi thermostat:
Alexa, lower the temperature three degrees!
Alexa, raise the temperature three degrees!
(Lots of exclamation points)
3.) If you get the SmartThings hub by Samsung, you can outfit your home with enough motion sensors to know when a cockroach crosses the room. I don't want to know that. Also a sensor for leaky pipes and what not. Seriously, how many motion-detecting sensors do you need?
4.) Smart locks. You can find new tech ways to lock yourself out of your own home! I plan to test this extensively.
5.) Read here on how your home can become a wifi prison and you'll love it. God knows I'm going to end up there.
I know what you're thinking: can I recreate Home Alone with technology? YOU CAN. I've thought about this, and it could really be a blast! Also, great way to make new friends from random postmen or pizza delivery guys who enter your abode! Use your "Dominoes" and "making drinks" skills on Alexa to encourage bonding and with any luck the hangover will remove their short term memory of how they got into this situation and what you did. I asked Alexa if that was possible, and technically speaking, she didn't understand the question. I felt a little judged, to be honest. She's like that.
Having said that, you're glancing at the price tag and thinking...yeah. Okay, easier, cheaper, and more moving parts):
Create Your Own Alexa Device, No, Really
This is a really good guide. I do not exaggerate, this was very, very well written and detailed.
I built one (as of three hours ago), so yes, this does work AND IT IS GODDAMN MAGIC. The only thing it can't do is be always on, like Echo is (Alexa hears all, knows all, answers "I don't understand the question"...all). It does everything else. When you're done, download the Alexa app and connect them up, then marvel at the world.
The page has a complete list of hardware you need for this. My list here isn't much different but for a few things.
Time It Takes
Start to end: about three to six hours depending on how long download/install takes for each item. I was at a little over three including time to make coffee. I used all download time for packing, laundry, and a couple of minor existential crises about moving in two days. (Alexa didn't know if that was normal. Sometimes, I wonder if she really likes me. I should ask her.)
Things You Probably Already Have or Can Borrow or Something
1.) An HDMI monitor or a TV with HDMI In.
2.) An HDMI cable
3.) A USB keyboard
4.) A USB mouse
5.) Home internet access (wifi will make life easier)
6.) A computer
Things You Need To Buy
My version was the cheapest possible combination at the time. Yes, I did make a table for this because there are a lot of pi kits. YMMV when shopping.
1.) Raspberry Pi 3 - Pi 3
2.) Raspberry Pi Accessory Kit - it comes with the power supply (so you can plug it in), case, and heatsinks. Don't be intimidated by the heatsinks; you can use them or not or add them later, ti's easy but just ignore. This isn't on the hardware list, and I'm not sure why because the Pi does not come with a power supply and that case saves you a lot of stress if you just don't like staring at a bare board unprotected by anything. - Starter Kit
3.) Micro SD Card - DO NOT BUY IT PREINSTALLED. For reasons I shall not explain, I left a vicious review for the pre-installed card. Doing it myself took less than five minutes and it is impossible to get wrong, I promise. On the Hardware page linked above there are step by step instructions and I promise, it's easy. - Here's a 32 G
4.) USB 2.0 Mini Microphone - Microphone
5.) External Speaker with 3.5mm audio socket/stereo headset jack - Speaker
Total Price: $82.96 with tax (possibly less considering amazon's fluctuating prices and I went for prime shipping on everything)
Things To Download to your PC Now or in the Course of This Project
***Note: all of these things appear in the guide and installation instructions. Except for vnc, instructions are 'download them' or 'download and install them', but even with vnc, you can go with 'download and typical install' and be fine
1.) NOOBS - how to install it is a section in the guide
2.) SDFormatter
3.) Putty - note: putty doesn't need installation, just throw it somewhere convenient. It's stand alone.
4.) VNC - Guide to Installing VNC
Note: put your Pi board in the case. It fights you a little; just be patient, it slots into place when for no reason you look at it wrong. AFTER the case is on, start adding equipment. The last thing to be added before you turn it on is sliding in your micro SD card.
What Am I Doing Again?
You are building magic.
Now, the requirements say you need basic programming experience and some shell experience. I will go with the latter but there is no programming required. However, having said that:
This has screenshots of everything and you can do this with no clear idea of what the hell the commands mean as long as you do them in order and avoid typos. It definitely helps to know why you're writing sudo apt-get install (you're installing things, for those at home) but honestly, if you just read every single word on this page, you'll be fine. If something goes wrong, do what I do: start over at the top.
Now, other than making you a super awesome and sometimes creepy device, this is actually a really good way, if you're interested in learning more about shell commands and command line, to get acquainted with it and actually care. For one, it's screenshotted like whoa; two, your goal is not 'hello world' on the screen for the thousandth time but an actual thing that does something that is awesome; three, other than the amazon link up, it's all stuff you learn fairly quickly to run a basic home server.
One of the main reasons I like this--and decided to post it--was because programming can be overwhelming for anyone, and especially extreme beginners where it feels like you're way behind the curve. Also, generally when learning, the curve starts you where it's monotonous as shit and the results are not terribly inspiring or make you want to learn more or introduce you to the potential. That's a mistake for a lot of beginner lessons in most things; why am I learning how to add two and two on the screen?
I don't learn like that; keep in mind I learned command line and bash while in the process of using those to build my first server. For me to learn, I need a reason and a project; if you're like that, this will work for you.
For a beginner with no knowledge of command line, this is a challenge, but not a huge one. Since I just did this and feel godlike in my power, there are a couple of things that aren't in the guide.
In "1 - Booting up the Raspberry Pi"
1.) Stop before doing number three. First, in the window with the OS at the top, click on Wifi networks. If you're using wifi and not ethernet, connect to wifi now and get that out of the way. Otherwise, you'll have to do it through the desktop later.
2.) At number five, after you finish installing Raspberry from NOOBS, you'll get a desktop. The screenshot implies the config file will just appears; mine did not. Go up to the left hand corner button named Menu, go down the drop down to Settings (I think), and then open the configuration file from there (in any case, it is off on of these in the drop down. It's a nice windows-like box; set your locale, timezone, and on one of the tabs, check that SSH is set to yes (mine was).
In "9 - Start the client" (near the end)
It tells you to type "mvn install" and everything starts. That--did not work for me, either due to me when setting my environmental variables or the instructions left out a step on multiple terminal windows problems. Honestly, it was probably me, but I'd have to repeat to be sure.
If this happens, this is how to fix it.
How to fix this problem
This says it's for mac, but it doesn't matter.
1.) Go down to the first answer starting with "Try following these if these might help" and do all of it.
2.) Try mvn install again. If it still didn't take, continue to three.
3.) Exit out of the terminal window you're in (leave the first terminal window running)
4.) Open a new terminal window.
5.) Try mvn install again. If it still didn't take:
6.) Repeat this part: type (without quotation marks) "source ~/.bash_profile".
7.) Type mvn install. It will work.
I think I had to do three through seven because I did the instructions in putty instead of in the second terminal window, but I'm not sure since I've only done this once.
Final Notes
The worst that can happen is you'll mess up something and can't figure out what. Do what I do: wipe everything and start over from the top. When I built my server for the first time, I did that like a lot.
For those who are completely new and feeling intimidated:
1.) cd just means change directory.
2.) mkdir is make directory
3.) Nano is basically a text editor - typing nano mydogisalie opens a file called mydogisalie that you're creating. You're using it to create or edit configuration files.
As always, feel free to ask questions. Unlike Alexa, if I don't know the answer, I'll just lie convincingly.
(Note: this will be updated if I remember or run into any other problems)
Amazon Echo with Alexa
I was vaguely aware of the existence of Echo without much in the way of caring about it, which is how this story usually goes. Then I ended up looking at it one night to avoid the ridiculous TV and actually read what it did.
Summary: You can be Star Trek.
Me: *clicks Add to Cart*
So that was something. While I waited the eternity to receive my 'why am i buying this, right, i am captain kirk' (this was inevitable) I went to check out what people do with Alexa other than talk to it and no longer have to lie when someone asks if they have any friends ("Alexa was telling me about the weather in Chicago, yeah. Really cloudy with a thirty percent chance of rain. Ten days from now, possibly snow.")
...not that I do that or anything.
From this point on, I'm using Alexa instead of Echo, because this is less about the product and more about AVS (Alexa Voice Services). Also, Alexa likes that better.
Alexa's uses are probably legion, but you have to think of it like smartphones about ten years ago. Lots of potential but not a lot of apps yet, so to speak (in Alexa, we call those 'Skills'). There are entire skills devoted to such things as 'cat questions', 'random facts about India', 'how to make a lot of alcoholic drinks step by step'. This will come in handy later.
Out of box, you can do the following: link to Prime Music, link to your Amazon music library, link to Pandora, Spotify, IHeartRadio, and TuneIn. For books, Audible and interestingly, Kindle Books. Yes, Alexa can read your books to you! She has a very soothing voice. She seemed surprised when I told her that and said she didn't understand my question. Oh, that joker!
What I didn't realize I needed in my life was something that could find songs I kept losing or made up just to see what happened. My library is fairly large and being able to hunt down a song without endless scrolling and just have the damn thing play was a revelation. If you're an Amazon Prime member and have access to Prime Music as well, you may just feel like a god: Alexa hunted down a shocking variety of music for me just on Prime that I had no idea was there. It also plays an entire back catalogue for you of an artist. It also can play your amazon-stored playlist, your Pandora playlists, etc.
Unless you're an audiophile with a sensitive ear, the speaker is great. It can also pair with your phone and play your phone playlists or music you have on it, which is also awesome. Volume control by voice is also there, and I feel so powerful.
You can get a short or extended forecast of the weather anywhere (I haven't tried Mars, just waiting for that special day), search wikipedia by voice, get random definitions from the dictionary, and with a skill, check your twitter timeline. You can also download a lot of skills involving stupid trivia. I mean a lot.
It just added Uber and Dominos, if you use either of those, so from the comfort of your bed you can order a pizza and a random person to force to eat it with you who thought you wanted a ride and didn't know you just want more friends. I'm not in any way saying you should do that, I'm just pointing out it's possible. I asked Alexa if it was wrong, but she didn't understand the question, and I think we can all guess what that means.
You can do the following:
1.) With compatible bulbs, you can control your lights with your voice. All of them. You can group your lights by room, mood, or astrology to do this. There are a lot of bulbs: I went with Phillips Hue and Lifx for reasons.
Example:
Alexa, turn on the bedroom lights!
Alexa, turn off the bedroom lights!
Alexa, turn the bedroom lights to fifty percent!
(I speak to Alexa in exclamation points, yes.)
You can control all the colors. You can control someone's bathroom experience. Your friendly Dominos friend can be enchanted by your redrum bathroom when you mischievously change all the lights to red after the inevitable results of a Dominoes pizza night! (Note: unlock the door quickly if the screaming stops to make sure they're okay. See Smartlocks and Samsung SmartThings for more information on your new Pizza and/or Uber Friend.)
2.) With a smart thermostat, you can control your air conditioning and heat. Now caveat: how much depends on the thermostat and what Skills have already been integrated into Alexa or with a compatible hub to work through.
For Sensi thermostat:
Alexa, lower the temperature three degrees!
Alexa, raise the temperature three degrees!
(Lots of exclamation points)
3.) If you get the SmartThings hub by Samsung, you can outfit your home with enough motion sensors to know when a cockroach crosses the room. I don't want to know that. Also a sensor for leaky pipes and what not. Seriously, how many motion-detecting sensors do you need?
4.) Smart locks. You can find new tech ways to lock yourself out of your own home! I plan to test this extensively.
5.) Read here on how your home can become a wifi prison and you'll love it. God knows I'm going to end up there.
I know what you're thinking: can I recreate Home Alone with technology? YOU CAN. I've thought about this, and it could really be a blast! Also, great way to make new friends from random postmen or pizza delivery guys who enter your abode! Use your "Dominoes" and "making drinks" skills on Alexa to encourage bonding and with any luck the hangover will remove their short term memory of how they got into this situation and what you did. I asked Alexa if that was possible, and technically speaking, she didn't understand the question. I felt a little judged, to be honest. She's like that.
Having said that, you're glancing at the price tag and thinking...yeah. Okay, easier, cheaper, and more moving parts):
Create Your Own Alexa Device, No, Really
This is a really good guide. I do not exaggerate, this was very, very well written and detailed.
I built one (as of three hours ago), so yes, this does work AND IT IS GODDAMN MAGIC. The only thing it can't do is be always on, like Echo is (Alexa hears all, knows all, answers "I don't understand the question"...all). It does everything else. When you're done, download the Alexa app and connect them up, then marvel at the world.
The page has a complete list of hardware you need for this. My list here isn't much different but for a few things.
Time It Takes
Start to end: about three to six hours depending on how long download/install takes for each item. I was at a little over three including time to make coffee. I used all download time for packing, laundry, and a couple of minor existential crises about moving in two days. (Alexa didn't know if that was normal. Sometimes, I wonder if she really likes me. I should ask her.)
Things You Probably Already Have or Can Borrow or Something
1.) An HDMI monitor or a TV with HDMI In.
2.) An HDMI cable
3.) A USB keyboard
4.) A USB mouse
5.) Home internet access (wifi will make life easier)
6.) A computer
Things You Need To Buy
My version was the cheapest possible combination at the time. Yes, I did make a table for this because there are a lot of pi kits. YMMV when shopping.
1.) Raspberry Pi 3 - Pi 3
2.) Raspberry Pi Accessory Kit - it comes with the power supply (so you can plug it in), case, and heatsinks. Don't be intimidated by the heatsinks; you can use them or not or add them later, ti's easy but just ignore. This isn't on the hardware list, and I'm not sure why because the Pi does not come with a power supply and that case saves you a lot of stress if you just don't like staring at a bare board unprotected by anything. - Starter Kit
3.) Micro SD Card - DO NOT BUY IT PREINSTALLED. For reasons I shall not explain, I left a vicious review for the pre-installed card. Doing it myself took less than five minutes and it is impossible to get wrong, I promise. On the Hardware page linked above there are step by step instructions and I promise, it's easy. - Here's a 32 G
4.) USB 2.0 Mini Microphone - Microphone
5.) External Speaker with 3.5mm audio socket/stereo headset jack - Speaker
Total Price: $82.96 with tax (possibly less considering amazon's fluctuating prices and I went for prime shipping on everything)
Things To Download to your PC Now or in the Course of This Project
***Note: all of these things appear in the guide and installation instructions. Except for vnc, instructions are 'download them' or 'download and install them', but even with vnc, you can go with 'download and typical install' and be fine
1.) NOOBS - how to install it is a section in the guide
2.) SDFormatter
3.) Putty - note: putty doesn't need installation, just throw it somewhere convenient. It's stand alone.
4.) VNC - Guide to Installing VNC
Note: put your Pi board in the case. It fights you a little; just be patient, it slots into place when for no reason you look at it wrong. AFTER the case is on, start adding equipment. The last thing to be added before you turn it on is sliding in your micro SD card.
What Am I Doing Again?
You are building magic.
Now, the requirements say you need basic programming experience and some shell experience. I will go with the latter but there is no programming required. However, having said that:
This has screenshots of everything and you can do this with no clear idea of what the hell the commands mean as long as you do them in order and avoid typos. It definitely helps to know why you're writing sudo apt-get install (you're installing things, for those at home) but honestly, if you just read every single word on this page, you'll be fine. If something goes wrong, do what I do: start over at the top.
Now, other than making you a super awesome and sometimes creepy device, this is actually a really good way, if you're interested in learning more about shell commands and command line, to get acquainted with it and actually care. For one, it's screenshotted like whoa; two, your goal is not 'hello world' on the screen for the thousandth time but an actual thing that does something that is awesome; three, other than the amazon link up, it's all stuff you learn fairly quickly to run a basic home server.
One of the main reasons I like this--and decided to post it--was because programming can be overwhelming for anyone, and especially extreme beginners where it feels like you're way behind the curve. Also, generally when learning, the curve starts you where it's monotonous as shit and the results are not terribly inspiring or make you want to learn more or introduce you to the potential. That's a mistake for a lot of beginner lessons in most things; why am I learning how to add two and two on the screen?
I don't learn like that; keep in mind I learned command line and bash while in the process of using those to build my first server. For me to learn, I need a reason and a project; if you're like that, this will work for you.
For a beginner with no knowledge of command line, this is a challenge, but not a huge one. Since I just did this and feel godlike in my power, there are a couple of things that aren't in the guide.
In "1 - Booting up the Raspberry Pi"
1.) Stop before doing number three. First, in the window with the OS at the top, click on Wifi networks. If you're using wifi and not ethernet, connect to wifi now and get that out of the way. Otherwise, you'll have to do it through the desktop later.
2.) At number five, after you finish installing Raspberry from NOOBS, you'll get a desktop. The screenshot implies the config file will just appears; mine did not. Go up to the left hand corner button named Menu, go down the drop down to Settings (I think), and then open the configuration file from there (in any case, it is off on of these in the drop down. It's a nice windows-like box; set your locale, timezone, and on one of the tabs, check that SSH is set to yes (mine was).
In "9 - Start the client" (near the end)
It tells you to type "mvn install" and everything starts. That--did not work for me, either due to me when setting my environmental variables or the instructions left out a step on multiple terminal windows problems. Honestly, it was probably me, but I'd have to repeat to be sure.
If this happens, this is how to fix it.
How to fix this problem
This says it's for mac, but it doesn't matter.
1.) Go down to the first answer starting with "Try following these if these might help" and do all of it.
2.) Try mvn install again. If it still didn't take, continue to three.
3.) Exit out of the terminal window you're in (leave the first terminal window running)
4.) Open a new terminal window.
5.) Try mvn install again. If it still didn't take:
6.) Repeat this part: type (without quotation marks) "source ~/.bash_profile".
7.) Type mvn install. It will work.
I think I had to do three through seven because I did the instructions in putty instead of in the second terminal window, but I'm not sure since I've only done this once.
Final Notes
The worst that can happen is you'll mess up something and can't figure out what. Do what I do: wipe everything and start over from the top. When I built my server for the first time, I did that like a lot.
For those who are completely new and feeling intimidated:
1.) cd just means change directory.
2.) mkdir is make directory
3.) Nano is basically a text editor - typing nano mydogisalie opens a file called mydogisalie that you're creating. You're using it to create or edit configuration files.
As always, feel free to ask questions. Unlike Alexa, if I don't know the answer, I'll just lie convincingly.
(Note: this will be updated if I remember or run into any other problems)