Developers

Download or upload sensor data programmatically

Quick start checklist


  API Token
Please contact us for an account. Then you can generate a token in your account settings.


  Testing
If you are logged in (Check the top-right area of this page), your tokens will be used in the examples below to make testing easier.


  Uploading data
Contact us if you would like to puch data from other sensors to our dashboard.




Obtaining data from Pycno Sensors

  2.1 Introduction

The following basic requests allow a server or a mobile app to obtain sensor data directly from the Pycno server. HTTPS is mandatory for any sensitive information and it is highly recommended.

Loading...

Under your account on the pycno dashboard you can see your token. With that token you can hit the /api/ngsi-v2/* endpoints.

  2.2 Request format

  • Getting a sensor's context info
    • Request the context information of a sensor by doing the following.
    • Issue a GET request to the following link, and pass the token in the link params OR pass the token in the X-Auth-Token HTTP headers.
    • Loading...
    • The resulting struct shows you the latest snapshot of all the sensor readings and some other data.
    • {"id": "M1234567890",
      "type": "sensor",
      "Battery": {
         "type": "Volts",
         "value": 4.15,
         "metadata": {}
      }
      ...
      }
    • The benefit of NGSI is that attributes like Temperature, Humidity, Solar radiation, Soil at 20 and 40cm, Soil temperature, battery voltage and Signal strength, etc. have their metadata and units attached to them. This makes processing and discovery easier.

  • Getting attribute information
    • To access a specific attribute of the sensor use:
    • Loading...
    • The resulting struct will only contain the temperature attribute.
    • {
         "type": "Celcius",
         "value": 26,
         "metadata": {}
      }

To learn more about NGSI visit

https://fiware-orion.readthedocs.io/en/develop/user/walkthrough_apiv2/#query-entity