My goal in this project is to a) talk to the garage door with Alexa and my phone, b) secure the endpoint against intruders with SSL and any other means I can think of, c) monitor whether my door is open or closed, d) actually open and close the garage door.
|Isn't it cute?!|
I need to think more about using Alexa as this would mean I would have to expose my little web server to the world and get a public ip address and DNS record. Not sure if I want to do that. You can check out Amazon's requirements for hosting your own web service here. I've had public web servers running in my house before, it's not a big deal. It's just a pain .... to keep it up and secure.
I looked around for resources on the outer webs (aka Google) and started with this post. I bought a trusty garage door remote that I wanted to use as my relay and synced it to my garage door system. It was super easy. I climbed up to the garage door opener and pushed the button and then pushed the button on the remote and VIOLA! The garage door opened.
Next, I went to install the development requirements on my MacBook Air and found that while you can do it - from what I read .... it seemed tricky. I mean NETMF is a Microsoft framework, so I brought out my Surface 1 and began setting it up.
First I had to clean my Surface up - lots of old development environment, so I took some time to remove any existing frameworks and IDE's. I started with this post from Greg Zimmer, which by the way I think he's my new hero. He has several articles on his garage door project too. While the article is written in 2011 .... it was super helpful.
Here's what I did for the Dev Environment:
- Microsoft Visual Studio Community 2015 (I saw posts were people were able to get the professional version of VS working, but since I was using my small Surface - I went with the Community version. You can find it here.
- Next was the most up to date .NET Microsoft Framework (NETMF), which I found to have been moved to CodePlex. You can find SDK v4.3 (QFE2-RTM) which is the most current at this date, here.
- Then the .NET Micro Framework project system which essentially is a plug in for Visual Studio.
- And lastly, the Netduino SDK, which can be found here.
FINALLY, starting my first project.
I followed Greg's blog post found here on completing just a simple program and deploying it to the Netduino. When I deployed, I received the message,
" Cannot deploy the base assembly 'mscorlib' or any of his satellite assemblies to device - USB: Netduino twice. "
Why is the base assembly a he? So, it looks like the the project contains a newer version than what's on the Netduino, so time to look for a firmware upgrade.
I found this YouTube video on upgrading the firmware which looked good enough. Then I went out to www.netduino.com/downloads to look for the most recent update, which was 22.214.171.124 at the time of this writing. Finished deploying the firmware update - redeployed the app and my deployment was successful. I had a blinking light. Yay! (Boooo ... forgot picture of said blinking light).
Now here's where it got interesting. Next I wanted to put a web service on the Netduino so I can get Alexa to send/receive requests. So I started with Greg's post on putting a webservice on the Netduino. That was easy enough and was working quickly.
Now thinking about getting Alexa to hit the web service. At this point I haven't done anything to the Hello World Web Server example. I started looking at small json libraries that could return a response.
And this is where I stopped. First, the Netduino Plus 2 doesn't have wifi capabilities so I would have to run a cable from the garage to my router or find some sort of wifi adapter (sad face). While I was willing to do that, the next point was a stop and think point.
Reviewing the Amazon documentation, Alexa won't talk to any endpoint that does not have a SSL cert and the Netduino Plus 2 does not have that size capability to house one. This post sums it all up.
While one of my goals was to have Alexa talk to my garage door, maybe it's time to review my hardware architecture. I could continue on and complete my mission without Alexa, but I still want to secure my endpoint with something more than a password.
Time to do some more research ..... hello Google.