mirsal 0ed1871042 Implement sensor status debouncing
This introduces a configurable debouncing delay before which no update
is sent to matrix, which avoids flooding the matrix room with updates
when the door is opened and closed in quick succession. It also allows
to quickly open and close the door without sending notifications.

The debouncing window can be configured in config.yml, see example.
2026-10-07 10:52:14 +00:00
2026-10-07 10:52:14 +00:00
2026-09-14 09:18:54 +00:00
2026-09-14 09:18:54 +00:00
2026-09-14 09:18:54 +00:00
2026-09-16 11:17:22 +00:00

matrix-lolopener

A simple matrix bot which posts to a list of matrix rooms everytime the front door is opened or closed. The door state is retrieved by subscribing to an MQTT topic, and a matrix event is sent every time that state changes.

building

cargo build --release

installing

useradd -r -M -s /usr/sbin/nologin matrix-lolopener
install -o matrix-lolopener -g nogroup target/release/matrix-lolopener /opt/matrix-lolopener/bin/
install -o matrix-lolopener -g nogroup -m 600 -T config.yml.example /opt/matrix-lolopener/etc/config.yml
cp matrix-lolopener.service /etc/systemd/system/
$EDITOR /opt/matrix-lolopener/etc/config.yml
systemctl daemon-reload && systemctl enable --now matrix-lolopener.service

usage

Matrix bot posting when the front door is opened or closed

Usage: matrix-lolopener [OPTIONS]

Options:
  -c, --config <CONFIG>  Configuration file path [default: config.yml]
  -h, --help             Print help
  -V, --version          Print version

contributing

Send PRs to https://git.labolyon.fr/mirsal/matrix-lolopener

license

GPL v3 or later

S
Description
This is a matrix bot which announces the lol hackerspace's open / closed state to a list of matrix rooms, it is based on rumqtt and matrix-rust-sdk and connects to an MQTT broker broadcasting changes in the door sensor state.
Readme GPL-3.0
201 KiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 96.8%
Dockerfile 3.2%