How-to Guides
IoT telemetry starter
HTTP ingest + room server_event (not MQTT).
IoT telemetry
Do not use MQTT. Post HTTP, listen on the room WebSocket.
npx @fluxy-chat/create-fluxy-chat@latest my-iot --example iot-panelcurl -X POST "$WORKER/rooms/$ROOM/iot/events" \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{"deviceId":"sim-1","eventType":"telemetry","payload":{"temp":21}}'useChat({
roomId,
onServerEvent: (ev) => {
if (ev.name === "iot.reading") console.log(ev.data);
},
});See IoT.