dieugab / home-assistant-config

๐Ÿก Home Assistant configuration to manage ๐Ÿšจ security, โšก energy, ๐ŸŒก heating, ๐Ÿ’ก lighting, ๐Ÿ‘‹ occupancy, ๐Ÿ‘ window decoration and ๐Ÿ”Š multi-room audio
MIT License
15 stars 2 forks source link
automation homeassistant homekit iot lovelace raspberry-pi smarthome yaml zigbee

๐Ÿก Gabriel's homeOS

My smart home built on a Raspberry Pi 4 Model B (4GB) running Home Assistant OS, with a connected ConBee II.

Overview

๐Ÿšจ Home Security | ๐Ÿ“ฑ Mobile control | ๐Ÿ’ก Smart adaptive lighting | ๐Ÿ‘‹ Motion & occupancy sensing | ๐Ÿ‘ Smart curtains & blinds | โšก Energy & solar monitoring | ๐ŸŒก Smart heating & cooling | ๐Ÿ”Š Multi-room audio | ๐ŸŽ› Local control

Hero-combined

Foundation

Miscellaneous

Technical

Software

Hardware

Raspberry Pi 4B ConBee II Synology DS718+ Philips Hue Bridge v2 Hue HDMI Sync Box SwitchBot Hub Mini Apple TV 4K
RaspberryRaspberry USBUSB NASNAS HubHub HDMIHDMI SwitchSwitch Apple TVApple TV
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

Implementation

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:

Home States

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:

Home State Occupancy

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:

Modes

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.