Skip to main content

IoT transport layer for TIBET — UDP transport, LAN discovery, and mesh relay over tibet-ping protocol.

Project description

tibet-iot

IoT Transport Layer for TIBET — UDP transport, LAN discovery, and mesh relay over the tibet-ping protocol.

What

tibet-ping is the proto layer: packets, trust, airlock. tibet-iot is the transport layer: actually sending PingPackets over UDP, discovering devices on LAN via multicast, and mesh relay for multi-hop forwarding.

First async package in the TIBET ecosystem.

Install

pip install tibet-iot

Quick Start

import asyncio
from tibet_iot import IoTNode

async def main():
    node = IoTNode("jis:home:hub")
    node.set_trust("jis:home:sensor", 0.9)
    await node.start()

    response = await node.send_ping(
        target="jis:home:sensor",
        addr=("192.168.1.42", 7150),
        intent="temperature.read",
        purpose="Check room temperature",
    )

    if response:
        print(response.decision)

    await node.stop()

asyncio.run(main())

CLI

tibet-iot listen --did jis:home:hub
tibet-iot send jis:home:sensor 192.168.1.42:7150 temperature.read
tibet-iot discover
tibet-iot demo

Architecture

IoTNode (async, tibet-iot)
  ├── PingNode (sync, tibet-ping) — proto layer
  ├── Transport — network I/O (UDP)
  ├── PeerTracker — connection tracking
  ├── NetworkDiscovery — LAN multicast beacon
  └── MeshRelay — multi-hop forwarding

Wire Format

Offset  Size  Field
0       2     Magic: 0x54 0x50 ("TP")
2       1     Version: 0x01
3       1     Flags: bit 0 = is_response, bit 1 = msgpack
4       4     Payload length (uint32, big-endian)
8       N     Payload (JSON or msgpack)

Network

  • Port 7150 — Main transport (UDP)
  • Port 7151 — Discovery multicast
  • Multicast group224.0.71.50

License

MIT

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

tibet_iot-0.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tibet_iot-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file tibet_iot-0.1.0.tar.gz.

File metadata

  • Download URL: tibet_iot-0.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_iot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 66621ff6910a889329ac2d9d7daf638bc441b80d2cd1daa0862bacd6a4b697b7
MD5 64e40c5458626507be8c93377861b66f
BLAKE2b-256 93ef4d8930e8a0f39f8ea819f0a6ae97b5d742524bbe2cfc4660f088c2382318

See more details on using hashes here.

File details

Details for the file tibet_iot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tibet_iot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tibet_iot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae822e9e292317ea3ebb694f8131a276891daf78647ff82e3e95bcaf992aeb98
MD5 9d7301234cbf4b9cf7db05f0f4bb0d20
BLAKE2b-256 7701948909d068285d444d36939065973c067474ffd93dd28d7dfaa9af21e55e

See more details on using hashes here.

Supported by

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