Skip to main content

BERadio


CI outcome Test suite code coverage Project license PyPI downloads per month Support Python versions Project status (alpha, beta, stable) Package version on PyPI

About

BERadio is an encoding specification and implementation for efficient communication in constrained radio link environments. It is conceived and used for over-the-air communication within the Hiveeyes project.

Together with Kotori, a multi-channel, multi-protocol data acquisition and graphing toolkit for building flexible telemetry solutions, it powers the Hiveeyes system on the gateway side, which you can enjoy by visiting the Hiveeyes platform.

Usage

Handbook

The beradio Python distribution provides convenient commandline-based decoding tools for working with messages in Bencode and BERadio formats, called beradio, bdecode, bencode, and bemqtt.

For more information, have a look at the BERadio handbook.

Synopsis

Decoding an example message on the command line.

$ bdecode d1:#i999e1:_2:h11:hli488ei572ee1:tli2163ei1925ei1092ei1354ee1:wi10677ee
OrderedDict([('#', 999), ('_', 'h1'), ('h', [488, 572]), ('t', [2163, 1925, 1092, 1354]), ('w', 10677)])
$ beradio decode d1:#i999e1:_2:h11:hli488ei572ee1:tli2163ei1925ei1092ei1354ee1:wi10677ee --protocol=2
{
    "meta": {
        "protocol": "beradio2",
        "network": "b6a6b04c-a929-4a6c-9238-185e9af79eed",
        "gateway": "deh22",
        "node": "999",
        "time": 1659487642526373120,
        "profile": "h1"
    },
    "data": {
        "hum1": 4.88,
        "hum2": 5.72,
        "temp1": 21.63,
        "temp2": 19.25,
        "temp3": 10.92,
        "temp4": 13.54,
        "wght1": 106.77
    }
}

Environment

There are a number of Arduino sensor nodes in the field communicating unidirectional via radio link to a central Arduino acting as a gateway. The gateway Arduino receives message payloads and writes them verbatim to the serial port connected to a Raspberry Pi, which transforms and forwards the messages to a MQTT bus.

The data now being on the bus, arbitrary systems can consume information by subscribing to specific MQTT topics where measurement events are delivered.

The Kotori multichannel DAQ subscribes to topics on the MQTT bus, receives telemetry data payloads and stores the measurements into a contemporary time-series database. After that, Grafana is used to display the measurement information.

Details

Features

BERadio is a specification and also provides reference implementations for Arduino and Python.

  • Some details have been written down in the BERadio specification document.

  • It uses the Bencode format on the wire to provide space-efficient data encoding.

  • beradio forward processes data messages received over the air and forwards them to MQTT.

  • libberadio will be an appropriate C++ library for Arduino.

The main workhorse

beradio forward ingests message payloads from a serial interface, sanitizes and decodes them from Bencode format and republishes the data to a MQTT topic.

The MQTT topic name used for publishing is derived from some parameters contained in the data of the message, the topic template used for this is currently programmed to {realm}/{network}/{gateway}/{node}/{field}. The actual values will get separated, mapped and formatted in different variants before republishing them to MQTT.

Project information

Contributing

We are always happy to receive code contributions, ideas, suggestions and problem reports from the community. Spend some time taking a look around, locate a bug, design issue or spelling mistake and then send us a pull request or create an issue ticket.

Thanks in advance for your efforts, we really appreciate any help or feedback.

License

This software is copyright © 2015-2024 The Hiveeyes developers. All rights reserved.

Use of the source code included here is governed by the GNU Affero General Public License and the European Union Public License. The software is and will always be free and open source software.

Metadata

Release files for beradio 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beradio 0.14.0
File Size Uploaded Provenance
beradio-0.14.0.tar.gz 72.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for beradio 0.14.0
File Interpreter ABI Platform
beradio-0.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 111.3 kB

Release files / beradio-0.14.0.tar.gz

Download URL beradio-0.14.0.tar.gz
Size 72.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a2837ef8bd6209ea531795f0eac22a400e091e382ef2ee1961ea89aae91dfb0d
BLAKE2b-256 checksum
How to use checksums
e5df71c489b4e75b460da32e005afcbf7bc1eba4c783d07a12c791b8d6840d7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / beradio-0.14.0-py3-none-any.whl

Download URL beradio-0.14.0-py3-none-any.whl
Size 38.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f517e9182230c58832d451c627d9f40b6bc709c133607561b60977497673a290
BLAKE2b-256 checksum
How to use checksums
6ec81fbc600eea084db3966f6f19454f7e3f40395aa969c1e669e23c00a83d68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Security for beradio 0.14.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page