My smart home built on a Raspberry Pi 4 Model B (4GB) running Home Assistant OS, with a connected ConBee II.
๐จ 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 is secured using a combination of Aqara contact sensors, Sonos speakers and HomeKit Secure Video
- ๐ฑ Most everything is controlled in the Apple Home app through HomeKit, and managed through Home Assistant Lovelace
- ๐ก All lights adapt throughout the day and are color or warm/white Zigbee bulbs by IKEA or Signify
- ๐ Every room contains Hue, Aqara or IKEA motion sensor(s) for occupancy and controlling lights
- ๐ Window covers are automated using SwitchBots and IKEA roller blinds
- โก Energy and solar are monitored by a 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 is realized using Sonos (& Sonos+IKEA) speakers
- ๐ 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, my Home Assistant config follows a State path during the day, which controls how certain Automations, and thus Switches and Scripts run: โ
๏ธ Morning
โข โ๏ธ Day
โข ๐ Evening
โข ๐ Night
Each Home State is controlled by a Switch and corresponding Input Select, which run Scripts in the background. All of these either run automatically through Automations, or can be called through a Home app or a physical controller. Roughly, the corresponding actions are as following:
- โ
๏ธ
Morning
turns off outside lights, and opens all the blinds except the bedroom - โ๏ธ
Day
ensures theHome
Occupancy is set, opens all curtains and runs certain bedroom automations - ๐
Evening
turns on outside and living room lights, and closes all curtains - ๐
Night
ensures theSleeping
Occupancy is set and turns off lights & 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