dynet-cli
dynet is a command-line tool for the Signify Dynalite DyNet bus: watch
traffic, recall presets, set channel levels, query state, discover areas, and
capture or decode traffic for later analysis. It is built on
aiodynet and doubles as a worked
example of that library.
Requires Python 3.13 or newer. Install it with uv, which also fetches a suitable Python if needed, or with pipx:
uv tool install dynet-cli # or: pipx install dynet-cli
export DYNET_HOST=192.0.2.10 DYNET_PORT=50000
Asked to capture traffic from your system? Follow Capturing DyNet traffic. It walks through recording a day of traffic and sending it in.
Commands
| Command | What it does | Sends to the bus? |
|---|---|---|
dynet check |
Checks the gateway accepts TCP connections | No |
dynet monitor |
Shows bus traffic as it happens, decoded | No |
dynet preset AREA PRESET |
Selects a preset | Yes |
dynet level AREA CHANNEL LEVEL |
Fades a channel to a level | Yes |
dynet query preset AREA |
Asks an area for its current preset and waits for the answer | Yes (one request) |
dynet query level AREA CHANNEL |
Asks a channel for its level | Yes (one request) |
dynet scan |
Asks every area for its preset, to find the areas in use | Yes (one request per area) |
dynet send HEX... |
Sends raw packets (the checksum is added if you leave it off) | Yes |
dynet decode [FILE] |
Decodes hex or a capture file. Needs no gateway | No |
dynet sniff HOST:PORT |
Passively records another client's gateway traffic (Linux, root) | No |
Run dynet COMMAND --help for every option.
Watching the bus
$ dynet monitor
-- watching 192.0.2.10:50000
19:02:11.402 1c 0c 00 00 00 00 ff d9 area 12: select preset 1
19:02:11.630 1c 0c 00 60 01 01 ff 77 area 12 channel 1: is at 100%
19:02:15.017 5c aa 55 53 18 71 26 a3 device 0xaa box 85: physical opcode 0x53 (not decoded)
--area 1-10,12shows only those areas.--jsonprints one JSON object per line.--record FILEalso appends every packet to a capture file.--duration SECONDSstops after that long.
Control
dynet preset 12 1 --fade 2 # area 12, preset 1, 2 s fade
dynet level 12 3 40% --fade 1 # area 12 channel 3 to 40 %
dynet level 12 3 off
dynet level 12 3 raw:0x80 # the raw DyNet level byte
Out-of-range values are rejected before anything is sent. For example, a channel fade is at most 5.1 s, which is all the packet can carry.
Finding your areas
dynet scan --areas 1-255 asks each area for its current preset and lists
the ones that answer. It sends one packet per area, 0.2 s apart, so a full
scan takes about a minute. Some areas only answer for a channel they actually
have, so try --channel if an area you know about stays silent.
Capturing traffic
There are two ways to record traffic to a file:
dynet sniff GATEWAY:PORT -i IFACErecords the traffic between a gateway and a client already connected to it, such as Home Assistant, from that client's machine. It never connects to the gateway and never sends anything. It needs Linux and root, because it reads raw frames from the network interface.dynet monitor --record FILErecords through its own connection to the gateway, on any OS.
Capturing DyNet traffic covers both step by
step, including running a capture for a day under systemd. Each line of the file is one packet ({"t": ..., "dir": "rx"|"tx", "hex": ...}) or one event (connect, close, reset, gap, noise). TCP is put
back in order first: keepalive probes and retransmits are dropped, and lost
data shows up as a gap rather than as a bogus packet.
Checking a capture
$ dynet decode --summary sample.jsonl
4 packet(s) over 24.00 h
direction: rx 3, tx 1
By type:
1 PresetSelect
1 RequestPreset
1 PresetReport
1 Unknown physical 0x53
Areas: 12 (3)
Undecoded packets (1 distinct):
1 5caa5553187126a3
The "Undecoded packets" list shows everything aiodynet doesn't yet have a
typed message for. Without --summary, decode prints each packet the same
way monitor does, or as JSON with --json.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Gateway or file error |
| 2 | Bad arguments |
| 3 | query got no answer in time |
Development
uv sync
uv run pytest --cov # 100 % branch coverage is enforced
uv run ruff check && uv run ruff format --check && uv run mypy
Licence
MIT. Not affiliated with or endorsed by Signify.
Metadata
Release files for dynet-cli 0.1.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 |
|---|---|---|---|---|
| dynet_cli-0.1.0.tar.gz | 60.0 kB | Without provenance | Details for dynet_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dynet_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dynet_cli-0.1.0-py3-none-any.whl |
Total release size: 78.3 kB
Release files / dynet_cli-0.1.0.tar.gz
| Download URL | dynet_cli-0.1.0.tar.gz |
|---|---|
| Size | 60.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b736988a6d2af27e48ddead1d61da290395a6853fa927cf743b145d88a0c62c2
|
|
BLAKE2b-256 checksum How to use checksums |
3e99756492a654610c686673518ab667cba04d562fed39e3937e321eb012bee1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / dynet_cli-0.1.0-py3-none-any.whl
| Download URL | dynet_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c117c336d2149a5a7365059995611e9791184d3712af459de9ac24143f7290d4
|
|
BLAKE2b-256 checksum How to use checksums |
0df69e69b8ce30578214fdd8e84c49a00d8107798f493be9d4e47511e7c13187
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for dynet-cli 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.