pub async fn create_iot_reading(
auth: AuthenticatedUser,
dto: Json<CreateIoTReadingDto>,
iot_use_cases: Data<Arc<IoTUseCases>>,
) -> Result<HttpResponse>Expand description
Create a single IoT reading
POST /api/v1/iot/readings
Request body:
{
"building_id": "uuid",
"device_type": "Linky",
"metric_type": "ElectricityConsumption",
"value": 15.5,
"unit": "kWh",
"timestamp": "2024-01-01T00:00:00Z",
"source": "Enedis",
"metadata": {"prm": "12345678901234"}
}