onair-monitor
A tiny Linux daemon that detects camera usage and notifies Home Assistant via webhooks. Optionally shows a system-tray icon that turns red when a camera is active.
Install
uv tool install onair-monitor
Tray icon support
To enable the system-tray icon, install the tray extra and the required
system libraries:
1. System libraries (needed to build PyGObject):
Debian / Ubuntu:
sudo apt install libgirepository-2.0-dev libcairo2-dev
Fedora:
sudo dnf install gobject-introspection-devel cairo-devel
Arch Linux:
sudo pacman -S gobject-introspection cairo
2. Install with the tray extra:
uv tool install "onair-monitor[tray]"
GNOME users: the tray icon requires the AppIndicator extension.
Configure
On first run, a default config is created at
~/.config/onair-monitor/config.json. Edit it to point at your
Home Assistant instance:
{
"ha_url": "http://homeassistant.local:8123",
"webhook_on": "camera_on",
"webhook_off": "camera_off",
"poll_interval": 2
}
The monitor POSTs to {ha_url}/api/webhook/{webhook_on|off}.
Setting up webhooks in Home Assistant
- Go to Settings > Automations & Scenes > Create Automation.
- Add a Webhook trigger and note the webhook ID.
- Create one automation for
camera_onand one forcamera_off. - Use the webhook IDs in your config file.
Run
# run directly (tray icon if available, otherwise headless)
onair-monitor
# force headless mode
onair-monitor --headless
Autostart (desktop session)
onair-monitor --install-autostart
Systemd user service
onair-monitor --install-service
systemctl --user start onair-monitor.service
Uninstall
onair-monitor --uninstall
uv tool uninstall onair-monitor
The config file at ~/.config/onair-monitor/config.json is kept — remove
it manually if you no longer need it.
License
MIT
Metadata
Release files for onair-monitor 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| onair_monitor-0.1.2.tar.gz | 54.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| onair_monitor-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 62.5 kB
Release files / onair_monitor-0.1.2.tar.gz
| Download URL | onair_monitor-0.1.2.tar.gz |
|---|---|
| Size | 54.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f50687e913dd725d2e2898e0651ddd0b8b83dc19c6df4822ce33c4c5753e0d25
|
|
BLAKE2b-256 checksum How to use checksums |
7af6aac2265c19b65133124197ad73bad68dcf07b93e5a92354f59d7956787e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.
Transparency logRelease files / onair_monitor-0.1.2-py3-none-any.whl
| Download URL | onair_monitor-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9d87772c32c090e8b0443d7389776866cc8658fa42d2d81c0f7376d37cd6ba6
|
|
BLAKE2b-256 checksum How to use checksums |
d334a5ad78d21dd49ee6da3c13d6b8f1cff162fdc94a1ff7ea0183e370a1391f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.
Transparency log