Home Automation: Day 1

Home Automation: Day 1

Yesterday I purchased Automate Your Home Using Go while looking for something to read on my plane ride home.

Not knowing if I would fully embark on the instructions I was excited to read and see if I found the book interesting. After diving in while crusing through the air I decided I would follow along and do the projects. My thought is it will help me learn more about managing and monitoring services and integrating software with hardware while also having some fun. There is a lot of potential for tweaking the projects to make them my own and support my own use cases.

One use that comes to mind is being alerted with my cat is at the sliding glass door.

The book offers a guide to setting up a home rest api and data center that support building several projects. The projects include

  • Networking a Temperature Monitor
  • Checking the (Garage) Door
  • Lighting the Weather
  • Watching the Birds

There are several hardware components that will be required to complete the projects. In order to get the ball rolling I started with acquiring the correct raspberry pi model.

Some other components that will be required are

I already have a raspberry pi 3 model b but the book says a minimum of 4 model b + so I ordered a Raspberry Pi 5 - 8GB which is the best option at the moment.

Since I dont have my new raspberry pi yet, I followed the instructions on my mac to create a simple rest server with GO. The server is initially setup with two routes. One shows a simple message with the name of the server and the other returns the current datetime.

After writing the code to run the routes mentioned above and running it. I created a docker file in order to provide instructions to build the go app in docker image.

After quickly testing running the container and connecting to each route to confirm the functionality I thought this was a a good stopping point to wait for my raspberry pi to arrive. The next step requires installation of Gitea, Prometheus, and Grafana. My understanding is these will help monitor the services I set up by providing metrics and alerts.

The raspberry pi is expected to arrive in July 12th. At that point I will have to set up the computer and quickly do this work again and continue on with the next steps.