Skip to content

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

License

Notifications You must be signed in to change notification settings

webbres/pi-DS18B20-web-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages