data: summaries and tilt
One summary record per measurement window, with acceleration statistics, tilt angles, main frequencies, inputs, location and weather.
The data table is the quickest way to follow a structure over weeks or months. A sensor sends one summary record for each measurement window, usually once an hour. Each record holds statistics the sensor worked out from the raw signal, so you can track tilt and vibration without reading the raw acc data.
Fields
| Field | Type | Unit | Description |
|---|---|---|---|
time | integer | ms | Time of the record, Unix milliseconds, UTC. |
aavgx, aavgy, aavgz | number | g | Average acceleration on each axis over the window. |
amaxx, amaxy, amaxz | number | g | Highest acceleration on each axis. |
aminx, aminy, aminz | number | g | Lowest acceleration on each axis. |
theta, phi | number | degrees | Tilt angles of the sensor. |
nx1, ny1, nz1 | number | Hz | Frequency of the strongest peak in the spectrum of each axis. |
nx2, ny2, nz2 | number | Hz | Frequency of the second strongest peak. |
mx1, my1, mz1 | number | g | Amplitude of the strongest peak on each axis. |
mx2, my2, mz2 | number | g | Amplitude of the second strongest peak. |
in_a, in_b | number | mV | Voltage on the two analog inputs. |
lat, long | number | degrees | Position from the device's GPS, as decimal latitude and longitude. |
tamb | number | °C | Temperature. |
w_s | number | m/s | Wind speed from a connected anemometer. |
w_d | number | degrees | Wind direction, in steps of 22.5°. |
w_s_avg | series | m/s | Six wind-speed averages, 10 minutes apart, ending at the whole hour of the record. |
odr | number | Hz | Output data rate of the raw signal. Only with merge=false. |
scale | number | g | Accelerometer full-scale range. Only with merge=false. |
A field the device does not measure is returned as 0. For example, w_s is 0 when no anemometer is connected.
The w_s_avg series
w_s_avg gives the wind speed over the last hour in six 10-minute steps. The last point is the whole hour the record falls in, and each earlier point is 10 minutes before the next. In the default map format the keys are w_s_avg_0 (oldest) to w_s_avg_5 (newest). In the other output formats each point carries its own time.
Listing records without reading them
To see when a device sent data, without downloading the readings, add timestamps_only=true:
curl -s "https://api.semitronica.pt/asense/v2/?table_name=data&id=ASENSE00000005&start_time=1764547200000&end_time=1764633600000×tamps_only=true" \
-H "x-api-key: $ASENSE_API_KEY"
{ "timestamps": [1764550862370, 1764554462370], "count": 2 }
The values above are illustrative. This list is never paged.