Fully automatic light management based on motion, daytime, brightness and even humidity 💦 🚿
🕓 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")
🔒 locks the light if the light was manually turned on
- successor of the famous original ad-AutoMoLi (written in Python as AppDaemon plugin/app) -
via go install
go install github.com/benleb/automoli-go@latest
see the example config for a multi-room configuration with different daytimes and sensors and settings.
# run
automoli-go run --config ~/automoli.yaml
# more options
automoli-go --help
this is an example how the systemd service file can be used for running AutoMoLi as a service. uuser, group and repo/config directory may need to be adjusted.
# clone repo
git clone https://github.com/benleb/automoli-go ~/automoli
# create a new user and group for automoli
useradd --system --home-dir /etc/automoli --user-group automoli
# create config directory and set permissions
mkdir /etc/automoli && chown automoli:automoli /etc/automoli
# link or copy the systemd service file
ln -s ~/automoli/automoli.service /etc/systemd/system/automoli.service
# build for current platform
goreleaser build --clean --snapshot --single-target
# build for specific platform
GOOS="linux" GOARCH="amd64" GOAMD64="v3" goreleaser build --clean --snapshot --single-target
with ko
# build image and push to registry
KO_DOCKER_REPO=your.registry.io:5000 ko build --verbose --base-import-paths --tags dev
with golangci-lint
# run all linters
golangci-lint run --verbose --enable-all --fix --max-issues-per-linter 0 --max-same-issues 0
# run tests with coverage
go test -cover ./...
vith goreleaser triggered by a git tag
# create a new annotated tag
git tag -a "vX.Y.Z" -m "short release description vX.Y.Z"
# push tag to trigger the release workflow
git push --follow-tags