Smart Biogas API documentation

Smart Biogas API documentation

Introduction

Welcome to the Smart Biogas REST API documentation!

 

Begin

API tokens are distributed to users with administration roles. If you are an administrator, log in to Smart Biogas and go to the 'My Organisation' section of the platform. Here you will see an API key that is unique to your user. You will need to submit this key in an authorization header along with every request you make. If you do not see your API key, get in touch with a member of staff at support@smart-biogas.com

 

End Points

Root end point: https://app.smartbiogas.io/api/v1/

At present, there is 1 API endpoints available:

  1. Get Device Data

 

Authorization

With each request, include the provided API token as an authorization header as follows:

Authorization: Token <token>

 

Error Codes

  • 200 for a successful operation.
  • 400 for an invalid request.
  • 401 for missing authentication credentials.
  • 403 for forbidden access.
  • 404 for an invalid device ID.

 

Get Device Data

GET /devices/<deviceID>/reports

This allows you to retrieve all data reports from a particular device given a date-time range. The start of the range is inclusive and the end is exclusive. The date-time range is provided via the query parameters start and end as integer unix timestamps at the granularity of a second. The endpoint allows you to retrieve up to 30 days of data at a time.

Devices send data every ~1 hour but you will see timestamp, pressure and flow data for every 1 minute. All other data is only provided once an hour.

 

curl -H "Authorization: Token <token>" "https://app.smartbiogas.io/api/v1/devices/<device_id>/reports?start=1610542493&end=1610546064"

 

Outputs

Parameter

Type Description
timestamp number Unix Timestamp for the creation of the data report in seconds.
static_pressure_pa number

The static pressure in pascal.

flow_lph number The flow of gas in litres per hour.
gas_consumption_l number Gas consumption counter in litres.
battery_v number Battery voltage at the time of sending in volts.
battery_a number Battery amperage at the time of sending in amps.
solar_v
number The voltage of the solar input at the time of sending in volts.
temperature_degc
number The temperature in degrees of Celcius.
rssi_db
number

Signal strength in dB. The scale is from 0 to -120. The closer to 0, the stronger the signal.

 

    • Related Articles

    • Smart Biogas Web App

      What is smart biogas web app The Smart Biogas app is a cloud-based platform created for organisations that want to monitor their biogas digesters and/or biogas distribution. The web app shows the data coming from Smart Biogas meters and allows ...
    • Smart Biogas Meter Data

      Introduction Smart Biogas device sends data every hour to the web app. The data is available at "DIGESTER DATA" tab on the customer page. Understanding the device data graph plot on the platform Device data is shown in graphs and tables on the ...
    • Replace, Reuse and Remove Smart Biogas Devices

      Remove a customer You can remove a customer on Smart Biogas. Go to the customer’s page, and you will find a delete icon. Take care as this cannot be undone. Replace a smart meter If you wish to replace an existing smart meter with a new one, this can ...
    • Smart Meter

      What is a Smart Biogas meter? Smart Biogas is a real-time monitoring system for biogas digesters. It is connected between digester and stove and sends flow and Pressure data to the software app, enabling performance insights, asset management, pay as ...
    • Terms and Conditions of Use

      Below are the terms and conditions of use that must be signed when creating a new organisation on the Smart Biogas application.