Docker Container to send Nest Data to InfluxDB
636
Based on https://github.com/grempe/nest_poller
Guide: https://developer.nest.com/documentation/cloud/rest-quick-guide
See : https://developer.nest.com/clients for my registered API clients and the URLs.
Step 1 : GET a PIN number
GET https://home.nest.com/login/oauth2?client_id=3fb1f2d0-1f87-42f5-a9f8-0b21f142aef5&state=STATE
Step 2 : Copy PIN code. e.g. N6B4FV9G
Step 3 : Exchange the authorization PIN code for a long-lived access token
Replace code=AUTHORIZATION_CODE in this URL with the PIN
Step 4 : Extract long-life access token from response which will be used for all future API requests.
{"access_token":"c.7MVm2...","expires_in":315360000}
docker run -e INFLUXDB_NEST_POLLER_HOST='10.7.0.80' -e INFLUXDB_NEST_POLLER_USERNAME='influxuser' -e INFLUXDB_NEST_POLLER_PASS='influxpass' -e NEST_API_ACCESS_TOKEN='c.7MVm2...' derf/nest_poller run
nestpoller:
environment:
INFLUXDB_NEST_POLLER_HOST: influxdb
INFLUXDB_NEST_POLLER_USERNAME: influxuser
INFLUXDB_NEST_POLLER_PASS: influxpass
NEST_API_ACCESS_TOKEN: c.7MVm2...
command:
- run
image: derf/nest_poller
links:
- influxdb:influxdb
influxdb:
ports:
- 8083:8083/tcp
- 8086:8086/tcp
- 8090:8090/tcp
- 8099:8099/tcp
environment:
PRE_CREATE_DB: 'nest_poller'
image: tutum/influxdb
volumes:
- /path/to/influxdb/data:/data
Content type
Image
Digest
Size
263.5 MB
Last updated
over 10 years ago
docker pull derf/nest_poller