Demos › Streaming

Live Streaming

Server-Sent Events, WebSocket, and WebRTC — all delivered through the Sertone Global Network. Data streams are billed per event or per kilobyte. Media is relayed through the owner's relay node. No central server.

Pick Your Protocol

SSE

Server-Sent Events

One-way push stream from owner to consumer. Ideal for live price tickers, sensor feeds, log streams, and AI token streaming. Billing per event or per kilobyte.

WS

WebSocket

Full-duplex channel between consumer and owner's service. Ideal for chat, collaborative tools, live dashboards, and game servers. Billing per message or per minute.

RTC

WebRTC via Relay

Video and audio signaling relayed through the Media Relay node. Ideal for live video feeds, IoT cameras, and real-time collaboration with media.

SSE — Live Sensor Stream

Consumer Premises
Your App
Your Sertone
Control Center
On your premises
▼ Subscribe ▲ Events
Sertone Global Network
🔒 Encrypted 🔗 Automatic Payment 🌐 5 Delivery Methods
Proprietary fully encrypted protocol with automatic payment settlement
▼ Subscribe ▲ Events
Owner Premises
Their Sertone
Control Center
Live Stream
Source
On their premises

What is the Sertone control center? A single Docker container you run on your own machine — a laptop, a Raspberry Pi, a cloud server. It connects you to the Sertone Global Network. Through its built-in web console, you browse services, register your own, manage your wallet, and monitor your earnings. Installation takes minutes. It is completely free, forever.

docker run -d --name my-sertone -p 3000:3000 -p 3002:3002 sertone/wrapper:latest
GET /api/iot-sensor-v1/stream — SSE routed through the Sertone Global Network
Disconnected 0 events
Click Start Stream to connect
Live call through the Sertone Global Network. Install your own Sertone to make unlimited calls.

WebSocket — Bidirectional Channel

Consumer Premises
Your App
Your Sertone
Control Center
On your premises
▼ Messages ▲ Messages
Sertone Global Network
🔒 Encrypted 🔗 Automatic Payment 🌐 5 Delivery Methods
Proprietary fully encrypted protocol with automatic payment settlement
▼ Messages ▲ Messages
Owner Premises
Their Sertone
Control Center
Live Stream
Source
On their premises
wss://localhost:3006/stream/SERVICE_UUID — WebSocket routed through the Sertone Global Network
WebSocket echo — bidirectional 0 messages
Click Send to exchange a message
Live call through the Sertone Global Network. Install your own Sertone to make unlimited calls.

WebRTC — Video via Media Relay

Consumer Premises
Your App
Your Sertone
Control Center
On your premises
▼ Request ▲ Media
Sertone Global Network
🔒 Encrypted 🔗 Automatic Payment 🌐 5 Delivery Methods
Proprietary fully encrypted protocol with automatic payment settlement
▼ Request ▲ Media
Owner Premises
Their Sertone
Control Center
Live Stream
Source
On their premises

The Sertone Global Network uses a proprietary fully encrypted protocol. All traffic is end-to-end encrypted. Settlement is automatic.

How a Raspberry Pi becomes a live camera server: Install Sertone, connect a USB camera, register the stream. Anyone with an Sertone node can watch it through the Sertone network's proprietary encrypted protocol. You earn per second of video delivered. No cloud streaming account needed.

How to use this service

Any developer worldwide can subscribe to a live stream from their own Sertone control center. Here is the complete flow from installation to first event:

1

Install your Sertone control center

One Docker command on any machine -- your laptop, a Raspberry Pi, a cloud VM.

$ docker run -d --name my-sertone -p 3000:3000 -p 3002:3002 sertone/wrapper:latest
2

Browse the catalog

Open your web console at https://localhost:3002/panel. Go to the Catalog tab. Search for the stream you need -- filter by SSE, WebSocket, or WebRTC, or browse by category.

3

Preview with demo samples

Click on any service to see its full description, event schema, and sample payloads. Try the demo stream -- free, no payment needed. See exactly what the data looks like before you spend a cent.

4

Fund your wallet

Go to the Finance tab. Deposit USDC and a small amount of ETH for gas. Your control center shows both balances and alerts you when they are low.

5

Connect to the stream from your code

Copy your consumer secret from Settings. Use the service UUID from the catalog. Open an SSE connection through your control center:

$ curl -N https://localhost:3006/stream/SERVICE_UUID \ -H "Authorization: Bearer YOUR_CONSUMER_SECRET" \ -H "Accept: text/event-stream"

For WebSocket streams, the web console generates ready-to-use client code (Python, TypeScript, Go, Rust, Kotlin, and more) with the UUID pre-filled.

6

