Skip to content

OpenChirp Software Stack

Khushboo Bhatia edited this page Aug 5, 2017 · 51 revisions

REST API

Tracking page for OpenChirp Software Stack development. The acronym CRUD is used in the following sections and it stands for Create, Read, Update, Delete.

Location

  • CRUD on location.
  • Get devices at a location
  • Get gateways at a location.
  • Check to not allow deletion of non-empty locations.
  • Validation in create/update request ( For example, creating a location with name "root" should not be allowed)

Device

  • CRUD on device.
  • Create/List/Delete transducers on a device.
  • Publish to a transducer.

Device Template

  • Create a device template from an existing device.
  • List/Read/Delete a device template.
  • Create a new device using a template.

Commands

  • Create/List/Delete commands.
  • Execute a command.
  • Public link for commands.

Gateway

  • CRUD on gateway.
  • Get all devices linked to a gateway.

Service

  • CRUD on service.
  • Add/Update/Remove a device on a service. ( This includes publishing to the service's topic so it is notified immediately).
  • Get all devices linked to a service. (The output of this call includes the service specific config.)
  • Notify service of changes to its properties.

User

  • Create a user in database for every signup using a google account.
  • Save owner for each resource created.
  • API to get a user's devices, services, locations with a search by name option.

Group

  • Create/Delete group.
  • Add users to group with configurable write access. User with write access to group can add other users to group.
  • Remove users from group.

Timeseries Database

  • Service that stores transducer data to TSDB.
  • REST API for reading last value of any device-transducer.
  • REST API that returns time series data for visualization, dump csv.

Authentication

  • Allow Google-signin for end-user.
  • Basic auth for services/devices for REST and MQTT( Users that will use REST API programatically.)
  • REST API to manage credentials(for REST and MQTT) for devices/services/users.

Access Control

  • Any user with google account has read access but nobody has write access unless they are added to developer group.
  • REST API for users with ADMIN role to add/remove users from groups.
  • Device Level access control.
  • Device Service link access control.

Dashboard

  • Shortcuts.
  • Favorites
  • Recently added devices.

Visualization

  • Script to generate graph for any device-transducer.
  • Embed graphs on website.

Database ( MongoDB)

  • Setup automatic backups.
  • Restrict connection to localhost.

Monitoring

  • Setup monitoring of all required components (node , mongodb, influxdb, redis, grafana, mosquitto).

Logging

  • Log all HTTP requests with userId and timestamp.
  • Setup alerts for exceptions.
  • Log file rotation and archiving.