Example Using InfluxDB: Difference between revisions
Line 16: | Line 16: | ||
Github link is [https://github.com/influxdata/influxdb here]. | Github link is [https://github.com/influxdata/influxdb here]. | ||
We will call this server hostname myserver for our example below. | |||
===Raspberrypi side=== | ===Raspberrypi side=== | ||
Line 27: | Line 29: | ||
import influxdb | import influxdb | ||
print influxdb.__version__ | print influxdb.__version__ | ||
===Testing=== | |||
Use some of the example from [https://docs.influxdata.com/influxdb/v1.2/guides/writing_data/ influxdb documentation] to test the correct communication between the server and raspberrypi. | |||
Also make sure you can access Chronograf by going to | |||
http://myserver:8888 |
Revision as of 13:31, 22 March 2017
UNDER CONSTRUCTION...
This is a basic example to forward data to an InfluxDB database. Note this will only cover a skeleton to start building your own application.
Prerequisites
The RPICT series board must output as CSV for this work.
Installation
Server side hosting InfluxDB
Install InfluxDB and Chronograf as recommended. This link provides compiled executables.
Github link is here.
We will call this server hostname myserver for our example below.
Raspberrypi side
Install the python biding to influxdb. Available from github here.
Do not be tempted by using apt-get install! Thsi will install an old version that does not work. Use pip or download the package from github and install using
sudo setup.py install
Check version using
python import influxdb print influxdb.__version__
Testing
Use some of the example from influxdb documentation to test the correct communication between the server and raspberrypi.
Also make sure you can access Chronograf by going to
http://myserver:8888