Sensry Kallisto API package
Project description
KallistoAPI Python Library
KallistoAPI is a Python library for interacting with Kallisto sensor nodes over BLE (Bluetooth Low Energy). It provides easy access to device information, time synchronization, and readings from a wide range of environmental and motion sensors.
This library is designed for developers and researchers who want to integrate Kallisto sensor data into Python applications with minimal setup.
Features
- Connect to Kallisto sensor nodes via BLE
- Read and update device time
- Access a variety of sensor modules including temperature, humidity, accelerometer, gyrometer, light, pressure, gas sensors, and more
Installation
pip install kallistoapi
Quick Start
Here’s a simple example showing how to connect to a Kallisto device, and get the accelerometer values:
from time import sleep
from kallistoapi.kallisto_manager import KallistoManager
import argparse
parser = argparse.ArgumentParser(description="Connect to a BLE device using KallistoSensorsManager")
parser.add_argument(
"-m", "--mac",
help=f"BLE MAC address"
)
args = parser.parse_args()
mac_address = args.mac
kallisto = KallistoManager()
if not kallisto.connect(mac_address):
print("Failed to connect to Kallisto")
exit(1)
modules = kallisto.discover_modules()
print("available modules")
for module in modules:
print(f" - {module}")
accelerometer0 = kallisto.get_module("accelerometer", 0)
parameters = accelerometer0.parameters()
print(f"available parameters for {accelerometer0}")
for parameter, desc in parameters.items():
print(f" - {parameter}: {desc}")
accelerometer0.configure("enable", True)
accelerometer0.configure("sample_rate", "200Hz")
accelerometer0.configure("sensitivity", "8g")
accelerometer0.apply_config()
def handle_accel(sender, data_array):
value_list = accelerometer0.decode(data_array)
print("handle_accel value_list {}".format(value_list))
accelerometer0.start_notify(handle_accel)
sleep(20)
accelerometer0.stop_notify()
kallisto.disconnect()
Available Sensor Modules
Kallisto currently supports the following sensor modules:
Motion & Orientation (IMU)
vibrationmagnetometeraccelerometergyrometer
Environmental / Air Quality
temperaturelightpressurehumidityeco2bvociaq
ADC Sensors
pt100
Device & Power
fuel_gaugetx_powerdevice_info
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kallistoapi-2.0.1.tar.gz.
File metadata
- Download URL: kallistoapi-2.0.1.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b46bb3054ab771edded1b22f75e985ff4ca24c709f79baa470c4d7c127e22c21
|
|
| MD5 |
c3b6933efc0f29a591d297db6566ba3c
|
|
| BLAKE2b-256 |
13341a699d8e2f308a6272c0d0a03cf619c9b1e2a8391a696daccf22cce7d53a
|
File details
Details for the file kallistoapi-2.0.1-py3-none-any.whl.
File metadata
- Download URL: kallistoapi-2.0.1-py3-none-any.whl
- Upload date:
- Size: 40.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f47a3652a04dfe80436fcad8e5e29a68b9e8efa29700962d37f5e6dd68c5b4bf
|
|
| MD5 |
d75675fb41aded1c97daac6237355f68
|
|
| BLAKE2b-256 |
fb6a33c27d40504cccf8e6be75158a539fd0848b63e7688add46ae5819a47e55
|