InoDrive API Library
Project description
Installation
Install and Update package via pip
pip install CK-InoDrive-API
Usage
Importing Library
# Import InoDrive API library
import CkInoDriveAPI
Create InoDrive Object using WebSocket
# Create instance to InoDrive module object
# Connect by Name
Drive = CkInoDriveAPI.InoDrive(target='Name')
# Connect by Serial Number
Drive = CkInoDriveAPI.InoDrive(target='SN')
# Connect by IP Address
Drive = CkInoDriveAPI.InoDrive(target='IPv4 Address')
# Auto connect
Drive = CkInoDriveAPI.InoDrive(target='IPv4 Address', autoConnect=True)
Read and Write Variable's
# Connect to the drive
Drive.connect()
# Read variable with name 'VariableName'
Drive.UserApp.read_var('VariableName')
# Write variable with name 'VariableName' and value equal to 1
Drive.UserApp.write_var('VariableName', 1)
# Disconnect from the drive
Drive.disconnect()
# Drive object cleanup
Drive.dispose()
Get and Set Output's
# Connect to the drive
Drive.connect()
# Read Output 2
state = Drive.IO.get_output(2)
# Take control of InoDrive module to override output state
Drive.SysControl.take_control(True)
# Set Output 2 to On state
Drive.IO.set_output(2, True)
state = Drive.IO.get_output(2)
# Disable module override
Drive.SysControl.take_control(False)
# Disconnect from the drive
Drive.disconnect()
# Drive object cleanup
Drive.dispose()
Change Module Name (Power cycle InoDrive for changes to take effect)
# Connect to the drive
Drive.connect()
# Read module configuration file
config_file = Drive.File.read_module_config()
# Set new module name
config_file['name'] = "NewName"
# Write configuration changes out
Drive.File.write_module_config(config_file)
# Disconnect from the drive
Drive.disconnect()
# Drive object cleanup
Drive.dispose()
Links
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
ck_inodrive_api-1.0.0.tar.gz
(46.2 kB
view details)
Built Distribution
File details
Details for the file ck_inodrive_api-1.0.0.tar.gz
.
File metadata
- Download URL: ck_inodrive_api-1.0.0.tar.gz
- Upload date:
- Size: 46.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c153d4b4cdf8416c4c6a73d848c3bbdd74af712cb40a793dac0ded77e5577793 |
|
MD5 | 8a71d017d54282aa18d4a373fcd1e939 |
|
BLAKE2b-256 | aefd092b1db439b7e6968c3470ec682744de5f222e1f1c404e3a1b2a5de9fd62 |
File details
Details for the file CK_InoDrive_API-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: CK_InoDrive_API-1.0.0-py3-none-any.whl
- Upload date:
- Size: 49.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04fb6d0e7c354b57bd40f03a2997bb141969f775db3c29268be9604f7e120831 |
|
MD5 | 624a301b780c447621f7b3a69a04fd91 |
|
BLAKE2b-256 | 57a2fcf5d437cbfa26953aa588f0559ae3ad766fec0c1e6f48898d0c0923cdb0 |