~chimo/airthings

Repositories related to Airthings devices.

6ab003c Log influx data to local file when POST'ing fails.

a month ago

073f76e Refactor.

a month ago

#airthings

Simple PHP script to GET samples from the Airthings API for a specific device.

It currently has a single endpoint, which expects a "Secrets" HTTP header:
wget -q -O- --header 'Secret: xxx' https://example.org

An Alpine Linux APKBUILD is available for it at ~chimo/apkbuilds/airthings.

#Depenencies

  • PHP APCU extension (php-pecl-apcu)
  • PHP cURL extension (php-curl)
  • PHP JSON extension (php-json)

#Configuration

See the "config.dist.php" file in the "private" folder for configuration options. Rename or copy it as "config.php" and replace the contents with your values.

#Output

{
    "time": 1711489008,
    "battery": 72,
    "co2": 541,
    "humidity": 32,
    "pressure": 1004.2,
    "radonShortTermAvg": 16,
    "relayDeviceType": "app",
    "temp": 19.1,
    "voc": 170
}