Easy work with modbus device. You do not need to know the protocol.
Project description
#aio modbus client
The main purpose is to create classes of devices connected via modbus by describing their properties.
Not intended to transfer bytes to modbus.
The library allows you to organize work with devices connected to a TCP modbus server, and a serial port. It also assumes the possibility of having devices operating at different speeds and different connection parameters on the bus.
##Use
- Create your class inheriting from ModbusDevice. It is important to specify the static variable file in your class file = file
- Create a JSON file with the description of the registers of your device
- To access the device, use an instance of your class and the package API.
see example: example / Wirenboard / TestWirenBoardDimmer.py
if someone likes the implementation, I will add documentation
##async API
read_param(param_id) - gets device property value
write_param(param_id, value) - writes the value to the property of the device
is_device() - should return true if the device at the current address can be served by this class
find_devices() - returns the list of addresses of these devices. The function calls is_device for each modbus address.
##Licensing
This published under the MIT License, see LICENSE for details.
Copyright (c) 2019 Mikhail Razgovorov
Project details
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 aio_modbus_client-0.0.4.tar.gz
.
File metadata
- Download URL: aio_modbus_client-0.0.4.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9158911d97415cd35594e9f6b58fa17567e3590180fc6cc231ddc13ce46626d7 |
|
MD5 | 4dab64dae8f850acc92e4120283186b7 |
|
BLAKE2b-256 | c0e3ae924a5410c91e9b6f298d9f5abaa223c3723f65bf9370cccbc94b0da7fe |
File details
Details for the file aio_modbus_client-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: aio_modbus_client-0.0.4-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c45e950474dbdde6e573870057b0192c4525e1c2248d35819b94dd8d15290de8 |
|
MD5 | 4f0489ac72363d9130a19b642ee0c34a |
|
BLAKE2b-256 | c2ff4e223c21982dbd9074cbd2bb1a20da1cfac27f972579ccdaeaf4545955f6 |