Technical Documentation

InfluxDB Measurement Schema

All 32 measurements logged by the system.

Database: highland Default Retention Policy: standard_highland_retention (365 days) Write Interval: 60 seconds (Data Logger), varies for other sources

Retention Policies

PolicyDurationDefault
autogeninfiniteNo
one_year_policy365 daysNo
standard_highland_retention365 daysYes

Measurements

Core Terrarium Measurements (Data Logger — 60s interval)

These 16 measurements are written by the centralized Data Logger function node on the Utilities tab, reading from Node-RED global context.

#MeasurementFieldTypeUnitSource
1local_temperaturevaluefloat°CSHT35 via ESP8266/MQTT
2local_humidityvaluefloat% RHSHT35 via ESP8266/MQTT
3vpdvaluefloatkPaCalculated (Magnus formula)
4target_temperature_computedvaluefloat°CWeather average (clamped 12–24°C)
5target_humidity_computedvaluefloat% RHWeather average (clamped 70–90%)
6difference_temperaturevaluefloat°Ctarget − actual
7difference_humidityvaluefloat%target − actual
8fan_speedvaluefloatPWM (0–255)PID controller output
9freezer_statusvaluefloat0/1Tapo plug state (compressor)
10mister_statusvaluefloat0/1Tapo plug state
11light_statusvaluefloat0/1Tapo plug state
12water_level_localvaluestringarbitraryUltrasonic water level sensor
13night_test_modevaluefloat0/1/−10=Night A (fans off), 1=Night B (fans 80), −1=suspended
14power_consumptionvaluefloatWattsMeross MSS310 energy monitor (via MQTT daemon, every 2s)
15wbt_shutdown_activevaluefloat0/1WBT fan shutdown gate status
16pid_control_modevaluefloat0/10=humidity PID, 1=temperature PID

Fan PWM Measurements (RBE — on value change only)

These measurements are logged via Report-by-Exception (RBE) nodes — only written when the value changes. Null periods in the data indicate no change, not zero output.

#MeasurementFieldTypeUnitSource
15fan_pwm_outletvaluefloatPWM (0–255)Arduino pin 45
16fan_pwm_impellervaluefloatPWM (0–255)Arduino pin 46
17fan_pwm_freezervaluefloatPWM (0–255)Arduino pin 44
18fan_pwm_circulationvaluefloatPWM (0–255)Arduino pin 12

Room Environment (HTTP pull — ~60s interval)

Room conditions are pulled from a remote sensor (DietPi RPi at 192.168.1.94) via HTTP and stored locally.

#MeasurementFieldTypeUnitSource
19room_temperaturevaluefloat°CRemote InfluxDB via HTTP
20room_humidityvaluefloat% RHRemote InfluxDB via HTTP

Mist Events (event-driven — per mist cycle)

Logged instantly when a mist cycle is triggered, unlike the polled mister_status which can miss short cycles.

#MeasurementFieldTypeUnitSource
21mist_eventvaluefloat1Humidity tab, event-driven on mist trigger

Arduino Health (serial parser — ~2s interval)

#MeasurementFieldTypeUnitSource
22arduino_statusvaluefloat0/1Heartbeat alive indicator

Colombian Weather Reference (API poll interval)

Weather data from 4 Colombian highland cities, fetched via OpenWeatherMap API.

#MeasurementFieldTypeUnitSource
23temperaturevaluefloat°CChinchiná (primary)
24humidityvaluefloat% RHChinchiná (primary)
25temperature_bogotavaluefloat°CBogotá
26humidity_bogotavaluefloat% RHBogotá
27temperature_medellinvaluefloat°CMedellín
28humidity_medellinvaluefloat% RHMedellín
29temperature_sonsonvaluefloat°CSonsón
30humidity_sonsonvaluefloat% RHSonsón

Total: 32 measurements across all sources.

Common Queries

Current conditions

SELECT last("value") FROM "local_temperature"
SELECT last("value") FROM "local_humidity"
SELECT last("value") FROM "vpd"

Last 24 hours of temperature

SELECT mean("value") FROM "local_temperature" WHERE time > now() - 24h GROUP BY time(5m)

Diurnal range

SELECT min("value"), max("value"), mean("value") FROM "local_temperature" WHERE time > now() - 24h

Power consumption history

SELECT mean("value") FROM "power_consumption" WHERE time > now() - 7d GROUP BY time(1h)

Accurate daily mist count (event-driven)

SELECT count("value") FROM "mist_event" WHERE time > now() - 24h

Night A/B comparison (historical)

SELECT mean("value") FROM "local_temperature" WHERE time > '2026-02-05' AND time < '2026-02-19' GROUP BY time(1h)

Notes

  • All measurements use a single field key (value) for simplicity
  • Boolean states (freezer, mister, light) are stored as float 0/1
  • water_level_local is stored as string type (sensor returns integer as string)
  • fan_speed from the Data Logger may be stale at night (retains last PID value even when fans are off — the PID only runs during 06:30–00:00)
  • fan_pwm_* measurements use RBE logging, so gaps represent unchanged values, not missing data
  • night_test_mode = −1 indicates the A/B experiment is suspended (current state)
  • power_consumption is logged every 2 seconds via a persistent Meross daemon publishing to MQTT
  • Query via CLI: influx -database highland -execute 'YOUR QUERY'
  • mist_event is event-driven (one write per mist cycle), unlike polled mister_status which samples every 60s and can miss the 35s mist window. Use mist_event for accurate counts; mister_status data before 2026-02-24 undercounts by ~18%
  • Note: curl -sG (GET) returns empty results — use POST or the CLI