2017-08-29 19:10:08 +02:00
2017-08-29 19:10:08 +02:00
2017-08-28 22:23:22 +02:00

dht22 Temperature Stats

mySQL

Login: mysql --user=root --password=password

Creating new user: create user 'dhtuser'@'localhost' IDENTIFIED BY 'raspberry';

Permissions: grant all privileges on *.* to 'dhtuser'@'localhost';

Create database: create database dhtstats;

Use database: use dhtstats

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, isoutside int not null, gm3 float not null, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) );

Show all entries in table: select * from stats;

Dependencies

Raspberry Pi

apt install mariadb-server mariadb-client libmariadbclient-dev libmariadbclient-dev-compat libconfig-dev wiringpi libcurl4-openssl-dev (-s)

ESP-8266

aRest

Used sources

cJSON

Description
Temperature statistics with the raspberry pi and dht22 sensor. The ESP-8266 can be used as sensor nodes.
Readme 9.6 MiB
Languages
C 30.5%
HTML 20.3%
PHP 19.6%
C++ 19.3%
CSS 6.7%
Other 3.6%