3a60ea5cb79669d2c2367582e8d9d127c1ff7e9c
- Rename USERNAME/PASSWORD to UNIFI_USERNAME/UNIFI_PASSWORD to avoid conflict with the Windows USERNAME system environment variable - Set both speakerSettings.volume and speakerSettings.speakerVolume in the PATCH request - Log volume before and after the change to verify it took effect
G6 Pro 360
Experimenting with G6 Pro 360.
Setup
Requires uv and Python 3.14.
uv sync
Copy .env.example to .env and fill in your values:
cp .env.example .env
HOST=192.168.1.1 # UniFi controller IP
API_KEY= # API key from UniFi OS profile → API Tokens
UNIFI_USERNAME= # Local UniFi OS username (for speaker volume control)
UNIFI_PASSWORD= # Local UniFi OS password
API Reference
Note: For use cases requiring real-time event subscriptions (WebSocket) or access to settings not exposed by the official API, consider uiprotect — an unofficial Python library wrapping the private UniFi Protect API.
Run
uv run main.py
Description
Languages
Python
100%