Skip to main content

Sensors Connectivity

License: AGPL v3 PyPI Python

A Python service that acts as the data aggregation layer in the Robonomics decentralized sensors network. It receives signed sensor measurements, validates them, and distributes data through two channels: real-time IPFS pubsub for the Robonomics dApp and batched datalogs to the Robonomics parachain.

Architecture Overview

Sensors Connectivity is the provider node in the decentralized sensors network:

  • Receives signed measurements from Altruist devices via HTTP POST (port 8001 by default)
  • Also accepts data from other sensor types: EnvironmentalBox, MobileLab, LoRa sensors
  • Publishes real-time data via IPFS pubsub for the Robonomics dApp
  • Batches sensor data, pins to IPFS, and writes the hash as a datalog to the Robonomics parachain
Altruist / Other sensors
  |
  v HTTP POST (port 8001)
Sensors Connectivity Provider
  |- Validate: ED25519 signature + RWS subscription (Kusama/Polkadot)
  |- Real-time: IPFS pubsub -> Robonomics dApp
  |- Batch: collect -> pin to IPFS (local/Pinata/Crust) -> datalog to chain
  '- Network: Polkadot (RWS when subscribed, direct datalog otherwise)

How It Works

Validation. Each incoming message is verified: ED25519 signature check, then RWS (Robonomics Web Services) subscription lookup on both Kusama and Polkadot parachains. Sensor types are routed via sensors_fabric.py based on payload fields.

IPFS publishing. Validated data is published in real-time to IPFS pubsub topic airalab.lighthouse.5.robonomics.eth. Batched data is pinned through up to 4 gateways (local IPFS, Pinata, Crust, Temporal) managed by pinning_manager.py.

Datalog to chain. Pinned IPFS hashes are written as datalogs to the Polkadot Robonomics parachain. The configured account uses RWS when it has an active subscription and falls back to a direct datalog transaction otherwise.

Pre-requirements

IPFS daemon with pubsub enabled and Python 3.10+.

Install IPFS (Linux):

wget https://dist.ipfs.io/go-ipfs/v0.8.0/go-ipfs_v0.8.0_linux-amd64.tar.gz
tar -xzf go-ipfs_v0.8.0_linux-amd64.tar.gz
cd go-ipfs
sudo bash install.sh
ipfs init

Installation

From PyPi

pip3 install py-sr25519-bindings
pip3 install sensors-connectivity

From Source

Requires Poetry:

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

Clone and install:

git clone https://github.com/airalab/sensors-connectivity
cd sensors-connectivity
poetry install

Configuration

Configuration guide: https://robonomics.academy/en/learn/sensors-connectivity-course/sensors-connectivity-config-options/

When building from source, make a copy of default.json and fill it using the guide above.

Logging uses console and file handlers by default. The logging template is in connectivity/config/logging_template.py. Default log path: ~/.logs. See the Python logging docs for other handler options.

Launch

Start the IPFS daemon first:

ipfs daemon --enable-pubsub-experiment

Then run the service:

# PyPi install
sensors_connectivity "path/to/your/config/file"

# From source
poetry run sensors_connectivity "path/to/your/config/file"

Logs appear in your terminal (if console handler is set) and in ~/.logs.

Development

Test the module with an HTTP station:

poetry run test_mobile_lab
poetry run test_environmental_box

More details in the /docs directory.

Comprehensive guide on the Decentralized Sensors Network concept: https://robonomics.academy/en/learn/sensors-connectivity-course/overview/

Sensor preparation instructions: https://robonomics.academy/en/learn/sensors-connectivity-course/setting-up-and-connecting-sensors/

Troubleshooting

Python.h: No such file or directory

Install header files and static libraries for python-dev:

sudo apt install python3-dev

Note: python3-dev does not cover all versions. The service needs at least Python 3.10, so you may need: sudo apt install python3.10-dev. See examples for other package managers.

Python versions mismatch

If poetry install fails with a SolverProblemError about Python version incompatibility, specify the version for Poetry:

poetry env use python3.10.9

Contributing

See CONTRIBUTING.md. Security issues: SECURITY.md.

License

  • Code — GNU AGPL v3.0, Copyright (C) 2026 Pinout Limited. Code released before this change stays available under BSD 3-Clause, Copyright (c) 2020, Airalab.
  • Open measurement data — ODbL 1.0, attribution "© sensors.social contributors".

Details — NOTICE.

Metadata

Release files for sensors_connectivity 1.7.2

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

Source distribution (sdist)

Source distribution for sensors_connectivity 1.7.2
File Size Uploaded Provenance Actions
sensors_connectivity-1.7.2.tar.gz 51.9 kB Without provenance Details for sensors_connectivity-1.7.2.tar.gz

Built distribution (wheel)

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

Total release size: 126.2 kB

Release files / sensors_connectivity-1.7.2.tar.gz

Download URL sensors_connectivity-1.7.2.tar.gz
Size 51.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e0f302a16643df662f3f20fe0577f3dddb246c72a5161fc9a8be5cc196fe0f74
BLAKE2b-256 checksum
How to use checksums
4b273becc87136088952a3c1d4717df702d66c8d80c93b0000adf67ebee6ab26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.10.22 Linux/7.0.0-1017-azure

Release files / sensors_connectivity-1.7.2-py3-none-any.whl

Download URL sensors_connectivity-1.7.2-py3-none-any.whl
Size 74.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
701dcea2718f95f1fc1c363e815ac66961b6185a2d03f89a8d1ca814837e591d
BLAKE2b-256 checksum
How to use checksums
765cc67dae568fdabf03d01b8de1feb07b93218d681a6cd699e50370a60970a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.10.22 Linux/7.0.0-1017-azure

Security for sensors_connectivity 1.7.2

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.

Release history Release notifications | RSS feed

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