All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- added systemd user service config for autostart (#66)
1.0.0 - 2025-01-04
- suspend when receiving message on topic
systemctl/[hostname]/suspend
(#97) - birth & last will message on topic
systemctl/[hostname]/status
("online" / "offline", #38) - command-line option
--monitor-system-unit [unit_name]
enables reports on topicsystemctl/[hostname]/unit/system/[unit_name]/active-state
(#56) - automatic discovery in home assistant:
- availability status
- entity
button.[hostname]_logind_lock_all_sessions
- entity
button.[hostname]_logind_poweroff
- entity
button.[hostname]_logind_suspend
- entity
sensor.[hostname]_unit_system_[unit_name]_active_state
for each command-line parameter--monitor-system-unit [unit_name]
- command-line option
--log-level {debug,info,warning,error,critical}
- suggest polkit rule when poweroff & locking fails due to
org.freedesktop.DBus.Error.InteractiveAuthorizationRequired
(#67) - declare compatibility with
python3.11
,python3.12
&python3.13
- disable
retain
flag on topicsystemctl/[hostname]/preparing-for-shutdown
- migrated from dbus-python to pure-python jeepney (removes indirect dependency on libdbus, glib, PyGObject and pycairo, fixes #39)
- migrate from paho-mqtt to its async wrapper aiomqtt
- automatic discovery in home assistant:
- replaced component-based (topic:
<discovery_prefix>/binary_sensor/<node_id>/preparing-for-shutdown/config
) with device-based discovery (<discovery_prefix>/device/<object_id>/config
) - replaced command-line option
--homeassistant-node-id
with--homeassistant-discovery-object-id
- renamed entity
binary_sensor.[hostname]_preparing_for_shutdown
tobinary_sensor.[hostname]_logind_preparing_for_shutdown
- disabled "retain" flag for discovery messages (to avoid reappearing ghost devices)
- replaced component-based (topic:
- container image / dockerfile:
- upgraded alpine base image from 3.13.1 to 3.21.0 including upgrade of python from 3.8 to 3.12
- support build without git history by manually setting build argument
SETUPTOOLS_SCM_PRETEND_VERSION
- changed default log level from
debug
toinfo
- apparmor profile for architectures other than x86_64/amd64
(
ImportError: Error loading [...]/_gi.cpython-38-aarch64-linux-gnu.so: Permission denied
) - fatal
org.freedesktop.DBus.Error.InteractiveAuthorizationRequired
when attempting to lock sessions - container image / dockerfile:
- split
pipenv install
into two stages to speed up image builds chmod
files copied from host to no longer requireo=rX
perms on host- added registry to base image specifier for
podman build
- added
--force
flag torm
invocation to avoid interactive questions while runningpodman build
- split
- compatibility with
python3.5
,python3.6
,python3.7
&python3.8
- pipeline:
- build container image for armv6 & arm64 (in addition to amd64 & armv7)
- push container images to ghcr.io
- create tags & labels for container image via docker/metadata-action
0.5.0 - 2020-11-06
- MQTT message on topic
systemctl/hostname/lock-all-sessions
instructs all sessions to activate screen locks (functionally equivalent to commandloginctl lock-sessions
) - command line option
--poweroff-delay-seconds
(default: 4 seconds)
- docker image:
- upgrade
paho-mqtt
to no longer suppress exceptions occuring in mqtt callbacks ( https://github.com/eclipse/paho.mqtt.python/blob/v1.5.1/ChangeLog.txt#L4 ) - build stage: revert user after applying
chown
workaround for inter-stage copy
- upgrade
0.4.0 - 2020-09-10
- command line option
--mqtt-disable-tls
0.3.0 - 2020-06-21
- home assistant: enable automatic discovery
for logind's
PreparingForShutdown
signal
- fatal error on MQTT reconnect: tried to re-acquire shutdown inhibitor lock
0.2.0 - 2020-06-21
- forward logind's PreparingForShutdown
to
systemctl/hostname/preparing-for-shutdown
- log inhibitor locks when scheduling a shutdown
- explicit timestamp type specification to avoid
OverflowError: Python int too large to convert to C long
0.1.1 - 2020-06-18
- compatibility with python3.5:
0.1.0 - 2020-06-16
- MQTT message on topic
systemctl/hostname/poweroff
schedules a poweroff via systemd's dbus interface (4 seconds delay)