Skip to main content

library for making modbus connections to NRG Systems devices.

Project description

NRGPy

'''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


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

nrgmodbus-0.1.5-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page