All Projects → benleb → ad-automoli

benleb / ad-automoli

Licence: MIT license
💡 Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ad-automoli

ad-ench
👩‍⚕️🔋 AppDaemon entity check app. Currently supports battery level, unknown/unavailable states, stale entities
Stars: ✭ 24 (-75.76%)
Mutual labels:  appdaemon, hacs, appdaemon-apps
ad-alexatalkingclock
Alexa (or other Smart Speakers) tell you the time without asking every hour. Please ⭐️if you like my app :)
Stars: ✭ 30 (-69.7%)
Mutual labels:  appdaemon, hacs, appdaemon-apps
ha-config-ataraxis
My Home Assistant Configs. If you like what you see, please ⭐️my repo. It would encourage me a lot 🤘
Stars: ✭ 146 (+47.47%)
Mutual labels:  appdaemon, hacs, appdaemon-apps
home assistant appdaemon alexa google
An AppDaemon application for Home Assistant, handles calls from Alexa Skill and a Google Action
Stars: ✭ 11 (-88.89%)
Mutual labels:  appdaemon, appdaemon-apps
lifelights
Video games blended with home automation. Control your IoT devices based on in-game statuses!
Stars: ✭ 80 (-19.19%)
Mutual labels:  hue, lights
HueLightDJ
Hue Light DJ using Hue Entertainment API
Stars: ✭ 54 (-45.45%)
Mutual labels:  hue, lights
hass-hue-icons
Additional vector icons for home assistant to model Philips Hue bulbs and fixtures.
Stars: ✭ 161 (+62.63%)
Mutual labels:  hue, hacs
jarvis
Jarvis Home Automation
Stars: ✭ 81 (-18.18%)
Mutual labels:  hue, lights
hueplusplus
A simple C++ library to control Philips Hue lights on Linux, MacOS, Windows, Espressif ESP32 SDK and Arduino. Full documentation at
Stars: ✭ 48 (-51.52%)
Mutual labels:  hue, lights
MeteoalarmCard
Meteoalarm, Météo-France and DWD severe weather warnings card for Home Assistant Lovelace UI ⛈️
Stars: ✭ 48 (-51.52%)
Mutual labels:  hacs
react-native-template
An enterprise react-native template application showcasing - Testing strategy, Global state management, middleware support, a network layer, component library integration, localization, navigation configuration and CI
Stars: ✭ 32 (-67.68%)
Mutual labels:  scenes
embedded-sht
Embedded SHT Drivers for Sensirion Temperature and Humidity Sensors - Download the Zip Package from the Release Page
Stars: ✭ 53 (-46.46%)
Mutual labels:  humidity
SHT31
Arduino library for the SHT31 temperature and humidity sensor
Stars: ✭ 26 (-73.74%)
Mutual labels:  humidity
power-distribution-card
A Lovelace Card for visualizing power distributions.
Stars: ✭ 117 (+18.18%)
Mutual labels:  hacs
ArduinoWeatherOS
Arduino Uno, 433MhzRx and OS WMR86 Weather Station
Stars: ✭ 69 (-30.3%)
Mutual labels:  humidity
atomic-calendar-revive
An advanced calendar card for Home Assistant Lovelace.
Stars: ✭ 218 (+120.2%)
Mutual labels:  hacs
hacs-hubitat
A Hubitat integration for Home Assistant
Stars: ✭ 126 (+27.27%)
Mutual labels:  hacs
hass-truenas
TrueNAS integration for Home Assistant
Stars: ✭ 33 (-66.67%)
Mutual labels:  hacs
Indego
Home Assistant Custom Component for Bosch Indego Lawn Mower
Stars: ✭ 42 (-57.58%)
Mutual labels:  hacs
code-sync
Collaborative cloud platform for students, teachers, and professionals.
Stars: ✭ 28 (-71.72%)
Mutual labels:  room

automoli

Fully automatic light management based on motion as AppDaemon app.

🕓 multiple daytimes to define different scenes for morning, noon, ...
💡 supports Hue (for Hue Rooms/Groups) & Home Assistant scenes
🔌 switches lights and plugs (with lights)
☀️ supports illumination sensors to switch the light just if needed
💦 supports humidity sensors as blocker (the "shower case")
🔍 automatic discovery of lights and sensors
⛰️ stable and tested by many people with different homes

Getting Started

Docker Image (amd64, arm and arm64)

You can try AutoMoLi via Docker without installing anything! The Image is the default AppDaemon one with AutoMoLi and a simple default configuration added. See the AppDaemon Docker Tutorial on how to use it in general.

AutoMoLi expects motion sensors and lights including a room name. The exact patterns are listed in Auto-Discovery of Lights and Sensors You can set a room with the AUTOMOLI_ROOM variable in the Docker run command.

docker run --rm --interactive --tty --name AutoMoLi \
--env HA_URL="<HA URL>" \
--env TOKEN="<HA Token>" \
--env AUTOMOLI_ROOM="bathroom" \
--ports 5050:5050 \
benleb/automoli:latest

Port 5050 is opened to give access to the AppDaemon Admin-UI at http://127.0.0.1:5050

Example

To test AutoMoLi in your Esszimmer (german for dining room), use ... --env AUTOMOLI_ROOM="esszimmer" ... in the Docker run command.

  • AppDaemon will show you its config file on startup: cfg

  • If everything works, AutoMoLi will show you the configuration it has parsed, including the discovered sensors: cfg-loaded

  • This is how it looks when AutoMoLi manages your lights: running

