Building a Comprehensive Smart Home System with TrueNAS Scale, Raspberry Pi 5, and Energy Monitoring

admin Avatar

In today’s rapidly evolving tech landscape, creating a smart home setup that not only meets but exceeds your needs is more accessible than ever. In this blog, I’ll walk you through my current smart home setup, which leverages the power of an Aoostar R1 mini PC running TrueNAS Scale, a Raspberry Pi 5 with a Google Coral TPU for advanced video surveillance, and a robust energy monitoring system. This setup allows for advanced automation, remote access, integrated surveillance, and detailed energy consumption monitoring—all managed from a single, central hub.


1. The Core of the System: Aoostar R1 Mini PC with TrueNAS Scale

Hardware Specifications:

  • Mini PC: Aoostar R1
  • Storage: 256GB NVMe SSD for the operating system and two NAS HDDs for data storage.
  • RAM: 16GB
  • Operating System: TrueNAS Scale

Virtualization with TrueNAS Scale:

TrueNAS Scale serves as the backbone of my smart home system, providing robust storage and virtualization capabilities. The Aoostar R1’s 16GB RAM and ample storage allow for smooth operation of multiple virtual machines (VMs) and containers, ensuring seamless performance across the board.

Home Assistant as a Virtual Machine:

One of the key components of this setup is Home Assistant, running as a VM within TrueNAS Scale. Home Assistant acts as the brain of my smart home, enabling integration and control of various smart devices throughout the house.

  • Zigbee Adapter: A Sonoff ZBDongle-P connected to Home Assistant facilitates Zigbee communication.
  • Connected Zigbee Devices:
  • Door Sensor: Provides real-time updates on the status of the main entrance.
  • Kitchen Lights: Fully automated, responding to both voice commands and routines.
  • Human Presence Sensor: Monitors movement in key areas, enhancing security and automation.

Kubernetes with Plex and Tailscale:

In addition to Home Assistant, I have set up two essential applications using Kubernetes:

  • Plex: Running as a Kubernetes app, Plex provides seamless media streaming, making all my digital content easily accessible on any device.
  • Tailscale: Tailscale ensures secure remote access to my network, allowing me to control and monitor my smart home even when I’m away.

2. Surveillance with Raspberry Pi 5 and Frigate NVR

Hardware Specifications:

  • Raspberry Pi 5: 4GB RAM
  • Storage: M.2 SSD via a HAT
  • AI Acceleration: Google Coral TPU M.2

Frigate NVR Setup:

For my video surveillance needs, I’ve employed a Raspberry Pi 5 running Frigate, an open-source NVR designed for AI-based object detection. The integration with a Google Coral TPU accelerates the video processing capabilities, allowing for real-time analysis of video feeds from multiple cameras.

  • Cameras:
  • Front Camera: Monitors the front yard, focusing on entrance areas.
  • Back Camera: Keeps an eye on the backyard for added security.

Integration with Home Assistant:

Frigate is connected to Home Assistant via MQTT, ensuring that all motion events, object detections, and alerts are seamlessly integrated into my smart home system.

  • Automations:
  • Front Door Alerts: Notifications are triggered when a person is detected at the front door.
  • Backyard Monitoring: The presence of an unfamiliar person in the backyard triggers security lights and sends an alert to my phone.

3. Energy Monitoring System: Tracking Power Usage with Tapo and Tuya

In addition to automation and surveillance, monitoring energy usage is crucial for both efficiency and cost savings. My energy monitoring system comprises Tapo smart plugs and a Tuya CT clamp, all integrated with Home Assistant for detailed insights and automation.

Hardware Setup:

  • Tapo Smart Plugs:
  • Tapo P100 (Water Filter): Tracks the power usage of the water filtration system.
  • Tapo P100 (Workstation): Monitors the power consumption of my workstation, providing insights into energy usage during work hours.
  • Tuya CT Clamp:
  • Connected via Local Tuya: This clamp measures the total power consumption of various circuits, offering a comprehensive view of energy usage.

Integration with Home Assistant:

Using the Local Tuya Home Assistant addon, I’ve integrated these energy monitoring devices into my smart home system. This integration allows me to:

  • Monitor Power Usage in Real-Time: View real-time data on the energy consumption of my water filter, workstation, and other monitored circuits.
  • Set Up Automation:
  • Automatic Alerts: Receive notifications if the power usage exceeds a certain threshold.
  • Efficiency Analysis: Use the gathered data to optimize power consumption, ensuring that no device is left running unnecessarily.

4. Combining Automation, Surveillance, and Energy Monitoring

The beauty of this setup is how everything works together:

  • Energy-Saving Automations: I’ve set up Home Assistant to automatically turn off the workstation and kitchen lights if no presence is detected for a certain period, based on data from the Zigbee human presence sensor.
  • Security and Power Monitoring: If the Frigate system detects movement outside during certain hours, the Tuya CT clamp monitors increased power usage (indicating lights or other devices turning on), triggering a notification and video recording.

5. Conclusion

By integrating a powerful TrueNAS Scale system with Raspberry Pi 5, Frigate NVR, and a robust energy monitoring setup, I’ve created a smart home that not only offers security and convenience but also helps manage energy consumption efficiently. This setup is scalable, future-proof, and offers a centralized control system that makes managing my home both easy and effective.

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest Posts