Coder Social home page Coder Social logo

dailytab / home-assistant-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from faizacodes/home-assistant

0.0 0.0 0.0 6.39 MB

๐Ÿก Home Assistant to control ๐Ÿšจ security, ๐Ÿ”‹ energy, ๐ŸŒก heating, ๐Ÿ’ก lighting, ๐Ÿ‘‹๐Ÿป occupancy, ๐Ÿ‘ window decoration and ๐Ÿ”Š multi-room audio

License: MIT License

JavaScript 1.79% Python 98.21%

home-assistant-1's Introduction

๐Ÿก Azat's homeOS

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.

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

  • ๐Ÿšจ 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

Miscellaneous

  • ๐Ÿ–ฅ๏ธ 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

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:

  • 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

Home States

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 occupation Sleeper and turns off lights and devices

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:

  • ๐Ÿ  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

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.

  • ๐Ÿฟ 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

Project Status

Alt

home-assistant-1's People

Contributors

temirovazat avatar renovate[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.