rdc-proxy-unifi
UniFi/EdgeSwitch port-counter plugin for rdc-proxy.
Adds a "switch" side channel to the rdc-proxy dashboard containing live port
counters polled via SSH from a UniFi/EdgeSwitch running swctrl.
Prerequisites
- rdc-proxy already installed on the same host (it provides the plugin loader + dashboard).
- A UniFi/EdgeSwitch (any model supporting
swctrl port show counters). - An SSH key that the rdc-proxy service user can use to log into the switch.
Install
Assuming rdc-proxy is already running at /opt/rdc-proxy:
# Clone and install into the rdc-proxy venv
sudo git clone https://github.com/andrewroydshayes/rdc-proxy-unifi.git /opt/rdc-proxy-unifi
sudo /opt/rdc-proxy/venv/bin/pip install /opt/rdc-proxy-unifi
# Place your SSH key where the service can read it (0600 root:root)
sudo cp ~/.ssh/id_rsa_unifi /etc/rdc-proxy/id_rsa_unifi
sudo chmod 600 /etc/rdc-proxy/id_rsa_unifi
# Configure via env vars in /etc/rdc-proxy/rdc-proxy.env (see below), then:
sudo systemctl restart rdc-proxy
The rdc-proxy service will log [plugins] loaded: unifi on startup.
Or use the included installer:
curl -fsSL https://raw.githubusercontent.com/andrewroydshayes/rdc-proxy-unifi/main/install/install-unifi.sh \
| sudo bash
Configuration
Add to /etc/rdc-proxy/rdc-proxy.env:
RDC_UNIFI_SWITCH_IP=10.0.0.97
RDC_UNIFI_SWITCH_USER=root
RDC_UNIFI_SSH_KEY=/etc/rdc-proxy/id_rsa_unifi
RDC_UNIFI_PORT_ID=9
RDC_UNIFI_POLL_INTERVAL=30
RDC_UNIFI_SIDE_CHANNEL=switch
All env vars have defaults — only set the ones you need to change.
How the side channel surfaces
The plugin calls state.update_side_channel("switch", {...counters...}) once
per poll. rdc-proxy's dashboard collector merges all side channels into the
JSON returned by /api/status, under side_channels. For UI back-compat the
"switch" channel is ALSO mirrored at the top level as switch in each
dashboard history point.
Development
pip install -e ".[dev]"
pytest
License
MIT.
Metadata
Release files for rdc-proxy-unifi 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 |
|---|---|---|---|---|
| rdc_proxy_unifi-0.2.0.tar.gz | 5.2 kB | With provenance | Details for rdc_proxy_unifi-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rdc_proxy_unifi-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for rdc_proxy_unifi-0.2.0-py3-none-any.whl |
Total release size: 9.9 kB
Release files / rdc_proxy_unifi-0.2.0.tar.gz
| Download URL | rdc_proxy_unifi-0.2.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c09fe0c549619e9ff13fca125422e45f543dbd8e7540bc8fbd205bdfd23bb509
|
|
BLAKE2b-256 checksum How to use checksums |
ae9a890f1f97a2e730ce763c003e0f28761cb47d26591c462207bfef15dbbb3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 19, 2026.
Transparency logRelease files / rdc_proxy_unifi-0.2.0-py3-none-any.whl
| Download URL | rdc_proxy_unifi-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84d3dd64f3887aa45a3c23481a83619bae5d83f8a0a6e6609cfcdf3bf5222c1a
|
|
BLAKE2b-256 checksum How to use checksums |
6030db097e47c89c9fd07ad5b0c6d4cf011833f4434a297f823317796ac8e4ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 19, 2026.
Transparency logSecurity for rdc-proxy-unifi 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 rdc_proxy_unifi-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 Apr 19, 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.