SMK Pulau Gaya Pilot IOT Network


IOT for Communities

data lab api access

api parameters

This page allows you to play around with the stored data and retrieve it for use in your own research and/or website. Access to the API and data is free - the developers do not make any guarantees on the availability of the service or the accuracy of the data. Please do not abuse the server - if you need to make periodic requests to the API, we recommend an interval of at least 10 minutes.

format: YYYYMMDDHHMMSS, defaults to 5 minutes ago | clear

format: YYYYMMDDHHMMSS, defaults to now | clear

  • legacy returns TTN payloads
  • averages returns consolidated rows
  • json hides interface, has header Access-Control-Allow-Origin: *
  • lab (csv as attachment) downloads csv file, use lab (csv) to check output
50000 (fixed, use with record offset for pagination)
reset everything

sql / mariadb dialect

SELECT
  ID,
  CONCAT(DATE_FORMAT(timestamp_server, '%Y%m%d%H%i%s'), '-', ID) AS UID,
  payload

FROM
  smkpulaugaya

WHERE

/* FILTERS: MANDATORY */
  `timestamp_server` >= '20181023045002'
  AND 
  `timestamp_server` <= '20181023045502'

/* FILTERS: EXTRA */
  AND
  (
    `dev_id` = 'pulaugaya-lora-node1'
    OR
    `dev_id` = 'pulaugaya-lora-node2'
    OR
    `dev_id` = 'pulaugaya-lora-node3'
    OR
    `dev_id` = 'pulaugaya-lora-node4'
  )

/* GROUP BY */


/* ORDER BY */
ORDER BY
  timestamp_server DESC

LIMIT 50000 OFFSET 0

deployment information / last updated: 2017-12-11

node 1

node 2

node 3

node 4

lorawan gateway

backend

database / 19 rows returned in 0.00218 seconds

  • db reference key (UID) for each array element is unique
    the first 14 digits is the local server date-time (GMT+08)
  • field payload_raw is base64-encoded
    (see raw feed for more info)
  • field metadata.time is the gateway clock and is GMT (GMT+0)
    (not available with basic structure processor)
  • [full structure processor] json fields may vary based on the data source
    (sources: via TTN cloud service or the custom-built lorasniff)
array (
  '20181023045450-2045215' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7991,
    'payload_raw' => 'VDMwLjgx',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:54:50.910914Z',
    ),
  ),
  '20181023045434-2045214' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7990,
    'payload_raw' => 'UDEwMTAuMzY=',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:54:34.868361Z',
    ),
  ),
  '20181023045418-2045213' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7989,
    'payload_raw' => 'VDMxLjA2',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:54:18.319771Z',
    ),
  ),
  '20181023045402-2045212' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7988,
    'payload_raw' => 'UDEwMTAuMzM=',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:54:02.780281Z',
    ),
  ),
  '20181023045346-2045211' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7987,
    'payload_raw' => 'VDMxLjQw',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:53:46.739717Z',
    ),
  ),
  '20181023045330-2045210' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7986,
    'payload_raw' => 'UDEwMTAuMjY=',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:53:30.696989Z',
    ),
  ),
  '20181023045314-2045209' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7985,
    'payload_raw' => 'VDMxLjc5',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:53:14.654643Z',
    ),
  ),
  '20181023045258-2045208' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7984,
    'payload_raw' => 'UDEwMTAuMjc=',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:52:58.118176Z',
    ),
  ),
  '20181023045241-2045207' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7983,
    'payload_raw' => 'VDMxLjk5',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:52:41.068136Z',
    ),
  ),
  '20181023045225-2045206' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7982,
    'payload_raw' => 'UDEwMTAuNDM=',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:52:25.025245Z',
    ),
  ),
  '20181023045207-2045205' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7981,
    'payload_raw' => 'VDMxLjk1',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:52:07.976053Z',
    ),
  ),
  '20181023045150-2045204' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7980,
    'payload_raw' => 'UDEwMTAuMzg=',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:51:50.945224Z',
    ),
  ),
  '20181023045135-2045203' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7979,
    'payload_raw' => 'VDMxLjk2',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:51:35.397564Z',
    ),
  ),
  '20181023045120-2045202' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7978,
    'payload_raw' => 'UDEwMTAuMjI=',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:51:20.352232Z',
    ),
  ),
  '20181023045104-2045201' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7977,
    'payload_raw' => 'VDMyLjEx',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:51:04.804742Z',
    ),
  ),
  '20181023045049-2045200' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7976,
    'payload_raw' => 'UDEwMTAuMzQ=',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:50:49.766544Z',
    ),
  ),
  '20181023045032-2045199' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7975,
    'payload_raw' => 'VDMxLjgy',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:50:32.721185Z',
    ),
  ),
  '20181023045017-2045198' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7974,
    'payload_raw' => 'UDEwMTAuMTY=',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:50:17.682351Z',
    ),
  ),
  '20181023045002-2045197' => 
  array (
    'dev_id' => 'pulaugaya-lora-node2',
    'counter' => 7973,
    'payload_raw' => 'VDMxLjQ0',
    'metadata' => 
    array (
      'time' => '2018-10-22T20:50:02.636040Z',
    ),
  ),
)