Home Automation with Zigbee and Node Red

There’s something incredibly futuristic feeling about opening your front door and having the lights turn on automatically, or walking out of the house and all the lights in the house turn off behind you. It reminds me of the science fiction books that i used to read as a kid that would talk about automatic houses that would do your chores for you and turn on/off as you walked into different rooms. Sadly there are no robots that will make my bed, unload the dishes from the dishwasher, or fold my laundry like in those science fiction books, so for now i have to be content with just automated lights and sensors.

Setup

My Home Automation deployment has gone through a couple iterations over the last 5-6 years. I originally started out with a Raspberry Pi 3B running Home Assistant OS with the Phoscon Conbee II ZigBee USB Gateway plugged into the USB port, with the Deconz and NodeRed addons installed. As my homelab grew and I setup a home server and started playing around with virtualization I decided to virtualize and migrate Home Assistant to a Docker container within my physical Unraid Server. That worked without issue as well for a couple of years until I virtualized my Unraid Server a few months back and brought my configuration to what it is now.

My current setup looks like this: My Phoscon Conbee II ZigBee USB is plugged into one of my Proxmox nodes and the USB device is passed through to my Unraid virtual machine. The USB device then gets passed through again to the deCONZ docker container which exposes an API for NodeRed and Home Assistant to connect to for device triggers/controls.

HomeAutomationDiagram.drawio.svg

HomeAutomationDiagram.drawio

Automation Ideas

Some of my favorite automations:

Turn All Lights off When Leaving House

  • Trigger: When Front Door Opened > Delay 15 Minutes > Ping Phone IP Address > If Ping is greater than 1000 (Node Red Ping Failed) > Turn All Lights Off

2024-07-09_00-06.png

Dimming Lights in the Evening

  • I have dimable + temperature adjustable zigbee bulbs and in the evening i have them automatically dim / change to a warmer temperature to help with maintaining a natural circadian rhythm. 59888a3b601f57ebb3097ee05bab9239.png

Fingerbot for Pressing Physical Buttons

I bought one of these Zigbee Fingerbots Amazon Link a few months to control my AC Unit. It stores an internal ON/OFF variable within itself which makes it easy to check the status of my AC Unit and toggle it on/off based on that.

  • Add Picture of node flow

NTFY Notifications

  • Setup Directions: https://docs.ntfy.sh/examples/#node-red

Last updated on August 27, 2024. For any questions/feedback, email me at blog@zinchuk.xyz.