#######
BERadio
#######
|
.. start-badges
|ci-tests| |ci-coverage| |license| |pypi-downloads|
|python-versions| |status| |pypi-version|
.. |ci-tests| image:: https://github.com/hiveeyes/beradio/actions/workflows/tests.yml/badge.svg
:target: https://github.com/hiveeyes/beradio/actions/workflows/tests.yml
:alt: CI outcome
.. |ci-coverage| image:: https://codecov.io/gh/hiveeyes/beradio/branch/main/graph/badge.svg
:target: https://codecov.io/gh/hiveeyes/beradio
:alt: Test suite code coverage
.. |pypi-downloads| image:: https://static.pepy.tech/badge/beradio/month
:target: https://pepy.tech/project/beradio
:alt: PyPI downloads per month
.. |pypi-version| image:: https://img.shields.io/pypi/v/beradio.svg
:target: https://pypi.org/project/beradio/
:alt: Package version on PyPI
.. |status| image:: https://img.shields.io/pypi/status/beradio.svg
:target: https://pypi.org/project/beradio/
:alt: Project status (alpha, beta, stable)
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/beradio.svg
:target: https://pypi.org/project/beradio/
:alt: Support Python versions
.. |license| image:: https://img.shields.io/pypi/l/beradio.svg
:target: https://github.com/hiveeyes/beradio/blob/main/LICENSE
:alt: Project license
.. end-badges
.. tip::
You might want to continue reading at the official `BERadio documentation`_,
all inline links will be working there.
*****
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 <GNU-AGPL-3.0_>`_ and the
`European Union Public License <EUPL-1.2_>`_.
The software is and will always be **free and open source software**.
.. _Bencode: https://en.wikipedia.org/wiki/Bencode
.. _BERadio documentation: https://hiveeyes.org/docs/beradio/
.. _BERadio handbook: https://hiveeyes.org/docs/beradio/handbook.html
.. _BERadio specification: https://hiveeyes.org/docs/beradio/beradio.html
.. _EUPL-1.2: https://opensource.org/licenses/EUPL-1.1
.. _GNU-AGPL-3.0: https://www.gnu.org/licenses/agpl-3.0-standalone.html
.. _Hiveeyes platform: https://swarm.hiveeyes.org/
.. _Hiveeyes project: https://hiveeyes.org/
.. _Hiveeyes system: https://hiveeyes.org/docs/system/
.. _Kotori: https://getkotori.org/
Raw data
{
"_id": null,
"home_page": "https://hiveeyes.org/docs/beradio/",
"name": "beradio",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "protocol rfm serial mqtt Bencode BERadio",
"author": "The Hiveeyes Developers",
"author_email": "hello@hiveeyes.org",
"download_url": "https://files.pythonhosted.org/packages/e5/df/71c489b4e75b460da32e005afcbf7bc1eba4c783d07a12c791b8d6840d7a/beradio-0.14.0.tar.gz",
"platform": null,
"description": "#######\nBERadio\n#######\n\n|\n\n.. start-badges\n\n|ci-tests| |ci-coverage| |license| |pypi-downloads|\n|python-versions| |status| |pypi-version|\n\n.. |ci-tests| image:: https://github.com/hiveeyes/beradio/actions/workflows/tests.yml/badge.svg\n :target: https://github.com/hiveeyes/beradio/actions/workflows/tests.yml\n :alt: CI outcome\n\n.. |ci-coverage| image:: https://codecov.io/gh/hiveeyes/beradio/branch/main/graph/badge.svg\n :target: https://codecov.io/gh/hiveeyes/beradio\n :alt: Test suite code coverage\n\n.. |pypi-downloads| image:: https://static.pepy.tech/badge/beradio/month\n :target: https://pepy.tech/project/beradio\n :alt: PyPI downloads per month\n\n.. |pypi-version| image:: https://img.shields.io/pypi/v/beradio.svg\n :target: https://pypi.org/project/beradio/\n :alt: Package version on PyPI\n\n.. |status| image:: https://img.shields.io/pypi/status/beradio.svg\n :target: https://pypi.org/project/beradio/\n :alt: Project status (alpha, beta, stable)\n\n.. |python-versions| image:: https://img.shields.io/pypi/pyversions/beradio.svg\n :target: https://pypi.org/project/beradio/\n :alt: Support Python versions\n\n.. |license| image:: https://img.shields.io/pypi/l/beradio.svg\n :target: https://github.com/hiveeyes/beradio/blob/main/LICENSE\n :alt: Project license\n\n.. end-badges\n\n.. tip::\n\n You might want to continue reading at the official `BERadio documentation`_,\n all inline links will be working there.\n\n*****\nAbout\n*****\n\n*BERadio* is an encoding specification and implementation for efficient\ncommunication in constrained radio link environments. It is conceived and used\nfor over-the-air communication within the `Hiveeyes project`_.\n\nTogether with `Kotori`_, a multi-channel, multi-protocol data acquisition and\ngraphing toolkit for building flexible telemetry solutions, it powers the\n`Hiveeyes system`_ on the gateway side, which you can enjoy by visiting the\n`Hiveeyes platform`_.\n\n\n*****\nUsage\n*****\n\nHandbook\n========\n\nThe ``beradio`` Python distribution provides convenient commandline-based\ndecoding tools for working with messages in *Bencode* and *BERadio* formats,\ncalled ``beradio``, ``bdecode``, ``bencode``, and ``bemqtt``.\n\nFor more information, have a look at the `BERadio handbook`_.\n\nSynopsis\n========\n\nDecoding an example message on the command line.\n\n::\n\n $ bdecode d1:#i999e1:_2:h11:hli488ei572ee1:tli2163ei1925ei1092ei1354ee1:wi10677ee\n OrderedDict([('#', 999), ('_', 'h1'), ('h', [488, 572]), ('t', [2163, 1925, 1092, 1354]), ('w', 10677)])\n\n::\n\n $ beradio decode d1:#i999e1:_2:h11:hli488ei572ee1:tli2163ei1925ei1092ei1354ee1:wi10677ee --protocol=2\n {\n \"meta\": {\n \"protocol\": \"beradio2\",\n \"network\": \"b6a6b04c-a929-4a6c-9238-185e9af79eed\",\n \"gateway\": \"deh22\",\n \"node\": \"999\",\n \"time\": 1659487642526373120,\n \"profile\": \"h1\"\n },\n \"data\": {\n \"hum1\": 4.88,\n \"hum2\": 5.72,\n \"temp1\": 21.63,\n \"temp2\": 19.25,\n \"temp3\": 10.92,\n \"temp4\": 13.54,\n \"wght1\": 106.77\n }\n }\n\n\n\n\n***********\nEnvironment\n***********\n\nThere are a number of Arduino sensor nodes in the field communicating unidirectional\nvia radio link to a central Arduino acting as a gateway. The gateway Arduino receives\nmessage payloads and writes them verbatim to the serial port connected to a Raspberry Pi,\nwhich transforms and forwards the messages to a MQTT bus.\n\nThe data now being on the bus, arbitrary systems can consume information by subscribing\nto specific MQTT topics where measurement events are delivered.\n\nThe Kotori multichannel DAQ subscribes to topics on the MQTT bus, receives telemetry data\npayloads and stores the measurements into a contemporary time-series database.\nAfter that, Grafana is used to display the measurement information.\n\n\n*******\nDetails\n*******\n\nFeatures\n========\n*BERadio* is a specification and also provides reference implementations for Arduino and Python.\n\n- Some details have been written down in the `BERadio specification`_ document.\n- It uses the ``Bencode`` format on the wire to provide space-efficient data encoding.\n- ``beradio forward`` processes data messages received over the air and forwards them to MQTT.\n- ``libberadio`` will be an appropriate C++ library for Arduino.\n\n\nThe main workhorse\n==================\n``beradio forward`` ingests message payloads from a serial interface, sanitizes and\ndecodes them from ``Bencode`` format and republishes the data to a MQTT topic.\n\nThe MQTT topic name used for publishing is derived from some parameters contained\nin the data of the message, the topic template used for this is currently programmed\nto ``{realm}/{network}/{gateway}/{node}/{field}``.\nThe actual values will get separated, mapped and formatted in different\nvariants before republishing them to MQTT.\n\n\n*******************\nProject information\n*******************\n\nContributing\n============\nWe are always happy to receive code contributions, ideas, suggestions\nand problem reports from the community.\nSpend some time taking a look around, locate a bug, design issue or\nspelling mistake and then send us a pull request or create an issue ticket.\n\nThanks in advance for your efforts, we really appreciate any help or feedback.\n\nLicense\n=======\nThis software is copyright \u00a9 2015-2024 The Hiveeyes developers. All rights reserved.\n\nUse of the source code included here is governed by the\n`GNU Affero General Public License <GNU-AGPL-3.0_>`_ and the\n`European Union Public License <EUPL-1.2_>`_.\nThe software is and will always be **free and open source software**.\n\n\n\n.. _Bencode: https://en.wikipedia.org/wiki/Bencode\n.. _BERadio documentation: https://hiveeyes.org/docs/beradio/\n.. _BERadio handbook: https://hiveeyes.org/docs/beradio/handbook.html\n.. _BERadio specification: https://hiveeyes.org/docs/beradio/beradio.html\n.. _EUPL-1.2: https://opensource.org/licenses/EUPL-1.1\n.. _GNU-AGPL-3.0: https://www.gnu.org/licenses/agpl-3.0-standalone.html\n.. _Hiveeyes platform: https://swarm.hiveeyes.org/\n.. _Hiveeyes project: https://hiveeyes.org/\n.. _Hiveeyes system: https://hiveeyes.org/docs/system/\n.. _Kotori: https://getkotori.org/\n",
"bugtrack_url": null,
"license": "AGPL 3, EUPL 1.2",
"summary": "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.",
"version": "0.14.0",
"project_urls": {
"Homepage": "https://hiveeyes.org/docs/beradio/"
},
"split_keywords": [
"protocol",
"rfm",
"serial",
"mqtt",
"bencode",
"beradio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6ec81fbc600eea084db3966f6f19454f7e3f40395aa969c1e669e23c00a83d68",
"md5": "d13998998f41f8b60d514d5aec1a3df6",
"sha256": "f517e9182230c58832d451c627d9f40b6bc709c133607561b60977497673a290"
},
"downloads": -1,
"filename": "beradio-0.14.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d13998998f41f8b60d514d5aec1a3df6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 38580,
"upload_time": "2024-03-31T16:59:24",
"upload_time_iso_8601": "2024-03-31T16:59:24.307263Z",
"url": "https://files.pythonhosted.org/packages/6e/c8/1fbc600eea084db3966f6f19454f7e3f40395aa969c1e669e23c00a83d68/beradio-0.14.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e5df71c489b4e75b460da32e005afcbf7bc1eba4c783d07a12c791b8d6840d7a",
"md5": "a0e90857ae502a646704c1480e83740e",
"sha256": "a2837ef8bd6209ea531795f0eac22a400e091e382ef2ee1961ea89aae91dfb0d"
},
"downloads": -1,
"filename": "beradio-0.14.0.tar.gz",
"has_sig": false,
"md5_digest": "a0e90857ae502a646704c1480e83740e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 72691,
"upload_time": "2024-03-31T16:59:25",
"upload_time_iso_8601": "2024-03-31T16:59:25.828427Z",
"url": "https://files.pythonhosted.org/packages/e5/df/71c489b4e75b460da32e005afcbf7bc1eba4c783d07a12c791b8d6840d7a/beradio-0.14.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-31 16:59:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "beradio"
}