Skip to content

OEHU/oehu-setup-api

Repository files navigation

oehu-setup-api

This oehu-setup-api repository exists of an internal API to setup OEHU.

The Raspberry Pi runs the API (see https://oehu.org/get-started to get started with OEHU).

Example function calls are:

  • startReadWrite
  • updateConfigValue
  • getConfig
  • newDeviceId

API End Points

On 2018-10-15 the following end points were available:

/wifi/scan
/wifi/connect/:ssid/:password
/wifi/status
/wifi/disconnect
/oehu/getconfig
/oehu/generateNewPhrase
/oehu/getKeypair
/oehu/getConfigurated
/oehu/startEmulator
/oehu/stopEmulator
/oehu/isEmulating
/oehu/registerDevice/:deviceType/:lat/:long/:locationAccuracy/:householdType/:occupants
/oehu/start
/oehu/stop
/oehu/isRunning

See the following files for a working/updated list of API end points:

Installation

npm install

Development

npm run dev

API server will listen on http://localhost:8000 & watch for changes to restart.

Production

npm start

Tests

The tests are made with AVA, nyc and mono-test-utils in test/:

npm test

About

The Raspberry Pi runs an API for setup calls (i.e.: `startReadWrite`). This repo consists of this OEHU Setup API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published