Metadata-Version: 2.4
Name: reVote
Version: 0.0.2
Summary: REVOX B203 / RS232 Interface Software
Author-email: Christian Grosz <christian.grosz@centerofgravity.at>
License-Expression: AGPL-3.0-only
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: Flask>=3.1.2
Requires-Dist: Flask-SocketIO>=5.5.1
Requires-Dist: eventlet>=0.40.3
Requires-Dist: pyserial>=3.5
Dynamic: license-file

---
gitea: none
include_toc: true
---
# reVote

This Flask based web server connects to the Revox 8203 Timer Controller via its serial RS-232 interface,
allowing you to remote control your Revox B 200 series hi-fi components from any modern web browser.

<img src="docs/reVote.svg">

## Compatibility & OS Support

Built on Python, the software is inherently cross-platform and is expected to run on Windows and macOS, though it has exclusively been developed and tested on Linux.

## Installation

For the latest version please download the source code or clone the repository. Generate the distribution archives using [`build`](https://build.pypa.io/en/latest/). These archives (`.whl`,`.tar.gz` or `.zip`) can be installed by [`pip`](https://packaging.python.org/en/latest/key_projects/#pip).

```bash
cd reVote                                                                  # Where the 'pyproject.toml' is located.
python3.12 -m build                                                        # Generate the distribution archives.
sudo pip install --force-reinstall dist/revote-0.0.1-py3-none-any.whl      # Install the package.
sudo pip uninstall revote                                                  # Remove the package.
```
Or install the published package from PyPI.

```bash
sudo pip install -i https://pypi.org/simple/ revote
```

> [!NOTE]
> A global installation is recommended since this application will likely be deployed as a systemd service.

## Setup

> [!CAUTION]
> **Unrestricted Application Access:**
> This Flask application is currently running with NO data validation or entry
> restrictions. All payloads are forwarded unchecked as commands to the B203.
>
> 1. DO NOT expose this server to the public internet under any circumstances.
> 2. Ensure the host is strictly bound to localhost (e.g., host='127.0.0.1').
> 3. Restrict network access via firewalls if local network sharing is required.
>
> Exposing this application publicly will vulnerable your Revox B 200 series hi-fi
> system to attacks.

This application requires external dependencies and files beyond standard Python packages. The _reVote-setup_ script will guide you through most of this configuration process.

```bash
sudo /usr/local/bin/reVote-setup
```

## Command reference

```text
usage: reVoted [-h] [-c CONFIG] [-H HOST] [-p PORT] [-w] [-d DEVICE] [-D] [-v]

options:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        path to config file (default: ['~/.config/reVote/settings.ini', '/etc/reVote/settings.ini'])
  -H HOST, --host HOST  network interfaces the server is listen too (default: 127.0.0.1)
  -p PORT, --port PORT  port the server is listen too (default: 5001)
  -w, --websockets      force use of websockets instead of polling (default: True)
  -d DEVICE, --device DEVICE
                        serial tty device the B203 is connected (default: /dev/ttyReVote)
  -D, --debug           set debug mode for Socket.IO (default: False)
  -v, --verbose         set verbose mode (default: 0)
```
