Skip to content

Youi-Lab/co2-ipi-sensors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

co2-ipi-sensors

Rest service to store and retrieve co2 IPICYT´s sensor data.

  1. Upload sensor id data into the database:

curl -X POST "http://localhost:8083/sensky/greetsensorpar" -F "serial=IPI-SENSOR-00000100" -F "mac=00:00:00:01" -F "type=CO2" -F "units=PPB"

Alternatively you can use json data format:

curl -X POST http://localhost:8083/sensky/greetsensorjson -H 'Content-type:application/json' -d '{"serial":"IPI-SENSOR-00000100", "mac":"00:00:00:01", "type":"CO2", "units":"PPB"}'

  1. Upload a sensor measurement: datetime is a ten digit number representing UTC time

curl -X POST http://localhost:8083/sensky/uploadmeasurement -F "serial=IPI-SENSOR-00000100" -F "datetime=1234567890" -F "val=100.1"

  1. Retrieve all sensor´s measurements into a json string:

curl -X POST http://localhost:8083/sensky/downloadjson -F "serial=IPI-SENSOR-00000100"

  1. TODO: Retrieve sensor´s measurements between datetimes.

About

Rest service co2 sensors made at IPICYT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages