Control LIFX lights using buttons and/or motion sensors This software currently supports two lifx lights and two buttons. The buttons will toggle the lights on and off. It also supports a motion sensor and photo resistor. When the motion sensor triggers it will turn the light on. The photo resistor is used to supress this when there is already enough light.
The zl shell provides access to internal configuration of zephyr lights
zl threshold <value> - get/set the threshold value for the photoresistor
zl daylight - Displays the current daylight reading
zl list - list the lights
zl squashed <on/off> - get/set the supression of motion events
zl led <num> - get/set the ready_led
zl address
zl dump
zl lightone
zl lighttwo
This repository has submodules. Either clone with the --recursive flag or do a git submodule init ; git submodule update after cloning
This repository require the creation of a local.conf file in the root directory. The local.conf may contain the following lines:
- CONFIG_PRECONFIG_WIFI is a boolean which if true sets the initial SSID and PSK to the values in CONFIG_WIFI_SSID and CONFIG_WIFI_PSK if false it will default to bringing up the wifi as an AP for configuration
- CONFIG_WIFI_SSID="<Your SSID>"
- CONFIG_WIFI_PSK="<PreShared Key to Your SSID>"
- CONFIG_LIGHT_ONE="<lifx name of the first light>"
- CONFIG_LIGHT_TWO="<lifx name of the second light>"
- CONFIG_DAYLIGHT_THRESHOLD=
The value of the CONFIG_DAYLIGHT_THRESHOLD is highly dependent on the type of photoresistor that is used.
Please do not check local.conf into the repository as it contains site specific proriaitary information,
The microcontroller must be able to talk over IP to the light bulbs. The current supported hardware is:
esp32_devkitc/esp32/procpu
esp32c3_devkitm
rpi_pico_w
The doc directory contains a fiew fritzing files for breadboarding
Keep only configured lights debounce motion and daylight