ggazzi / elightscape

A controller for smart lights, built with Elixir, adding onto Home Assistant.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Elightscape

This is a controller for smart lights, built with Elixir. It is meant to integrate with Home Assistant (doing the actual control of the devices and providing an UI) and Zigbee2MQTT (taking inputs directly from devices).

For now, the configuration is hard-coded for my place. Eventually, this might become a more configurable project.

Taxonomy

An instance of Elightscape controls a single home, which may contain multiple rooms, each of which has its own set of lights.

Moreover, each room has a set of named scenes, that is, configurations of lights. Such scenes always come in two different versions for the different times of day: day and night.

Each room also has a controller, which is responsible for changing the lights according to a given set of inputs. Inputs are, for example: other devices, triggers from Home Assistant. Each kind of input is handled by an input driver, which is given a configuration and is responsible for listening to this input, pre-processing any events and sending them to the appropriate controller.

Behaviour of Inputs

This section is preliminary. I am documenting the behaviour as it is currently implemented.

IKEA Remotes

  • Toggle button: the behaviour will vary according to the current (visible) state and the number of clicks
    • When clicked once: if the lights are currently on, they are turned definitively off; if the lights are turned off, they are turned on with a timeout

About

A controller for smart lights, built with Elixir, adding onto Home Assistant.

License:MIT License


Languages

Language:Elixir 98.7%Language:Dockerfile 0.7%Language:Nix 0.6%