CHANGELOG.md 4.8 KB

Changelog

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

  • automatic discovery in home assistant:
    • entity button.[hostname]_logind_lock_all_sessions
    • entity button.[hostname]_logind_poweroff
  • declare compatibility with python3.11, python3.12 & python3.13

Changed

  • migrate from dbus-python to pure-python jeepney (removes indirect dependency on libdbus, glib, PyGObject and pycairo, fixes https://github.com/fphammerle/systemctl-mqtt/issues/39)
  • automatic discovery in home assistant:
    • replace component-based (topic: <discovery_prefix>/binary_sensor/<node_id>/preparing-for-shutdown/config) with device-based discovery (<discovery_prefix>/device/<object_id>/config)
    • replace command-line option --homeassistant-node-id with --homeassistant-discovery-object-id
    • rename entity binary_sensor.[hostname]_preparing_for_shutdown to binary_sensor.[hostname]_logind_preparing_for_shutdown
    • disable "retain" flag for discovery messages (to avoid reappearing ghost devices)
  • docker image:
    • upgrade 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

Fixed

  • apparmor profile for architectures other than x86_64/amd64 (ImportError: Error loading [...]/_gi.cpython-38-aarch64-linux-gnu.so: Permission denied)
  • dockerfile: split pipenv install into two stages to speed up image builds
  • dockerfile: chmod files copied from host to no longer require o=rX perms on host
  • dockerfile: add registry to base image specifier for podman build
  • dockerfile: add --force flag to rm invocation to avoid interactive questions while running podman build
  • dockerfile: ignore "sanitized-package" added to Pipfile.lock by dependabot (fixes pipenv.vendor.requirementslib.exceptions.RequirementError: Failed parsing requirement from '.')

Removed

  • compatibility with python3.5, python3.6, python3.7 & python3.8

0.5.0 - 2020-11-06

Added

  • MQTT message on topic systemctl/hostname/lock-all-sessions instructs all sessions to activate screen locks (functionally equivalent to command loginctl lock-sessions)
  • command line option --poweroff-delay-seconds (default: 4 seconds)

Changed

0.4.0 - 2020-09-10

Added

  • command line option --mqtt-disable-tls

0.3.0 - 2020-06-21

Added

Fixed

  • fatal error on MQTT reconnect: tried to re-acquire shutdown inhibitor lock

0.2.0 - 2020-06-21

Added

Fixed

  • explicit timestamp type specification to avoid OverflowError: Python int too large to convert to C long

0.1.1 - 2020-06-18

Fixed

  • compatibility with python3.5:
    • replaced PEP526-style variable type hints with PEP484-compatible
    • fixed AttributeError due to unavailable MagicMock.assert_called_once
    • fixed TypeError when calling datetime.datetime.isoformat(datespec=…)

0.1.0 - 2020-06-16

Added

  • MQTT message on topic systemctl/hostname/poweroff schedules a poweroff via systemd's dbus interface (4 seconds delay)