My smart home built on a Raspberry Pi 4 Model B (4GB) running Home Assistant OS, with a connected ConBee II Zigbee stick, Synology DS718+ NAS, Philips Hue Bridge v2, Hue HDMI Sync Box, SwitchBot Hub Mini and Apple TV 4K.
๐จ Home Security | ๐ฑ Mobile control | ๐ก Smart adaptive lighting | ๐๐ป Motion & occupancy sensing | ๐ Smart curtains & blinds | ๐ Energy & solar monitoring | ๐ก Smart heating & cooling | ๐ Multi-room audio | ๐ Local control
- ๐จ Home secured with a combination of Aqara contact sensors, Sonos speakers and HomeKit Secure Video
- ๐ฑ Most things are controlled in the Apple Home app through HomeKit, and controlled through the Lovelace home assistant
- ๐ก All lights adapt throughout the day and are color or warm/white Zigbee lights from IKEA or Signify
- ๐๐ป Every room contains Hue, Aqara or IKEA motion sensor(s) for occupancy and controlling lights
- ๐ Windows automated with SwitchBots and IKEA roller blinds
- ๐ Energy and solar power monitored by the Homewizard Energy P1 meter and Solar inverter (SEMS)
- ๐ก Heating is controlled by Aqara and Sonoff temperature sensors in combination with Tuya devices and Sonoff relays behind electric radiators
- ๐ Multi-room audio implemented with Sonos speakers (& Sonos+IKEA)
- ๐ Every room (save a few exceptions) contain physical Hue or IKEA Zigbee switches to manually control the lights
- ๐ฅ๏ธ Android TV and Apple TV can be controlled through Lovelace or HomeKit
- ๐ฎ Game consoles can be controlled through Lovelace or HomeKit
- ๐งบ Washer state is monitored using SmartThings in Lovelace and notified in HomeKit through a lock entity
- ๐จ Air purification is done using a Smartmi purifier controlled through Lovelace (via helpers) or HomeKit (directly)
- ๐จ๏ธ HP Printer & ink state is monitored in Lovelace
- Home Assistant OS is accessible away from home through Nabu Casa Cloud
- The Zigbee network runs on the deCONZ add-on
- Home Assistant's database runs on MariaDB
- Lovelace uses my custom homeOS theme, based on work by JuanMTech
- Daily backups are created and stored remotely through SMB using the Samba Backup add-on
- Home Assistant iOS app notifies me about new updates for Core, deCONZ, DSM and Custom Integrations
- Files and SSH are accessible using the Samba share, SSH & Web Terminal and File Editor add-ons
- This Git was setup using a community guide and Atlassian Git Cheatsheet
Raspberry Pi 4B | ConBee II | Synology DS718+ | Philips Hue Bridge v2 | Hue HDMI Sync Box | SwitchBot Hub Mini | Apple TV 4K |
---|---|---|---|---|---|---|
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
Runs Home Assistant OS and it's add-ons like SSH and SMB from a Kingston A400 SSD | USB-gateway connected through a USB2.0 Extension cable to connect all my Zigbee nodes. | Stores SMB backups and contains a Homebridge instance for devices Home Assistant doesn't support. | In use to control the entertainment area in conjuction with the HDMI Sync Box and OTAU Hue devices. | In use for the Ambilight behind the tv and the rest of the entertainment area in conjuction with the Hue Bridge. | In use to connect to SwitchBot Curtains, runs through HomeBridge to Home Assistant. | In use as HomeKit Home Hubs to run location automations and control the Home app when away. |
Icons by Icons8
In general, whenever I built something in Home Assistant it uses the following structure: an Automation to control a Switch, which triggers a Script(s). Major exceptions to this rule are:
- deCONZ devices, which are controlled directly with Automations by listening for events,
- Motion sensors, which are controlled by an Automation per sensor
- Notifications, which listen for state changes and calls the Notify service
Globally, the configuration of my home assistant follows the State path during the day, which controls how certain Automations, and thus switches and scripts, are started: โ
๏ธ Morning
โข โ๏ธ Day
โข ๐ Evening
โข ๐ Night
.
Each Home state is controlled by a switch and the corresponding Select input, which run scenarios in the background. All of them are either executed automatically through Automation, or can be invoked through the Home app or a physical controller. Roughly, the corresponding actions are as follows:
- โ
๏ธ
Morning
turns off the outside lights and opens all curtains except the bedroom. - โ๏ธ
Day
provides a home occupancy setting, opens all curtains and starts some automatic functions in the bedroom - ๐
Evening
turns on the lights outside and in the living room, and closes all the blinds - ๐
Night
provides the setting of the occupationSleeper
and turns off lights and devices
While Home States are mostly based on time and/or sun-position, I've also created Home State Occupancy as an additional variable based on location data. Similarly, these are controlled by Switches and an Input Select, which runs Scripts. Some of these, like Away
and On vacation
run automatically through Automations. Others, like Sleeping
need to specifically be called, either through a Home app or physical controller. The following occupancy state transitions are possible:
- ๐
Home
โข ๐คSleeping
turns security on, dims lights, adjusts heating and runs certain bedroom automations - ๐
Home
โข ๐Away
turns security on, turns off lights & devices and lowers heating - ๐
Away
โข โฑ๏ธOn vacation
ensures Home State automations will run as if someone's home - ๐ค
Sleeping
| ๐Away
| โฑ๏ธOn vacation
โข ๐Home
turns security off, adapts lights and turns on heating
Additionally, there are a couple of Modes which can be manually turned on depending on the situation. Turning them off runs the corresponding script actions of the currect Home State to ensure a smooth transition back to the status quo.
- ๐ฟ
Cinema Mode
ensures the ideal movie watching experience, by turning on the tv, closing the curtains and turning off or dimming certain lights - ๐
Party Mode
ensures no automations are run that interfere with guests, like curtains opening, alarms triggering or lights dimming - ๐
Privacy Mode
ensures the living room is secured against prying eyes from outside, by closing the curtains, dimming lights, disabling camera's and playing music