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.
Under your account on the pycno dashboard you can see your token. With that token you can hit the /api/v2/data/* endpoints.
2.2 Request format
- Getting the list of sensors
- Issue a GET request to the following link, and pass the token in the link params.
- The resulting array shows all the sensors under your farm.
- Getting one sensor's info
- If you have many sensors you can request only the information of one sensor, by doing the following.
- Issue a GET request to the following link, and pass the token in the link params.
- The resulting struct shows you the latest snapshot of all the sensor readings and some other data. You can also see at the bottom an array called PLOTTABLE.
- An example is "plottable": ["TEMP", "HUM","LDR","SO_20T","SO_40T","ST", "BAT","RSSI"]
- This array shows what useful data can be plotted. These are short codes for Temperature, Humidity, Solar radiation, Soil at 20 and 40cm, Soil temperature, battery voltage and Signal strength.
- Getting timeseries data from a sensor
- Issue a GET request to the following link. Pass the token, sensor ID as UID, the sensor type (BAT or TEMP, or any other key from the plottable list) and an optional date range in the link params.
- By changing the BAT to HUM you can get the humidity for the same period.