I have been tinkering with home automation projects over the last few years, messing around with a variety of platforms. I started with a Wink hub and other assorted wifi enabled products, and pretty much glued everything together using IFTTT. This has worked OK, and I have learned a lot over the years. Recently, with my work with the Hue API, I did my first integration that involved writing code, and running that code out at Microsoft Azure. That was a great next step, but the stage is to run a fully programmable local hub that can manage my devices locally (IOT on the edge).
The first step I needed to decide on was what platform to run. I am a Microsoft Windows centric guy, so I was leaning towards building off Windows, but I didn’t see anything I liked. However, now that Microsoft has released the dotnetcore programming library that allows running C# on Linux, that opened up more possibilities. Over the last few months, I finally settled on Raspberry PI, a perfectly adequate machine that you can get for under $100. It also runs on very low power. I put a power meter on it – and it runs consistently at around 4.2 watts – which is about the same as my desktop PC when it is sleeping.
[amazon_link asins=’B07V5JTMV9′ template=’ProductAd’ store=’vgs0c1-20′ marketplace=’US’ link_id=’cc667a40-ba88-4ae9-8592-5b94fa18b1c8′]My first project I settled on came about because of a previous hardware purchase. A while ago, I got a 2 terabyte USB drive at Costco, with the plan to plug it into my router to provide all my PC’s access to a shared large drive. Unfortunately, when I plugged it into the router, it only recognized like 300mg. I theorized that is because the drive is formatted in exFAT to accomodate the large number of bytes, and the router probably doesn’t support that file format. Now I probably could of futzed around for awhile and figured out a good workaround, but thats when I decided to take the plunge and get my first Raspberry PI and use that as my network attached storage.
I received my Raspberry PI from Amazon got started. The hardest part was probably just setting up my work area to start tinkering. I didn’t want to have to swap monitors or keyboards, so I had to dig up an old monitor, mice and keyboard. The raspberry Pi has a HDMI port for the monitor, but unfortunately my monitor didnt support HDMI, so I had to dig up an adapter for it. I also had to buy an 8Gg micro SD card, which delayed me a bit. Once I got my workarea and hardware setup, I just followed the instructions that came with the Pi and I was running Linux in 15 minutes(!) The Pi runs Raspian, which is a flavor of Linux recommended for the PI, and it is more Windows like than I was expecting.
So now that I was semi comfortable with Linux, the next big steps were to attach my USB drive and get Raspian to recognize it. I also needed to figure out how to set up a share so that my windows machines can see the storage, and I decided I wanted to have my Pi run FTP, so I can have my security cameras stream local copies of video recordings to the drive. Getting thos all to work of course mostly involves googling various keywords til you find a solution, and I was amazed at all the support out there for Raspberry Pi. I found step by step instructions on mounting an external drive, setting up a network share (using Samba), and installing FTP and getting FTP to recognize the external drive. Getting FTP to recognize the external drive was probably the most difficult, as there are a couple FTP packages supported by Raspian. But thanks to Ryan Fitton’s post I got it to work.
So now everything is up and running just as I had hoped. Every machine on my network can see the storage, and my cameras are streaming copies of images to the drive. The next step on my roadmap is to start building out the Pi platform. Getting a dotnetcore program to run on my Pi will be the next step. After that.. the sky is the limit.
,
Hi, great blog article. Raspberry Pis are great little machines, i’m glad my post has helped you with your project.
Thanks