Von English mit KI übersetzt ·
Megan hat recht. Ich würde Folgendes tun:1. Sende weiterhin co2, temperature und motion als Zahlen (motion als 0/1, nicht true/false, damit eine Historie entsteht).2. Hole die Rohdaten über die History-API ab, ein Tag pro Aufruf ist bequem:
curl -s -H "Authorization: Bearer $KEY" "https://$HOST/tenant/$TENANT/api/telemetry/series?kind=iot_device&entityId=$ROOM&keys=co2,temperature,motion&from=$FROM&to=$TO&bucket=raw"
Wenn ein Schlüssel 10.000 Punkte zurückgibt, frage erneut ab dem letzten ts + 1 an.3. Verbinde sie auf einem Laptop mit dem Export der Rezeption und trainiere in Python eine logistische Regression oder ein Netz mit 3 Eingängen und 8 Neuronen. Das reicht für CO2-Anstieg + Bewegungsanzahl völlig aus.4. Quantisiere die Gewichte auf int8, füge sie als Array const int8_t w[] PROGMEM ein, und der Uno führt nur den Forward-Pass aus. Sende das Ergebnis als occupied_p (0-100) zusammen mit den anderen Schlüsseln.Ehrlich gesagt bringt dich bei Belegung der CO2-Anstieg über 20 Minuten plus „irgendeine Bewegung in den letzten 30 min“ schon weit, noch bevor ein neuronales Netz ins Spiel kommt. Starte damit als Baseline, damit du weißt, ob sich das Modell lohnt. Die API-Seite findest du hier: Die History-API.
Megan’s right. What I’d do:
1. Keep sending co2, temperature and motion as numbers (motion as 0/1, not true/false, so it has a history).
2. Pull the raw data out with the history API, one day per call is comfortable:
curl -s -H "Authorization: Bearer $KEY" "https://$HOST/tenant/$TENANT/api/telemetry/series?kind=iot_device&entityId=$ROOM&keys=co2,temperature,motion&from=$FROM&to=$TO&bucket=raw"
If a key comes back with 10,000 points, ask again from the last ts + 1.
3. Join it with the front desk export on a laptop, train a logistic regression or a 3-input, 8-neuron net in Python. That is plenty for CO2 slope + motion count.
4. Quantise the weights to int8, paste them as a const int8_t w[] PROGMEM array, and the Uno only runs the forward pass. Send the result as occupied_p (0-100) alongside the other keys.
Honestly, for occupancy the CO2 rise over 20 minutes plus „any motion in the last 30 min“ gets you most of the way before any neural net. Start with that as a baseline so you know if the model is worth it. API side is here: The history API.

