You can install cp2influxdb directly from PyPI:
sudo pip3 install -U cp2influxdb
Update config.yml and run
cp2influxdb -c config.yml
Insert this snippet to the file /etc/systemd/system/cp2influxdb.service:
[Unit]
Description=COOPER cp2influxdb
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=pi
ExecStart=/usr/local/bin/cp2influxdb -c /etc/cooper/cp2influxdb.yml
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Start the service:
sudo systemctl start cp2influxdb.service
Enable the service start on boot:
sudo systemctl enable cp2influxdb.service
View the service log:
journalctl -u cp2influxdb.service -f
This project is licensed under the MIT License - see the LICENSE file for details.