library for making modbus connections to NRG Systems devices.
Project description
'''nrgmodbus''' is a Python package for making modbus connections to NRG devices.
Installation:
# from the directory containing this README file:
pip install -e .
Examples:
Single polling:
In [1]: from nrgmodbus.nrgmodbus import ipackaccess
In [2]: poller = ipackaccess(ip='192.168.178.168')
In [3]: poller.connect()
Connecting to 192.168.178.168... [OK]
In [4]: poller.return_diag_readings()
In [5]: poller.diag_12v_bat
Out[5]: 14.09000015258789
In [6]: poller.diag_temp
Out[6]: 22.739999771118164
In [7]: poller.return_rt_data_readings()
In [8]: poller.rt_ch1
Out[8]: 0.2101999968290329
Automatic polling:
In [1]: from nrgmodbus.nrgmodbus import ipackaccess
In [2]: poller = ipackaccess(ip='192.168.178.168', connect=True)
Connecting to 192.168.178.168... [OK]
In [3]: poller.poll(interval=4, echo=True)
1 2019-5-24 1:23:7 0.2101999968290329 0.05000000074505806
2 2019-5-24 1:23:11 0.2101999968290329 0.05000000074505806
3 2019-5-24 1:23:15 0.2101999968290329 0.05000000074505806
...
37 2019-5-24 1:25:31 0.2101999968290329 0.05000000074505806
38 2019-5-24 1:25:35 0.2101999968290329 0.05000000074505806
39 2019-5-24 1:25:39 0.2101999968290329 0.05000000074505806
40 2019-5-24 1:25:43 0.2101999968290329 0.03999999910593033
41 2019-5-24 1:25:47 0.2101999968290329 0.03999999910593033
42 2019-5-24 1:25:51 0.2101999968290329 0.05000000074505806
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for nrgmodbus-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1710d985fb36e02bc18dc20b2c36d5c44788a60faa7a215735e0607d783a6e23 |
|
MD5 | f0e18e4b8a2286edbcd08021c183c8d7 |
|
BLAKE2b-256 | 5f35633630e6db678c2d7aa653d77cc48978aed99f524ddb2a57623af6ee68ca |