Remote data

TheYOSH edited this page Jul 26, 2018 · 8 revisions

With TerrariumPI it is possible to retrieve remote sensor data. It will only able to process one value from the remote source.

This document describes the url format that is needed in order to get the remote data. For now only JSON data is supported.


This data will be pulled every 30 seconds! So make sure that there are no API limits and that the remote device can handle it.

URL Format:

The remote data url is a full url to the JSON output appended with a dash '#' and the JSON traversal path


JSON Data Example

Remote source url:

json output:

  "sensors": [
    { "alarm_min": 20.0,  
      "address": "26C04A8F01000042", 
      "id": "f745feb874df5673e157ef8c69e586b4", 
      "limit_max": 45.0, 
      "alarm_max": 30.0, 
      "name": "Top", 
      "alarm": false, 
      "hardwaretype": "owfs", 
      "current": 28.8125, 
      "limit_min": 10.0, 
      "type": "temperature"

json traversal path: sensors/0/current

Construct full url by combining the remote source url and the json traversal path joining by a dash '#'. Full remote source url:

The 'json traversal path' is needed to get the right value from the JSON data. In the example above the JSON data starts with 'sensors' which is an array. Therefore the second value is '0' so we get the first item of the array. And the latest is 'current' because that holds the current value that we want. In this case 28.8125

External JSON weather

Remote source url:

json output:

          "description":"light intensity drizzle",

json traversal path: list/0/main/temp

Remote url for TerrariumPI:

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.