Fetch sensor data.
Project description
Jocasta
Library to extract data from serial and send it various services.
Quick Start
Installation
pip3 install jocasta
Basic Home Config File
Create a directory in your home directory to store the config file. You can pass in a file at run time but this is the quick start.
cd ~
mkdir .config
cd .config
Create a file called jocasta_config.ini
and copy and paste the following into the depending on which services you want.
[io_adafruit]
username = username
key = key
feeds = temperature,light,humidity
measurements = temperature,light,humidity
[influxdb]
host = 192.168.1.100
port = 8086
password = admin
username = admin
database = greenhouses
[file_system]
file_name = /tmp/sensor_data.json
[temperature_ranges]
maximum = 55.0
minimum = -10.0
Running
Start jocasta
by add the path of your serial device.
OSX
Command and output
$ jocasta /dev/tty.usbserial-14230
╒═════════════╤══════════╤══════════╤══════════╤════════╕
│ Temperature │ Location │ Moisture │ Humidity │ Light │
├─────────────┼──────────┼──────────┼──────────┼────────┤
│ 23.2 │ office │ 568 │ 61.2 │ 5800.0 │
╘═════════════╧══════════╧══════════╧══════════╧════════╛
Raspberry Pi / Linux
Command and output
$ jocasta /dev/ttyUSB0
╒═════════════╤══════════╤══════════╤══════════╤════════╕
│ Temperature │ Location │ Moisture │ Humidity │ Light │
├─────────────┼──────────┼──────────┼──────────┼────────┤
│ 23.2 │ office │ 568 │ 61.2 │ 5800.0 │
╘═════════════╧══════════╧══════════╧══════════╧════════╛
Running
A config file can supplied to the command line call using the following:
jocasta /dev/tty.usbserial-14230 /path/to/config.ini
Supported Services
Services and things Jocasta can send data to.
InfluxDB - https://www.influxdata.com
Config
Add the following to your jocasta-config.ini
file, making sure you update the values
to match your InfluxDB server.
[influxdb]
host = 192.168.1.100
port = 8086
password = admin
username = admin
database = greenhouses
Adafruit IO - https://io.adafruit.com
Adafruit's beta IoT hosted application.
Config
[io_adafruit]
username = username
key = key
feeds = temperature,light,humidity
measurements = temperature,light,humidity
File System
Outputs json
to a file on disk. This is handy for other applications to access the data.
Config
[file_system]
file_name = /tmp/sensor_data.json
MQTT
TODO
Kafka
TODO
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file jocasta-0.2.2.tar.gz
.
File metadata
- Download URL: jocasta-0.2.2.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0.post20200710 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54661314473d12fc63b967b0095bc450560e35437a171cf5a4d44e96db40c9aa |
|
MD5 | 317c35f425e87fb9dabb11b86d2213e0 |
|
BLAKE2b-256 | 260ab84ad5c6a78240f8061c0ad9732962fd7a0c4d08b758e94da786fe1ddea4 |
File details
Details for the file jocasta-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: jocasta-0.2.2-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0.post20200710 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d5eca4c3c3a38bc58053d2e6cf23a3de789096f7bedcf037c517718bfacba4b |
|
MD5 | 734267add70f81fe3e619afdbe513b6c |
|
BLAKE2b-256 | cb6e5b76c61838790445325b86924aea544cbfe01e8e4aa4aca906cc185e9488 |