Metadata-Version: 2.4
Name: tibet-peripheral
Version: 0.1.0
Summary: IP-less peripheral actors for TIBET/AInternet: serial, Bluetooth, BLE, LoRa and smart-device executors bound under a box/root.
Author-email: Jasper van de Meent <jasper@humotica.nl>, Codex <codex@humotica.nl>
License-Expression: MIT
License-File: LICENSE
Keywords: ainternet,arduino,ble,bluetooth,iot,peripheral,rvp,serial,tibet
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Communications
Classifier: Topic :: Home Automation
Classifier: Topic :: System :: Hardware
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# tibet-peripheral

IP-less peripheral actors for TIBET/AInternet.

This package is a sandbox-born skeleton for devices that cannot, should not, or
must not speak IP themselves: Arduino lights, cheap toys, BLE buttons, LoRa
sensors, smart devices, RVP peripherals, doorbells, relays, and other physical
actuators.

The peripheral is not the root of trust. The box/bridge is the cryptographic and
policy authority. The peripheral is a bound executor that must stay in the
causal rhythm.

```text
internet / overlay / cmail / local button
  -> box or bridge verifies intent, grant, presence, and relation
  -> tiny peripheral frame over serial / BT / BLE / LoRa
  -> IP-less device acts
  -> ACK returns
  -> bridge emits receipt
```

## Core Rule

```text
The peripheral does not have to calculate trust.
It has to stay in time.
```

If the tether breaks, the session is dead. When it comes back, it must rebind.
That makes uptime and sequence continuity part of the safety model.

## What Exists Here

- `tibet_peripheral.protocol` — tiny line frame codec and session guard.
- `tibet_peripheral.serial_line` — POSIX serial line helper, stdlib only.
- `tibet_peripheral.bridge` — local HTTP bridge for light control.
- `examples/arduino/light_node/light_node.ino` — Arduino Uno onboard LED sketch.
- `docs/ARCHITECTURE.md` — doctrine and binding model.
- `docs/ROADMAP.md` — route toward real TIBET overlay integration.

## Proof Of Concept

For a classic Arduino Uno R3 / ATmega328P:

```bash
python3 -m tibet_peripheral.bridge --serial /dev/ttyUSB0
curl http://127.0.0.1:8765/light/l
curl http://127.0.0.1:8765/light/on
curl http://127.0.0.1:8765/light/off
```

The Arduino has no IP address. The bridge does.

For an already-flashed sketch that reacts to commands but does not print ACK
lines, start in fire-and-watch mode:

```bash
python3 -m tibet_peripheral.bridge --serial /dev/ttyUSB0 --no-ack
```

That proves reachability. For causal receipts, flash the example firmware so the
device returns `OK ...` after each command.

## Naming

`light.aint` or `jis:peripheral:light:<hash>` names the routed actor. The
Arduino itself only sees a short session id and monotonic sequence. The public
`.aint` is a route/identity wrapper owned by the box or app relation, not a
claim that an 8-bit MCU runs the whole trust stack.
