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 Overview

      What is a Smart Biogas meter? Smart Biogas is a real-time monitoring system for biogas digesters. It is connected between digester and stove or other biogas appliance and sends flow and Pressure data to the software app, enabling performance ...
    • Navigating the Smart Biogas Platform

      The navigation bar is your gateway to managing biogas operations efficiently. It allows you to: Monitor and manage biogas systems View and update customer information Register and track smart meters Add and configure digesters and appliancesThe ...
    • Managing Biogas Systems – In-Depth Guide

      The Systems page provides tools to efficiently manage all registered biogas systems. 1. Viewing Biogas Systems All registered biogas systems are displayed in a table format, allowing users to: See system details at a glance Scroll through the list of ...
    • How to Add a New Biogas System

      To register a new biogas system, follow these steps: Click the "Add a new System" button on the Dashboard or on the Systems page. Enter system details, including: System name Address External reference (optional) Installation notes (if any) Select ...
    • Editing or Updating a Biogas System

      To make changes to an existing Biogas system, follow these steps: Locate the System Go to the Systems tab. Use search or filters to find the system. Click on the system to open its details. Edit System Details On the details screen, click the "Edit ...