| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
OpenNet is a focused, dependency-free messaging protocol I built for direct links between embedded devices and a Python host—especially an ESP32 talking to a Raspberry Pi or backend service. It is not a general cross-platform communication layer or a replacement for MQTT, HTTP, or WebSocket. It sends JSON, text, signed integers, finite doubles, booleans, null, and arbitrary binary data over TCP/TLS or another reliable ordered stream.
Version 0.2.3 is an alpha release for real projects and learning. This release improves publication, documentation, and citation quality without claiming new protocol or runtime behaviour. OpenNet has a documented wire format, bounded resource use, retries and duplicate suppression, native Arduino protocol tests, Python tests across 3.9–3.14, reproducible release packages, measured local performance, and an optional topic-authorization hook. It does not claim that a radio or internet route exists when the underlying hardware or network is unavailable.
I kept coming back to one idea: a sensor message should have the same bytes and the same meaning whether it travels through an ESP32 Wi-Fi client, a serial stream, or a Python TLS connection. I thought about reliability on that point too, which is why retries keep the same message ID and receivers can suppress recent duplicates without pretending the message is durably stored.
Why make ONP/1 when other protocols already exist? I wanted the framing, typing, ACK behavior, limits, and cross-language test vectors to stay small enough to read end to end. MQTT is the stronger choice for brokered fleets and retained messages; HTTP and WebSocket are stronger when web ecosystems matter. ONP/1 is for the narrower space where one embedded peer and one host need a direct, inspectable contract without a broker.
Python wheel from the release page:
python -m pip install \
https://github.com/devkyato/OpenNet/releases/download/v0.2.3/opennet_protocol-0.2.3-py3-none-any.whl
opennet --versionFor an isolated command:
pipx install \
https://github.com/devkyato/OpenNet/releases/download/v0.2.3/opennet_protocol-0.2.3-py3-none-any.whlFor Raspberry Pi/Linux, extract OpenNet-linux-0.2.3.tar.gz and run sudo ./install.sh. It creates a hardened, unprivileged systemd service with a loopback-only default. For Arduino IDE, install OpenNet-0.2.3.zip through Sketch > Include Library > Add .ZIP Library.
The Python distribution is installable with pip, but v0.2.3 is distributed from GitHub Releases rather than the public PyPI index.
Terminal one:
opennet serve --echoTerminal two:
opennet ping --count 5
opennet send sensor/temperature 24.7 --type float
opennet send device/state '{"online":true}' --type json
opennet benchmark --count 1000 --payload-size 64An acknowledged send returns machine-readable output. On a new connection, the first message is:
{"status": "acknowledged", "message_id": 1, "topic": "sensor/temperature"}Python code is equally small:
import asyncio
from opennet import OpenNetClient
async def main():
async with OpenNetClient("127.0.0.1") as client:
message_id = await client.send(
"lab/temperature", 24.7, retries=2
)
print("acknowledged", message_id)
asyncio.run(main())The CLI defaults to loopback and refuses remote plaintext unless it is explicitly allowed for a trusted development network. Use verified TLS—and mutual TLS when device identity matters—outside isolated local testing. Read the security guide before exposing a listener.
Measured loopback results are software baselines, not invented Wi-Fi or hardware claims. Hardware field reports are welcome through the compatibility process.
ACKs mean validated transport acceptance, not successful application side effects. Duplicate suppression is bounded and connection-local; applications must use durable operation IDs when replay after reconnect could repeat an unsafe action.
If you use this software in research or teaching, please cite the Zenodo archive / this repository:
@dev.mako (devkyato). (2026). OpenNet: typed ONP/1 messaging for ESP32, Raspberry Pi, and Python backends (Version 0.2.3). https://github.com/devkyato/OpenNet
See CITATION.cff for machine-readable metadata.
| Project | Role |
|---|---|
| Datary | Local-first laboratory for reproducible program and simulation evidence |
| Relay | Timing-risk source review for control and firmware code |
| TapAuth | Raspberry Pi NFC attendance and reservation kiosk |
| Lowpack | Local-first, application-aware lossless packing |
| Custom Arduino Libraries | Non-blocking LED and digital-output patterns |
| Arduino Programs Guide | Safety-first, compile-checked Arduino Uno course |
Student contributions are welcome. Good changes include a reproducible test, clear documentation, or a complete compatibility report. OpenNet follows Semantic Versioning and is licensed under the MIT License.
| Back | FazBrowse Home | New Git URL |