Publish Gnome Active Windows to HomeAssistant
Find a file
2025-01-07 12:40:14 +02:00
config Fix config sample 2025-01-06 22:59:02 +02:00
publish_active_windows Keep trying posting 2025-01-06 23:28:33 +02:00
.gitignore first commit 2025-01-06 21:22:30 +02:00
Dockerfile first commit 2025-01-06 21:22:30 +02:00
install.sh manage build folder 2025-01-07 12:40:14 +02:00
LICENSE first commit 2025-01-06 21:22:30 +02:00
podman_build.sh first commit 2025-01-06 21:22:30 +02:00
podman_run.sh first commit 2025-01-06 21:22:30 +02:00
publish_active_windows.sh remove .venv dir from script 2025-01-07 12:34:54 +02:00
pyproject.toml first commit 2025-01-06 21:22:30 +02:00
README.md Fix config sample 2025-01-06 22:59:02 +02:00
requirements.txt Add mvp 2025-01-06 22:20:20 +02:00
setup.cfg first commit 2025-01-06 21:22:30 +02:00
setup.py first commit 2025-01-06 21:22:30 +02:00
wrapper.sh first commit 2025-01-06 21:22:30 +02:00

publish_active_windows

Requirements

  • Only Gnome on Wayland is supported.
  • You need to install the Gnome Extension Window Calls Extended for each user to monitor.
  • You need to run this script in the Gnome Session of the user, via creating a .desktop file and adding the application to Startup Applications with Gnome Tweaks for example.

Installation

To install for example in your ~/.local/bin folder:

./install.sh --destination ~/.local/bin

To install system-wide:

sudo ./install.sh --destination /usr/local/bin

Change your configuration file in "${HOME}/.config/publish_active_windows.conf" (see the example in the config folder).

Usage

publish_active_windows.sh [--debug-level|-d CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET] --ha-url <URL> --ha-token <TOKEN>
  • URL should be something like https://myhomeassistant.example.org:8443
  • The TOKEN must be generated in HomeAssistant, under your profile, Security, Create token. This token will be readable to the user you want to monitor, and it could be able to publish and read any other data from HomeAssistant. At the moment HomeAssistant doesn't support more granular permissions that allow you to limit the access of this token.