About This Title

Pages: 175
Published: April 2024
ISBN: 9798888650509
In Beta

Skill Level Meter

Automate Your Home Using Go

Build a Personal Data Center with Raspberry Pi, Docker, Prometheus, and Grafana

by Ricardo Gerardi and Mike Riley

Take control of your home and your data with the power of the Go programming language. Build extraordinary and robust home automation solutions that rival much more expensive, closed commercial alternatives, using the same tools found in high-end enterprise computing environments. Best-selling Pragmatic Bookshelf authors Ricardo Gerardi and Mike Riley show how you can use inexpensive Raspberry Pi hardware and excellent, open source Go-based software tools like Prometheus and Grafana to create your own personal data center. Using the step-by-step examples in the book, build useful home automation projects that you can use as a blueprint for your own custom projects.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $24.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Apr 2024

Beta Books: What do I get?


With just a Raspberry Pi and the Go programming language, build your own personal data center that coordinates and manages your home automation, leveraging the same high-powered software used by large enterprises. The projects in this book are easy to assemble, no soldering or electrical engineering expertise required.

Build a temperature monitor that can send alerts any time defined thresholds are exceeded and report the temperature readings on a time-based series chart. Change the color of lights to visually indicate the current outdoor weather status. Create a networked motion detector that triggers an alert any time motion is detected, such as a door opening or closing, a pet wandering around, or deliveries or visitors arriving on your front porch. Even have these triggers initiate a more complex Go-based automation sequence. Integrate a small, high-resolution camera into a bird feeder that takes excellent, up-close photos whenever a bird perches at the feeder, and broadcasts them to your Discord server where your family and friends can see these wildlife captures in real time.

Control your home with hardware you configure, and manage it with Go code that you create and modify any time you want to enhance your home automation capabilities.

What You Need

Readers should be familiar with the Go programming language and have working knowledge of Linux. Free, open source Go-based libraries and utilities are available for download from the Internet. Readers will also need a working Raspberry Pi 3+ or higher, and a Pi Pico W microcontroller. Several other inexpensive electronic parts (touch sensors, motion detectors) are also needed for some of the projects. A Philips Hue base lighting system is also needed for the weather monitor project.

Resources

Releases:

  • B2.0 2023/12/21
  • B1.0 2023/10/31

Contents & Extracts

Note: Contents and extracts of beta books will change as the book is developed.

  • Introduction
  • Setup
    • Getting Started excerpt
      • Your Personal Data Center
      • Selecting a Raspberry Pi
      • Adding Other Hardware Components
      • Configuring the Software
      • Picking a Code Editor
      • Next Steps
    • Building a REST API Server
      • Writing the Code
      • Containing the Server
      • Next Steps
    • Deploying Your Personal Data Center
      • Deploying Applications With Linux Containers
      • Managing Source Code with Gitea
      • Monitoring and Alerting with Prometheus
      • Visualizing Data with Grafana
      • Next Steps
  • Projects
    • Networking a Temperature Monitor excerpt
      • Creating A Pico W Development Environment
      • Polling the Temperature
      • Creating the Pico W REST Server
      • Creating the Prometheus Exporter
      • Containing and Deploying the Exporter
      • Creating the Grafana Dashboard
      • Next Steps
    • Checking the (Garage) Door
      • Assembling the Parts
      • Coding the Ultrasonic Sensor
      • Creating the dashboard
      • Configuring the Alerts
      • Next Steps
    • Lighting the Weather excerpt
      • Polling the Weather
      • Changing the Color
      • Putting it All Together
      • Configuration
      • Containerize and Deploy
      • Next Steps
    • Watching the Birds
      • Hardware
      • Setting Up the Camera
      • Software
      • Motion Notifications
      • Containing the Application
      • Configuring the Bird Feeder
      • Next Steps
    • Go Build
      • Designing Additional Projects
      • Expanding the Technologies
      • Improving Security
      • Advancing Electronics
      • Having Fun

Author

Ricardo Gerardi is an IT professional with over 20 years experience in large and small companies, including serving as a Principal Automation Consultant at Red Hat. Ricardo has been developing command line tools for a long time, for different purposes including automation, monitoring, and data analysis tools, and he has now adopted Go for all his projects.

Mike Riley is the author of several titles published by Pragmatic Bookshelf, as well as a member of the company’s Technical Advisory Board. He has been tinkering with computers since the late 70s beginning with the Tandy TRS-80, and has been a lifelong adventurer in science and technology.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $24.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Apr 2024

Beta Books: What do I get?

Related Titles:

Skill Level Meter

About This Title

Pages: 175
Published: April 2024
ISBN: 9798888650509
Edition: 1
In Beta