Installation

Use HACS or download the automoli directory from inside the apps directory here to your local apps directory, then add the configuration to enable the automoli module.

Example App Configuration

Add your configuration to appdaemon/apps/apps.yaml, an example with two rooms is below.

livingroom:
  module: automoli
  class: AutoMoLi
  room: livingroom
  disable_switch_entities:
    - input_boolean.automoli
    - input_boolean.disable_my_house
  delay: 600
  daytimes:
      # This rule "morning" uses a scene, the scene.livingroom_morning Home Assistant scene will be used
    - { starttime: "sunrise", name: morning, light: "scene.livingroom_morning" }

    - { starttime: "07:30", name: day, light: "scene.livingroom_working" }

      # This rule"evening" uses a percentage brightness value, and the lights specified in lights: below will be set to 90%
    - { starttime: "sunset-01:00", name: evening, light: 90 }

    - { starttime: "22:30", name: night, light: 20 }

      # This rule has the lights set to 0, so they will no turn on during this time period
    - { starttime: "23:30", name: more_night, light: 0 }

  # If you are using an illuminance sensor you can set the lowest value here that blocks the lights turning on if its already light enough
  illuminance: sensor.illuminance_livingroom
  illuminance_threshold: 100

  # You can specify a light group or list of lights here
  lights:
    - light.livingroom

  # You can specify a list of motion sensors here
  motion:
    - binary_sensor.motion_sensor_153d000224f421
    - binary_sensor.motion_sensor_128d4101b95fb7

  # See below for info on humidity
  humidity:
    - sensor.humidity_128d4101b95fb7


bathroom:
  module: automoli
  class: AutoMoLi
  room: bathroom
  delay: 180
  motion_state_on: "on"
  motion_state_off: "off"
  daytimes:
    - { starttime: "05:30", name: morning, light: 45 }
    - { starttime: "07:30", name: day, light: "Day" }
    - { starttime: "20:30", name: evening, light: 100 }
    - { starttime: "sunset+01:00", name: night, light: 0 }

  # As this is a bathroom there could be the case that when taking a bath or shower, motion is not detected and the lights turn off, which isnt helpful, so the following settings allow you to use a humidity sensor and humidity threshold to prevent this by detecting the humidity from the shower and blocking the lights turning off.
  humidity:
    - sensor.humidity_128d4101b95fb7
  humidity_threshold: 75

  lights:
    - light.bathroom
    - switch.plug_68fe8b4c9fa1
  motion:
    - binary_sensor.motion_sensor_158d033224e141

Auto-Discovery of Lights and Sensors

AutoMoLi is built around rooms. Every room or area in your home is represented as a seperate app in AppDaemon with separat light setting. In your configuration you will have one config block for every room, see example configuration.
For the auto-discovery of your lights and sensors to work, AutoMoLi expects motion sensors and lights including a room name (can also be something else than a real room) like below:

  • sensor.illumination_room
  • binary_sensor.motion_sensor_room
  • binary_sensor.motion_sensor_room_something
  • light.room

AutoMoLi will detect them automatically. Manually configured entities will take precedence.

Configuration Options

key optional type default description
module False string automoli The module name of the app.
class False string AutoMoLi The name of the Class.
room False string The "room" used to find matching sensors/light
disable_switch_entities True list/string One or more Home Assistant Entities as switch for AutoMoLi. If the state of any entity is off, AutoMoLi is deactivated. (Use an input_boolean for example)
only_own_events True bool Track if automoli switched this light on. If not, an existing timer will be deleted and the state will not change
disable_switch_states True list/string ["off"] Custom states for disable_switch_entities. If the state of any entity is in this list, AutoMoLi is deactivated. Can be used to disable with media_players in playing state for example.
disable_hue_groups False boolean Disable the use of Hue Groups/Scenes
delay True integer 150 Seconds without motion until lights will switched off. Can be disabled (lights stay always on) with 0
motion_event True string replaced by motion_state_on/off
daytimes True list see code Different daytimes with light settings (see below)
transition_on_daytime_switch True bool False directly activate a daytime on its start time (instead to just set it as active daytime used if lights are switched from off to on)
lights True list/string auto detect Light entities
motion True list/string auto detect Motion sensor entities
illuminance True list/string Illuminance sensor entities
illuminance_threshold True integer If illuminance is above this value, lights will not switched on
humidity True list/string Humidity sensor entities
humidity_threshold True integer If humidity is above this value, lights will not switched off
motion_state_on True integer If using motion sensors which don't send events if already activated, like Xiaomi do, add this to your config with "on". This will listen to state changes instead
motion_state_off True integer If using motion sensors which don't send events if already activated, like Xiaomi do, add this to your config with "off". This will listen to the state changes instead.
debug_log True bool false Activate debug logging (for this room)

daytimes

key optional type default description
starttime False string Time this daytime starts or sunrise
name False string A name for this daytime
delay True integer 150 Seconds without motion until lights will switched off. Can be disabled (lights stay always on) with 0. Setting this will overwrite the global delay setting for this daytime.
light False integer/string Light setting (percent integer value (0-100) in or scene entity

Meta

Ben Lebherz: automation lover ⚙️ developer & maintainer - @benleb | @ben_leb

This project is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].