Skip to content

Commit 28403c2

Browse files
committed
Add README
1 parent a2a7ae9 commit 28403c2

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# docker netatom influxdb python
2+
3+
latest version is 0.2.0
4+
5+
```
6+
docker pull manabuishii/docker-netatmo-influxdb-python:0.2.0
7+
```
8+
9+
# Prepare InfluxDB
10+
11+
If you don't have InfluxDB, you need to prepare.
12+
13+
```
14+
mkdir influxdbdata
15+
docker run -p 8083:8083 -p 8086:8086 \
16+
-v $PWD/influxdbdata:/var/lib/influxdb \
17+
--name influxdb influxdb:1.0.2-alpine
18+
```
19+
20+
## Create database
21+
22+
Create Database on the web
23+
24+
```
25+
http://localhost:8083
26+
```
27+
28+
# HOW TO RUN
29+
30+
Fill your value of netatmo and influxdb environment.
31+
32+
33+
```
34+
docker run --rm \
35+
-link influxdb:influxdb \
36+
-e NETATMO_CLIENT_ID="" \
37+
-e NETATMO_CLIENT_SECRET="" \
38+
-e NETATMO_USERNAME="" \
39+
-e NETATMO_PASSWORD="" \
40+
-e INFLUXDB_HOST="" \
41+
-e INFLUXDB_PORT="" \
42+
-e INFLUXDB_USERNAME="" \
43+
-e INFLUXDB_PASSWORD="" \
44+
-e INFLUXDB_DATABASE="" \
45+
--name YOURDOCKERHOSTNAME \
46+
manabuishii/docker-netatmo-influxdb-python:0.2.0
47+
```
48+
49+
Polling 1 per 60 seconds.
50+
51+
52+
# Check
53+
54+
From Web.
55+
56+
Select your database
57+
58+
# debug
59+
60+
Pass environment value `DEBUG` is set 'True'
61+
62+
```
63+
-e DEBUG=true
64+
```
65+
66+
# Sample query for web
67+
68+
## latest 5 CO2 value
69+
70+
```
71+
select value,host from CO2 order by time DESC limit 5;
72+
```
73+
74+
## latest 5 CO2 value of YOURMODULEID
75+
76+
```
77+
select value,host from CO2 where host='YOURMODULEID' order by time DESC limit 5;
78+
```

0 commit comments

Comments
 (0)