More sensor information in struct; added handle_url; new node_id column in sendmysql

This commit is contained in:
2017-08-26 15:02:15 +02:00
parent 2efcbce437
commit 740589b158
6 changed files with 76 additions and 9 deletions

View File

@@ -13,14 +13,14 @@ Create database: `create database dhtstats;`
Use database: `use dhtstats`
Create new table: `CREATE TABLE stats (id MEDIUMINT NOT NULL AUTO_INCREMENT, pin int not null, humidity FLOAT NOT NULL, temperature FLOAT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) );`
Create new table: `CREATE TABLE stats (id MEDIUMINT NOT NULL AUTO_INCREMENT, node_id int not null, pin int not null, humidity FLOAT NOT NULL, temperature FLOAT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) );`
Show all entries in table: `select * from stats`
Show all entries in table: `select * from stats;`
## Dependencies
### Raspberry Pi
`sudo apt-get install libmysqlclient-dev libmysqld-dev mysql libconfig-dev`
`apt install mariadb-server mariadb-client libmariadbclient-dev libmariadbclient-dev-compat libconfig-dev wiringpi (-s)`
### ESP-8266
[aRest](https://github.com/marcoschwartz/aREST)