API and Messaging

HTTP, MQTT, and WebSocket touchpoints

The repository mixes classic HTTP endpoints with broker topics and a browser-facing socket bridge. This page captures the interfaces visible from the checked-in source.

GET

Sensor Snapshot

/api/sensors

Documented test request for sensor data on localhost:8080.

MQTT

Room Temperature Topic

room-temperature

JSON payloads such as {"room":"105","temperature":21.5}.

MQTT

CO2 Topics

nili3/sensor/{room}_co2/state

Plain numeric CO2 measurements per room.

WS

Browser Live Feed

/ws

Clients subscribe to specific rooms and receive cached snapshots plus updates.