sokolpezinok / yaroc

Radio Online Control for orienteering
0 stars 0 forks source link
lora lte nb-iot nbiot orienteering raspberrypi splittimes sportident

YAROC

Yet Another ROC. Radio Online Control for orienteering and other sports that use SportIdent timing (trail running, MTB enduro).

Python (Linux) Python (Windows) Rust

It's as if ROC and jSh.radio had a baby.

Features

Etymology

YAROC is pronounced phonetically as "jarok", which is Slovak for a small ditch. Thus the ISOM map symbol of YAROC is 108 Small erosion gully. Symbol 108 will be the logo of the project once I have some time to create one.

Installation

Install from TestPyPi. The package will be published to the main PyPi in the spring of 2024.

python -m venv .venv
source .venv/bin/activate
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple

TODO: install from PyPi

Usage

Send punches from an online control

First, create a send-punch.toml file where you configure punch sources and clients for sending the punches.

log_level = "info"

[punch_source.usb]
enable = true

[punch_source.fake]
enable = true
interval = 8

[client.mqtt]
enable = true

With a config file present, we are able to run send-punch:

source .venv/bin/activate
send-punch

Send punches using LoRa radio

TODO: add meshtastic info

Receive punches

First, create a mqtt-forwarder.toml file where you configure the MAC addresses to receive the punches from as well as all the clients that should receive the punches: ROC, SIRAP, serial, etc.

TODO: full list of clients

log_level = "info"

[mac-addresses]
spe01 = "b827eb78912f"

[client.sirap]
enable = true
ip = "192.168.1.10"
port = 10000

[client.roc]
enable = true

With a config file present, we are able to run mqtt-forwarder:

source .venv/bin/activate
mqtt-forwarder

Development

In order to start developing, install also the dev dependencies:

source .venv/bin/activate
pip install ".[dev]"
pip install -e .

The last line installs the package in edit mode, so you can test each file modification immediately.

To use LSPs, also run the following:

pip install ".[lsp]"

Other projects