You are in business

Every event or kilobyte delivered settles automatically in USDC. You pay the service owner's price. No invoices, no payment terms, no chargebacks. Your Finance tab shows every transaction.

All Three Patterns

// Browser or Node.js — SSE stream via Sertone // SERVICE_UUID: copy from your catalog. YOUR_CONSUMER_SECRET: from Settings tab. // SSE streams are served on port 3006. const url = 'https://localhost:3006/stream/SERVICE_UUID'; const headers = { 'Authorization': 'Bearer YOUR_CONSUMER_SECRET', 'Accept': 'text/event-stream' }; // Using fetch (Node 18+ / browser with readable streams): const res = await fetch(url, { headers }); const reader = res.body.getReader(); const decoder = new TextDecoder(); while (true) { const { value, done } = await reader.read(); if (done) break; const chunk = decoder.decode(value); // Parse SSE lines: "data: {...}" const lines = chunk.split('\n').filter(l => l.startsWith('data:')); lines.forEach(l => { const { temp_c, humidity } = JSON.parse(l.slice(5)); console.log(`${temp_c}°C ${humidity}%`); }); } // Billing: per event. Check your Finance tab in the web console.
// WebSocket — bidirectional, Node.js (ws package) or browser // npm install ws // SERVICE_UUID: copy from your catalog. WebSocket streams use port 3006. const WebSocket = require('ws'); const ws = new WebSocket( 'wss://localhost:3006/stream/SERVICE_UUID', { headers: { 'Authorization': 'Bearer YOUR_CONSUMER_SECRET' } } ); ws.on('open', () => { ws.send(JSON.stringify({ event: 'subscribe', channel: 'live-feed', })); }); ws.on('message', (data) => { console.log('Received:', JSON.parse(data)); }); // Billing: per message exchanged, paid automatically in USDC.
# Python SSE client — pip install sseclient-py requests # SERVICE_UUID: copy from your catalog. YOUR_CONSUMER_SECRET: from Settings tab. import sseclient import requests import json r = requests.get( 'https://localhost:3006/stream/SERVICE_UUID', headers={ 'Authorization': 'Bearer YOUR_CONSUMER_SECRET', 'Accept': 'text/event-stream', }, stream=True ) client = sseclient.SSEClient(r) for event in client.events(): if event.event == 'reading': data = json.loads(event.data) print(f"{data['temp_c']}°C — {data['humidity']}%")
# Register an SSE endpoint in Sertone # Your endpoint must emit text/event-stream $ curl -X POST http://localhost:3001/api/register \ -H "Content-Type: application/json" \ -d '{ "name": "IoT Sensor Stream", "endpoint": "http://localhost:8080/sensor/stream", "protocol": "sse", "billing": "per_event", "price_usdc": "0.000010", "description": "Raspberry Pi temperature + humidity sensor, 1s intervals" }' # Consumers connect via port 3006: # GET https://localhost:3006/stream/SERVICE_UUID # Authorization: Bearer YOUR_CONSUMER_SECRET # Accept: text/event-stream # # WebSocket registration: set "protocol": "websocket" # WebSocket consumers: wss://localhost:3006/stream/SERVICE_UUID # Billing: "per_message" | "per_kb" | "per_minute"

Turn a Raspberry Pi Sensor Into a Revenue Stream

A Raspberry Pi with a DHT22 temperature sensor costs about $15. With Sertone, every second of data it emits can earn you money. Here is the complete setup.

1

Wire your sensor and write a simple SSE server

A minimal Python Flask server that reads DHT22 and emits SSE:

$ pip install flask Adafruit-DHT # sensor_server.py from flask import Flask, Response import Adafruit_DHT, json, time app = Flask(__name__) @app.route('/stream') def stream(): def gen(): while True: h, t = Adafruit_DHT.read_retry(Adafruit_DHT.DHT22, 4) data = json.dumps({'temp_c': round(t,1), 'humidity': round(h,1)}) yield f"event: reading\ndata: {data}\n\n" time.sleep(1) return Response(gen(), content_type='text/event-stream') app.run(port=8080)
2

Start your Sertone node and register the stream

$ docker run -d --name sertone --network host \ -v sertone-data:/data sertone/wrapper:latest $ curl -X POST http://localhost:3001/api/register \ -H "Content-Type: application/json" \ -d '{"name":"Pi Sensor","endpoint":"http://localhost:8080/stream", "protocol":"sse","billing":"per_event","price_usdc":"0.00001"}'
3

Consumers subscribe and you earn per event

At $0.00001 per event, 1 subscriber at 1 event/second = $0.864/day = $315/year from a single $15 sensor. Scale with more sensors or more subscribers.