Skip to content

Commit 1ba1a40

Browse files
committed
Update readme
1 parent ad494b7 commit 1ba1a40

1 file changed

Lines changed: 29 additions & 27 deletions

File tree

README.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -76,33 +76,6 @@ Use this if all that is needed is a basic connection to a receiver.
7676
The YncaModelInfo class is information about features that a specific model supports.
7777
It is technically not really related to the protocol, but since there seems to be no other repository with this info I decided to keep it here.
7878

79-
### Tools
80-
81-
#### YNCA Terminal
82-
83-
The YNCA Terminal provides an interactive terminal for manually sending YNCA commands. It is only intended for manual debugging.
84-
It can be started with commands like below.
85-
86-
```bash
87-
python3 -m ynca.terminal /dev/ttyUSB0
88-
python3 -m ynca.terminal socket://192.168.178.21:50000
89-
```
90-
91-
#### YNCA Server
92-
93-
This is a very basic YNCA server intended to be just enough for debugging and testing without connecting to a real device.
94-
95-
The server needs to be filled with data from an actual device and it will basically just repeat the same answers as the real device gave (with a few exceptions).
96-
Filling the server can be done by providing it with YNCA logging of a real device, like the ones in the YCNA package repository or a log from your own device e.g. by running `example.py` with loglevel DEBUG (uncomment the line in the example code).
97-
98-
It has some additional commandline options for using different ports, binding to a specific host or testing disconnects
99-
100-
```bash
101-
python3 -m ynca.server <ynca_repo>/logs/RX-A810.txt
102-
python3 -m ynca.server --host localhost --port 12345 <ynca_repo>/logs/RX-A810.txt
103-
python3 -m ynca.server --help
104-
```
105-
10679
## Example usage
10780

10881
```python
@@ -143,3 +116,32 @@ main.vol_up(2)
143116
# When done call close for proper shutdown
144117
receiver.close()
145118
```
119+
120+
### Tools
121+
122+
The package comes with some tools to help with debugging.
123+
124+
#### YNCA Terminal
125+
126+
The YNCA Terminal provides an interactive terminal for manually sending YNCA commands. It is only intended for manual debugging.
127+
It can be started with commands like below.
128+
129+
```bash
130+
python3 -m ynca.terminal /dev/ttyUSB0
131+
python3 -m ynca.terminal socket://192.168.178.21:50000
132+
```
133+
134+
#### YNCA debug server
135+
136+
This is a very basic YNCA server intended to be just enough for debugging and testing without connecting to a real device.
137+
138+
The server needs to be filled with data from an actual device and it will basically just repeat the same answers as the real device gave (with a few exceptions).
139+
Filling the server can be done by providing it with YNCA logging of a real device, like the ones in the YCNA package repository or a log from your own device e.g. by running `example.py` with loglevel DEBUG (uncomment the line in the example code).
140+
141+
It has some additional commandline options for using different ports, binding to a specific host or testing disconnects
142+
143+
```bash
144+
python3 -m ynca.debug_server <ynca_repo>/logs/RX-A810.txt
145+
python3 -m ynca.debug_server --host localhost --port 12345 <ynca_repo>/logs/RX-A810.txt
146+
python3 -m ynca.debug_server --help
147+
```

0 commit comments

Comments
 (0)