Skip to content
Generic Internet of Things platform
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bootstrap
config
database
public
resources
routes
storage
tests
.env
.env.example
.gitattributes
.gitignore
artisan
composer.json
composer.lock
iotplatform.sql
package.json
phpunit.xml
readme.md
server.php
webpack.mix.js

readme.md

IoT Platform

Generic Internet of Things platform for data collection. Devices can be registered with custom fields. Supports triggers and visualization through charts.

Table of contents

Technology stack

Charts are powered by Chart.js.

ESP8266 module was used for this project.

Features

Overview

Home page.

Devices

List of devices.

Device Fields

Device fields are used as keys for sending data to the platform.

Device Settings

Basic device configuration and settings.

Device Triggers

Triggers via email and webhook.

Device Data

Browse device data.

Charts

Create charts.

Edit Chart

Edit chart and add fields to display on it.

Single Field Chart

Example of single field chart.

Multi Field Chart

Examples of multi field charts.

Usage

Request

Example request

localhost:8000/data?api_key=SYKzfAmDjFjbGonBbIHWrucslNFN8nD1mnABYXfhDztjY
&temperature=50
&humidity=55
&pressure=101325

It is also possible to use additional parameters: datetime and mac_address.

Response

Example response

{
  status: "success",
  read_time: 15,
  added: [
    "temperature",
    "humidity"
  ],
  not_added: [
    "pressure"
  ],
  triggers_activated: [
    {
      field: "temperature",
      min_value: "10.00",
      max_value: "40.00",
      email: "silvio.simunic@gmail.com",
      webhook_url: null
    }
  ]
}

Error Responses

  • Missing api key.
  • No values.
  • Non existing api key.
  • Non-numeric value for field name.

Installation

  • Install Apache, PHP7, MySQL and Composer
  • Run composer install in root directory
  • Create database using iotplatform.sql
  • Configure .env file
  • Run php artisan serve in root directory
You can’t perform that action at this time.