Python 3.x Command Line Utility for saving Sensor Information from Bosch CISS into InfluxDB via UDP
Clone the repository to your machine and use pip to install the CLI:
pip install .
develop using venv as follows:
python -m venv venv
activate the virtual environment, install using:
pip install -e .
In order to access the USB Port, you might need to change ownership (sudo chown -R user:user /dev/ttyUSB0) of the serial port or use sudo
usage: cissflux [-h] --node NODE --serialport SERIALPORT --udp-port UDP_PORT
[--updaterate UPDATERATE] [--resolution RESOLUTION]
[--db-host DB_HOST] [--db-port DB_PORT]
CLI for acquiring CISS values and storing it in InfluxDB
optional arguments:
-h, --help show this help message and exit
--node NODE Node Name for CISS. Used as Tag for InfluxDB
--serialport SERIALPORT
Serial USB Port for CISS
--udp-port UDP_PORT UDP Port for sending information via UDP. Should also
be configured in InfluxDB
--updaterate UPDATERATE
Update Rate for CISS Module in us. Default: 100ms
--resolution RESOLUTION
Resolution for CISS Accelerometer Module in G.
Default: 16G
--db-host DB_HOST hostname for InfluxDB HTTP Instance. Default:
localhost
--db-port DB_PORT port number for InfluxDB HTTP Instance. Default: 8086
- You can mention the name of the node, e.g.
CISS1or similar to use it as atagin InfluxDB - You can mention the USB Serial Port explicitly e.g.
/dev/ttyUSB0orCOM3 - You can mention the UDP Port for the Sensor set in the
influxdb.confunder the[[udp]]section - You can change the location of the log file in the
cissflux/cissflux.pyfile - You can change the location of the minimal configuration file in
cissflux/cissflux.pyfile
Typical Example:
-
Setup InfluxDB's configuration (
influxdb.conf) by adding a UDP port to read CISS information:[[udp]] enabled=true bind-address=":8100" database=CISS precision='u' -
Run the script using:
cissflux --serialport COM3 --udp-port 8100 --node testCISS
Data will be stored in CISS Database.
-
If run as default the
CONF_PATHJSON file which contains the minimum configuration file will be executed:cissflux # using file conf.json
-
Current Version provides extraction of only Inertial Sensors:
- Accelerometer
- Magnetometer
- Gyroscope
-
Environmental Sensors need to added next [WIP]