GithubHelp home page GithubHelp logo

webbres / pi-ds18b20-web-monitor Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 32 KB

Provides a web / REST interface to interacting with DS18B20 sensors setup on a Raspberry Pi / Pi Zero

License: GNU General Public License v3.0

Java 100.00%

pi-ds18b20-web-monitor's Introduction

Pi DS18B20 Web Monitor

Currently provides a simple spring boot implementation of a logger for temperature data from 1 or more DB18B20 sensors connected to a Pi or Pi Zero.

This application will only succesfully run on a Rasperry Pi with 1 or more sensors connected.

Database

The data is stored in an H2 database ~/.temperature/data

Access

See http://localhost:8080/swagger-ui.html for documentation of the resources.

Resources

These resources are all GET requests and the URL is relative to the base. If running as a spring boot standalone application this will be http://localhost:8080 and will vary if deployed in tomcat.

Live sensor data

/sensors/{id}/

Get the current temperature recorded by the sensor with the specified ID as a url path parameter.

/sensors/ids/

Get all available IDs

Example response

	19.625

Example response

	[
	  "28-0517602a31ff",
	  "28-051760a9aaff"
	]

/sensors/all/

Get the temperature readings for all connected sensors.

Example response:

	{
	  "28-0517602a31ff": 19.625,
	  "28-051760a9aaff": 18.562
	}

Historical sensor data

/data/{sensor}/record/count

Returns the count of the number of records recorded for the named sensor

Example output

http://localhost:8080/data/28-051760a9aaff/record/count

	6261

Building and Deploying

To generate an executable jar run (this should be machine agnostic, build your your PC and run on the pi).

$ gradle build

Then to run the application:

$ java -jar pi-temp-sensor-rest-{version}.jar

pi-ds18b20-web-monitor's People

Contributors

webbres avatar

Watchers

 avatar  avatar

pi-ds18b20-web-monitor's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.