Metadata-Version: 2.1
Name: sunspecdemo
Version: 0.1.9990
Summary: EPC SunSpec demonstration tool
License: MIT
Author: Alex Anker
Author-email: alex.anker@epcpower.com
Requires-Python: ==3.7.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Dist: attrs (>=19.3.0)
Requires-Dist: click (>=7.0,<8.0)
Requires-Dist: importlib (>=1.0.4,<2.0.0)
Requires-Dist: importlib-metadata (>=4.10.1,<5.0.0)
Requires-Dist: pyserial (==3.4)
Requires-Dist: pysunspec (==2.0.0)
Requires-Dist: setuptools (>=53.0.0)
Requires-Dist: toml (>=0.10.2,<0.11.0)
Requires-Dist: toolz (==0.9.0)
Requires-Dist: tqdm (==4.32.1)
Requires-Dist: typing-extensions (>=4.0.1,<5.0.0)
Description-Content-Type: text/x-rst

================
EPC SunSpec Demo
================

.. image:: https://img.shields.io/github/workflow/status/epcpower/sunspec-demo/CI/main?color=seagreen&logo=GitHub-Actions&logoColor=whitesmoke
   :alt: tests on GitHub Actions
   :target: https://github.com/epcpower/sunspec-demo/actions?query=branch%3Amain

.. image:: https://img.shields.io/github/last-commit/epcpower/sunspec-demo/main.svg
   :alt: source on GitHub
   :target: https://github.com/epcpower/sunspec-demo

The EPC SunSpec demo implements basic SunSpec communications with EPC converters.
SunSpec is built on Modbus and works with both Modbus RTU (direct serial) and Modbus TCP connections.
Additionally this program acts as a basic example of using the `pysunspec`_ Python library.

.. _pysunspec: https://github.com/sunspec/pysunspec


------------
Installation
------------

The ``poetry`` & ``poetry-dynamic-versioning`` packages must be installed.

::

    pip install poetry
    pip install poetry-dynamic-versioning

Windows & Linux
===============

::

    poetry install
    poetry run sunspecdemo get-models


-------
Running
-------

A list of commands and options will be reported if ``--help`` is passed.
This can be done at any layer in the tree of subcommands.
When options provide defaults they will be listed in the help output.


``get-models``
==============

``get-models`` will download the EPC custom models needed for our specific features.


``list-ports``
==============

As an aid to selecting the proper serial port this subcommand will report a list of those available.
In some cases extra identifying information may be provided as well.


``scan``
========

Scan for responding nodes in a given node ID range.
Provides both direct ``serial`` and ``tcp`` subcommands


``gridtied``, ``dcdc``
=========================

Converters can be run over either Modbus RTU or Modbus TCP.
A subcommand is provided for each: ``serial`` and ``tcp``.
When running a fully selected command a basic demo sequence will be run to confirm communication with the device.


``serial``
----------

For a Modbus RTU connection to the converter.
At a minimum the serial port connected to the converter must be specified.


``tcp``
-------

For a Modbus TCP connection to the converter.
At a minimum the IP address or hostname of the converter must be specified.

