The web interface uses Bootstrap and AngularJS. The API stores the sensor list and readings in a SQLite database. Both the web interface and API are hosted with Go. I used Go and SQLite because it means that the sever can be packaged into a single executable with no dependencies other than the web front end files. My goal is to make this as plug and play as possible.

Using the API, a sensor node can add itself to the sensor list with a HTTP POST of

{

"name": "IDname",

"title": "Title to display",

"type": "sensorType",

"minValue": minimum reading value for gauge as an integer,

"maxValue": maximum reading value for gauge as an integer

}

to http://<server IP>/api/sensors

Readings can be added with a HTTP POST of

{

"sensorName": "IDName of the sensor that took the reading",

"value": the sensor value as an integer

}

to http://<server IP>/api/readings

Sensors can be deleted with a HTTP DELETE call of

{ "name": "name of the sensor to delete" }

to http://<server IP>/api/sensors

When a sensor is deleted, the corresponding readings are also deleted.

When the web interface is loaded, the Angular app gets a list of all sensors with the type temp and stores them in an array. It then gets the readings for each sensor and stores them in the array. The webpage creates a Bootstrap panel with a JustGage gauge for every sensor. It also displays a history graph with Highcharts.