Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

jocasta-0.3.1-py3.8.egg (21.5 kB view details)

Uploaded Source

File details

Details for the file jocasta-0.3.1-py3.8.egg.

File metadata

  • Download URL: jocasta-0.3.1-py3.8.egg
  • Upload date:
  • Size: 21.5 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

Hashes for jocasta-0.3.1-py3.8.egg
Algorithm Hash digest
SHA256 fff7966d257e5271f792417f60d8f7a4679f33cde8cc9e2f2c22edb951f24347
MD5 0714b02a2641510d978de80f6f32903a
BLAKE2b-256 8d0f41e29fe605d4f2282846eb10370a8dc40fabcbadbd69006323839138d07f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page