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 pkg-config
2. Install:
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 the tray extra is installed, 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.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| onair_monitor-0.2.0.tar.gz | 57.2 kB | With provenance | Details for onair_monitor-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| onair_monitor-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for onair_monitor-0.2.0-py3-none-any.whl |
Total release size: 65.8 kB
Release files / onair_monitor-0.2.0.tar.gz
| Download URL | onair_monitor-0.2.0.tar.gz |
|---|---|
| Size | 57.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
229c3f63729c1b2e06ea3683224c33dfb279c9776284abdfe2580945223c3e05
|
|
BLAKE2b-256 checksum How to use checksums |
4af50a4c41bd61a67a577342ec50c13dee62fcb8404299edaf158f7b507610c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logRelease files / onair_monitor-0.2.0-py3-none-any.whl
| Download URL | onair_monitor-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ced57a866faebaa7eccbc0a8638516b20a8269d1afc7f8233d98775af85bc80
|
|
BLAKE2b-256 checksum How to use checksums |
5b9a4eca667a3ae3946eb4ec5c094470f2eaa58e747c0ccf178a6a8869309f1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logSecurity for onair-monitor 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for onair_monitor-0.2.0.tar.gz
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 Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.