2017年3月21日 星期二

ThingSpeak created_at to Python datetime

created_at is ISO 8601 format.


import dateutil.parser
yourdate = dateutil.parser.parse(datestring)




import datetime
datetime.datetime.strptime( "2007-03-04T21:08:12Z", "%Y-%m-%dT%H:%M:%SZ" )





References :
How do I translate a ISO 8601 datetime string into a Python datetime object? - Stack Overflow
pythingspeak/thingspeak.py at master · ninjawil/pythingspeak

2017年3月16日 星期四

InfluxDB enable Web UI

# vi influxdb/etc/config.sample.toml
[admin]
    enabled = true

Use environment variable:
INFLUXDB_ADMIN_ENABLED=true

$ vi docker-compose.yml
influxdb:
  image: influxdb:latest
  container_name: influxdb
  ports:
    - "8083:8083"
    - "8086:8086"
  environment:
    - INFLUXDB_ADMIN_ENABLED=true
  volumes:
    - ./influxdb:/var/lib/influxdb




References :
influxdb/config.sample.toml at master · influxdata/influxdb
docker-influxdb-grafana/docker-compose.yml at master · nicolargo/docker-influxdb-grafana