Recording RPICT Serial stream on local file

From lechacal
Jump to: navigation, search

This is to record the data from a RPICT series board in a plain CSV file that can be opened with excel or else later on.

We are proposing a basic script template which can be installed as below.

sudo apt-get install python-requests
sudo mv /usr/local/bin/
sudo mv gateway.conf /etc/

Edit the gateway.conf file to reflect your own setting.

nano /etc/gateway.conf

In this file you should turn off Emoncms and Influxdb. Then turn on localsave. Also edit the directory if needed.


enabled = False
hostname =
apikey = --apikey-from-emoncms-goes-here--
node = 20

enabled = False
url =   #
dbname = mydb
user = token
passwd = -optional-password-goes-here----
measurement = rpict3t1           # Modify this to match your board

enabled = True
directory = /tmp/

Insert the RPICT and run -d

The data will be stored in the /tmp directory. One file per day in csv format. Titled with the epoch time when it started.