- A CO2 sensor is embedded in the base of artificial plants.
created_at(ISO8601) |
id(string) |
type(string) |
value(float) |
2014-10-10T13:50:40 |
living_room |
CO2 |
400.5 |
2014-10-10T13:50:50 |
dining |
TEMP |
20.0 |
... |
|
|
|
- IDは設置位置を表すものとした.
- 1エッジが複数センサを持つ場合もある想定.
- 投入側は
created_at
不要とし,自動採番とした.
# SQLite table create
>> create table sensors_value(created_at TIMESTAMP DEFAULT (DATETIME('now', 'localtime')), id text, type text, value float);
./node-red_flow.json
./m5_flow.png
Comments
時系列データであることを考えれば,InfluxDB + Grafana という構成のがよかったかもしれません.