IMPLib2: Python implementation of the IMPBUS-2 protocol.
========================================================
.. image:: https://img.shields.io/pypi/v/implib2.svg
:target: https://pypi.python.org/pypi/implib2
.. image:: https://img.shields.io/pypi/pyversions/implib2.svg
:target: https://pypi.python.org/pypi/implib2
.. image:: https://img.shields.io/pypi/l/implib2.svg
:target: https://pypi.python.org/pypi/implib2
.. image:: https://travis-ci.org/mhubig/implib2.svg?branch=master
:target: https://travis-ci.org/mhubig/implib2
.. image:: https://codecov.io/gh/mhubig/implib2/coverage.svg?branch=master
:target: https://codecov.io/gh/mhubig/implib2/branch/master
---------------
Requirements
------------
Before you can start using the IMPLib2 software you have to make sure,
that you have at least the following software packages installed.
- Python (http://python.org)
- PySerial (http://pyserial.sourceforge.net)
For instructions on how to get and install these packages on your OS
please head over to the official project pages.
Installation
------------
Install the stable branch using pip::
pip install implib2
Of if you brave enough::
pip install git+https://github.com/mhubig/implib2.git@develop
Depending on your system you may have to prefix these commands with ``sudo``!
Quick Start Manual
------------------
This small quick start manual is intended to give you a basic example of
how to use this library. In order to start playing with it you have to
connect at least one `Trime
Pico <http://imko.de/en/products/soilmoisture>`__ moisture measurement
probe to your computer. An easy way to connect the probe is by using the
USB-IMPBus Converter `SM-USB <http://imko.de/en/products>`__.
After successfully installing IMPLib2 and connecting, start the Python
Shell within your terminal::
$ python
Python 3.6.2 (default, Jul 17 2017, 16:44:45)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Import the IMPLib2 module::
>>> import implib2
Now initialize the IMPBus, sync and scan for connected Modules. Replace
the USB Interface with the one your SM-USB uses::
>>> bus = implib2.Bus('/dev/ttyUSB0')
>>> bus.sync()
>>> bus.scan()
(10010, 10011)
As you can see we found two connected modules with the serial numbers
10010 and 10011. Now we can instantiate the module objects::
>>> mod10 = implib2.Module(bus, 10010)
>>> mod11 = implib2.Module(bus, 10011)
Using the handy module objects we can now perform various higher
operations, like doing a measurement or requesting the serial number::
>>> mod10.get_moisture()
14.3
>>> mod11.get_moisture()
17.4
>>> mod10.get_serno()
10010
10011
If you came so far you should be able to easily build a little script
which performs an measurement on all connected probes ones an hour::
#!/usr/bin/env python
import time
import implib2
# Initialize the IMPBus2
bus = implib2.Bus('/dev/ttyUSB0')
bus.sync()
# Search the bus for connected modules
modules = [implib2.Module(bus, serno) for serno in bus.scan()]
# Start a measurement and show the results once an hour
while True:
for module in modules:
serno = module.get_serno()
moist = module.get_moisture()
temp = module.get_measure(quantity='MeasTemp')
print('Module {}: Moist {}, Temp {}'.format(serno, moist, mtemp))
time.sleep(3600) # for one hour
For more and in depth information please head over to the API-Documentation on
`Read the Docs <https://implib2.readthedocs.org>`__.
.. include:: LICENSE.txt
:literal:
Metadata
Release files for IMPLib2 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| implib2-1.0.1.tar.gz | 46.7 kB | Without provenance | Details for implib2-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| implib2-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for implib2-1.0.1-py3-none-any.whl |
Total release size: 72.9 kB
Release files / implib2-1.0.1.tar.gz
| Download URL | implib2-1.0.1.tar.gz |
|---|---|
| Size | 46.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
950205b923809fe56cf0945affa3228041e113cc179b4402fe65de1d8baf9d6e
|
|
BLAKE2b-256 checksum How to use checksums |
28dbd663beb02c5e324c6aea58235372e64c72efc0b3d7da96a6f6f65104ebf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / implib2-1.0.1-py3-none-any.whl
| Download URL | implib2-1.0.1-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cdd3c83d6d7405a0a4b158a362cf0a1e0e472538286d78945ca3157d0c6de51b
|
|
BLAKE2b-256 checksum How to use checksums |
a4f430d6ed202fb094dc3508754e2fd80b465db0638c3239d1b8a2a59f3f7d1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for IMPLib2 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.