Skip to content

Latest commit

 

History

History
42 lines (36 loc) · 1.18 KB

README.md

File metadata and controls

42 lines (36 loc) · 1.18 KB

solarlog-csv

A python package for syncing data generated by Solar-Log devices to an InfluxDB instance.

Requirements

Install

python -m pip install git+https://github.com/MikiDi/solarlog-influx-sync.git

Usage

env SOLARLOG_HOST='...' \
SOLARLOG_USER='...' \
SOLARLOG_PASSWD='...' \
INFLUX_MEASUREMENT_NAME='...' \
INFLUX_HOST='...' \
INFLUX_DB='...' \
solarlog_influx_sync.py

docker-compose

Docker-compose snippet for configuring the sync to run every 10 minutes:

solarlog-sync:
  build: https://github.com/MikiDi/solarlog-influx-sync.git
  restart: always
  command: >
    sh -c "echo 'python /app/solarlog_influx_sync/solarlog_influx_sync.py' > /app/cron_entrypoint &&
           chmod +x /app/cron_entrypoint &&
           echo '*/10 * * * * /app/cron_entrypoint' > /var/spool/cron/crontabs/root &&
           crond -l 2 -f"
  environment:
    SOLARLOG_HOST: '...'
    SOLARLOG_USER: '...'
    SOLARLOG_PASSWD: '...'
    INFLUX_MEASUREMENT_NAME: '...'
    INFLUX_HOST: '...'
    INFLUX_DB: '...'