Skip to content

Commit

Permalink
Fixed some GPO listener bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGheza committed Apr 20, 2022
1 parent 83597a2 commit dbfcf6b
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 188 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ config_relays.json
*.hex
*.hex.bin

# don't include Python listener clients dev files
venv
env

# don't include .DS_Store file and vscode workspace file
.DS_Store
TallyArbiter.code-workspace
9 changes: 8 additions & 1 deletion listener_clients/gpo-listener/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ These will have to be installed on the Pi in order for the script to function co
* `sudo pip3 install "python-socketio[client]<5"`: This library is used to communicate with a Tally Arbiter server over websockets.
* `sudo pip3 install RPi.GPIO`: This is the GPIO library used to communicate with the General Purpose In/Out pins on your Raspberry Pi.
* `sudo pip3 install zeroconf`: This library is used for discovering TallyArbiter in your network without providing the host
* `sudo pip3 install argparse`: This library is used for parsing CLI args passed to this program

*If `pip3` is not installed, you can get it by running `sudo apt-get install python3-pip`.*

Expand Down Expand Up @@ -53,16 +54,22 @@ Upon startup, the program will enumerate through the `config_gpo.json` file and
TODO: update docs
Tally Arbiter GPO Listener uses the built-in GPIO pins of a Raspberry Pi. In order for the program to use the correct pins for your wiring, it must be configured prior to execution. A configuration file, `config_gpo.json` is required to be in the same folder as the listener script.

The `config_gpo.json` file contains two sections:
The `config_gpo.json` file contains two sections and two others independent config keys:

* `clientUUID`: This is used to keep the same id in TallyArbiter listener client

* `output_invert`: If this is set to `true`, the GPO output are inverted. You need to use this only if you are using a common-anode led setup.

* `server_config`: The IP and Port of the Tally Arbiter server.
```javascript
"server_config":
{
"ip": "192.168.11.141",
"port": 4455
"use_mdns": true
}
```
If `use_mdns` is set to `true`, then the listener will use MDNS instead of configured ip and port. Doing this you don't need to update the config file every time your server changes the IP Address.

* `gpo_groups`: The groupings of GPO pins that you want to control. Each GPO Group can be associated with one Tally Arbiter Device.

Expand Down
Loading

0 comments on commit dbfcf6b

Please sign in to comment.