Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aiekick/bme280server
linux server who give bme280 sensor datas / history
https://github.com/aiekick/bme280server
bme280 history linux sensor sqlite
Last synced: 12 days ago
JSON representation
linux server who give bme280 sensor datas / history
- Host: GitHub
- URL: https://github.com/aiekick/bme280server
- Owner: aiekick
- License: mit
- Created: 2021-06-13T00:39:39.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-06T14:36:38.000Z (over 3 years ago)
- Last Synced: 2024-12-17T02:25:23.956Z (2 months ago)
- Topics: bme280, history, linux, sensor, sqlite
- Language: C++
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# BME280Server
bme280Server is a Http server who expose sensor datas of a bme280 as a json
## Uses
```
usage : bme280Server [-h] [-v] [-b i2cbus] [-p http_port] [-d database_file] [-t sensor_save_in_db_delay_in_seconds]Options :
-h Print this help
-v Print the version
-b Specify the i2cbus
By default, the ic2bus /dev/i2c-1 will be used
-p Specify a port number for the http server to listen to
By default, the port 80 is used
-d Specify the FilePathName of the database.
By default, db.db3 will be used
-t Specify a delay in second for save bme280 Sensor datas in db
The minimal accepted value is 10s
By default the value will be 3600 (1h)Description :
this programm get datas from a i2c sensor bme280 and can do many things with it :
- Act as a http server. the possible urls are :
- http://ip:port will show you a page with explanation of possible url options
- http://ip:port/sensor will launch a measure and give you the result in a json format
- http://ip:port/history:count will extract the last count measures from DB, and show you as a json format
count must be a valid number
- Can start a measure of the i2c sensor bme280 (temperature, pressure, humidity)
- Do logging each delay, a bm280 measure in a local sqlite database
```
## dependencies
you need libuv1.0 and libsqlite3 (you```
sudo apt-get update
sudo apt-get install libsqlite3-dev libuv1.dev
```
## how to generate configure file
```
./gen_configure.sh
```
## how to build and install
after ./gen_configure.shjust do :
```
./configure
make
sudo make install
sudo make install-service
```
## how to uninstall
```
sudo make uninstall-service
sudo make uninstall
```
## modifications
if you want to modify the code, you need to build BuildInc (in libs) and install it
he is need for inc build.h who contain the version number