Skip to main content

Race Result and TB Relay

Project description

rrrelay

Relay HTTP POST transponder passings from Race Result Decoder and Track Box units to telegraph as timer messages:

INDEX;SOURCE;CHANNEL;REFID;TOD;DATE
  • INDEX : passing sequence number (set by the relay)
  • SOURCE : decoder ID
  • CHANNEL : loop id or timing channel
  • REFID : transponder unique ID
  • TOD : local time of day string eg 13h27:52.4321
  • DATE : date of passing eg 2023-02-27

Also relays HTTP GET status messages from Track Box units:

SOURCE;CHANNEL;TOD;DATE;STATUS;TEMP;NOISE;ACCEL;BATT
  • SOURCE : decoder ID
  • CHANNEL : loop id or timing channel
  • TOD : local time of day string eg 13h27:52.4321
  • DATE : date of passing eg 2023-02-27
  • STATUS : RR specific decoder status
  • TEMP : temperature string
  • NOISE : noise level string
  • ACCEL : decoder orientation string
  • BATT : battery level string

HTTP Endpoints

  • POST /rrs : Race Result Decoder (passive and active)
  • POST /tbp : Track Box Ping
  • GET /tbs : Track Box Status

Configuration

Configuration is via metarace sysconf section 'rrrelay' with the following keys:

key (type) Description [default]
port (int) HTTP listen port [53037]
passtopic (string) MQTT relay topic for passings ['timing/data']
statustopic (string) MQTT relay topic for status ['timing/status']
qos (int) qos value for passing messages [2]
userid (string) optional RR customer ID ['']
passiveloop (dict) map passive device ids to loop ids [{}] (1)

Notes:

  1. Decoders reporting passive transponder reads can have their loopid overridden to force a specific channel id. For example, the following entry for passiveloop would assign all passive reads from decoder "D-23678" channel id "C5".
"passiveloop":{"D-23678":"C5"}

Decoder Setup

Race Result Decoder

Open the decoder web interface and select the "Configuration" link. Under "Upload target" select the option "Custom (HTTP)", and enter the public ip, port and path to your rrrelay instance:

RRS Config

Then enable mobile upload on the decoder panel menu.

Track Box

Set the track box 'Status URL' and 'Track Ping URL' to be the url of your rrrelay instance, with a question mark on the end of the path, for example:

http://12.34.56.78:9012/tbp?

In tag tool, connect to the track box, select the "Advanced" button, enter the updated URLs and then select "Apply Changes". Note that the url may be reported as not reachable, even when correct and working.

TB Config

Requirements

  • tornado
  • metarace >=2.0

Installation

Install with pip:

$ pip3 install rrrelay

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rrrelay-1.0.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

rrrelay-1.0.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file rrrelay-1.0.2.tar.gz.

File metadata

  • Download URL: rrrelay-1.0.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.3

File hashes

Hashes for rrrelay-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e17e74e5ffe588009e1795a100f6535055dbaee38e99535db7eb376482708ed1
MD5 87581b8b8127214bf5f2faa583c50bab
BLAKE2b-256 a5b5999edfba6100dd967f379668d54071e51fdcd6b06e4aa92279b70758a457

See more details on using hashes here.

File details

Details for the file rrrelay-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: rrrelay-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.3

File hashes

Hashes for rrrelay-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 53be3d048421bdfce2ff496f64e0fdfd5ef3e8affb22c55c66b323e69be1c468
MD5 2ec8bffb10ffddeb5716d33b9d7c92b0
BLAKE2b-256 ae4c356e41b1bbdfc3780e22c7b1b90a12aa3d8999a0bd97c7106a36ed02a405

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page