An open API service indexing awesome lists of open source software.

https://github.com/orestispanago/cr1000-pi

Get data from CR1000, upload to FTP
https://github.com/orestispanago/cr1000-pi

campbellscientific cr1000 datalogger ftp raspberry-pi

Last synced: about 2 months ago
JSON representation

Get data from CR1000, upload to FTP

Awesome Lists containing this project

README

          

## CR1000-pi

Gets measurements from Campbell Scientific CR1000 or CR800 datalogger

Saves data to daily csv files

Uploads csv files to FTP and SFTP server

Based on [PyCampbellCR1000 library](https://github.com/LionelDarras/PyCampbellCR1000)

## Instructions

Install requirements using

```pip install -r requirements.txt```

Edit the tasks configuration parameters in ```tasks_config.json```.

To remove a task, edit ```main()``` function in ```main.py```.

To avoid overlapping cron job execution, use ```flock``` in crontab:

```
*/5 * * * * /usr/bin/flock -w 0 ~/cr1000_pi.lock python3 ~/CR1000-pi/main.py
```

To check if your cron job is running:

```
grep CRON /var/log/syslog
```

To make sure that ```flock``` works:

```
flock -n -x ~/cr1000_pi.lock true || echo "LOCKED"
```