Name | wks-com JSON |
Version |
1.2.1
JSON |
| download |
home_page | None |
Summary | Communicate with your inverter (WKS EKO Circle). |
upload_time | 2024-11-02 17:12:50 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2023-2024, Mickaël 'Tiger-222' Schoentgen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
eko
inverter
rs232
serial
wks
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Python Inverter COM
[![PyPI Version](https://img.shields.io/pypi/v/wks-com.svg)](https://pypi.python.org/pypi/wks-com)
[![PyPI Status](https://img.shields.io/pypi/status/wks-com.svg)](https://pypi.python.org/pypi/wks-com)
[![PyPI Python Versions](https://img.shields.io/pypi/pyversions/wks-com.svg)](https://pypi.python.org/pypi/wks-com)
[![Tests](https://github.com/BoboTiG/python-wks-com/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/BoboTiG/python-wks-com/actions/workflows/tests.yml)
[![Github License](https://img.shields.io/github/license/BoboTiG/python-wks-com.svg)](https://github.com/BoboTiG/python-wks-com/blob/main/LICENSE)
Python module to communicate with WKS EKO Circle inverters.
## Installation
```bash
$ python -m pip install -U wks-com
```
## Module
You can use the module directly from your code:
```python
from wks_com import constants
from wks_com.inverter import Inverter
# Init the inverter (default port is /dev/ttyUSB0, several optional keyword-arguments are available)
# Example: inverter = Inverter("/dev/ttyAMA0", timeout=5.0)
inverter = Inverter()
# Send a command to the inverter
response = inverter.send("QID")
# The same command via an alias
response = inverter.send("serial-no")
# The same command using a constant
response = inverter.send(constants.CMD_SERIAL_NO)
```
## Program
The module comes with the `wks-read` program.
You can use it to send commands to inverters, and see what data you can get from.
The usage is as follows:
```bash
$ wks-read [--port SERIAL_PORT] [--debug] COMMAND_OR_ALIAS [COMMAND_OR_ALIAS...]
```
As an example, here is how to retrieve the inverter serial number:
```bash
$ wks-read QID
"96332309100452"
# The same command via an alias
$ wks-read serial-no
"96332309100452"
```
When enabling debug logs, it will likely show:
```log
$ wks-read --debug serial-no
DEBUG:wks_com.inverter:/dev/ttyUSB0 > SEND 'QIDÖê\r'
DEBUG:wks_com.inverter:/dev/ttyUSB0 > WRITTEN 6 chars (OK)
DEBUG:wks_com.inverter:/dev/ttyUSB0 < RAW b'(96332309100452?\xf3\r'
DEBUG:wks_com.inverter:/dev/ttyUSB0 < DECODED '96332309100452'
"96332309100452"
```
The default port is `/dev/ttyUSB0`, you can change that:
```log
$ wks-read --port /dev/ttyAMA0 serial-no
"96332309100452"
```
## Commands and Aliases
You can send any commands as defined in the official documentation, and even unknown commands.
There are also aliases you could use:
- `daily-load` for the `QLD` command (it will automatically fill the date using the current time);
- `daily-pv` for the `QED` command (it will automatically fill the date using the current time);
- `metrics` for the `QPGS0` command;
- `monthly-load` for the `QLM` command (it will automatically fill the date using the current time);
- `monthly-pv` for the `QEM` command (it will automatically fill the date using the current time);
- `ratings` for the `QPIRI` command;
- `serial-no` for the `QID` command;
- `status` for the `QPIGS` command;
- `time` for the `QT` command;
- `total-load` for the `QLT` command;
- `total-pv` for the `QET` command;
- `warnings` for the `QPIWS` command;
- `yearly-load` for the `QLY` command (it will automatically fill the date using the current time);
- `yearly-pv` for the `QEY` command (it will automatically fill the date using the current time);
When the inverter does not understand a command, it will respond with `NAK`.
## Development
Set up a virtual environment:
```bash
$ python -m venv venv
$ . venv/bin/activate
```
Install, or update, dependencies:
```bash
$ python -m pip install -U pip
$ python -m pip install -e '.[dev]'
```
Run tests:
```bash
$ python -Wd -m pytest --doctest-modules src
```
Run linters, and quality checkers:
```bash
$ ./checks.sh
```
Raw data
{
"_id": null,
"home_page": null,
"name": "wks-com",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Micka\u00ebl Schoentgen <contact@tiger-222.fr>",
"keywords": "eko, inverter, rs232, serial, wks",
"author": null,
"author_email": "Micka\u00ebl Schoentgen <contact@tiger-222.fr>",
"download_url": "https://files.pythonhosted.org/packages/df/bc/fbfaabb3622837bc8c9a4f11cbcc219405d5ae5f5c4d4386d677632a2632/wks_com-1.2.1.tar.gz",
"platform": null,
"description": "# Python Inverter COM\n\n[![PyPI Version](https://img.shields.io/pypi/v/wks-com.svg)](https://pypi.python.org/pypi/wks-com)\n[![PyPI Status](https://img.shields.io/pypi/status/wks-com.svg)](https://pypi.python.org/pypi/wks-com)\n[![PyPI Python Versions](https://img.shields.io/pypi/pyversions/wks-com.svg)](https://pypi.python.org/pypi/wks-com)\n[![Tests](https://github.com/BoboTiG/python-wks-com/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/BoboTiG/python-wks-com/actions/workflows/tests.yml)\n[![Github License](https://img.shields.io/github/license/BoboTiG/python-wks-com.svg)](https://github.com/BoboTiG/python-wks-com/blob/main/LICENSE)\n\nPython module to communicate with WKS EKO Circle inverters.\n\n## Installation\n\n```bash\n$ python -m pip install -U wks-com\n```\n\n## Module\n\nYou can use the module directly from your code:\n\n```python\nfrom wks_com import constants\nfrom wks_com.inverter import Inverter\n\n\n# Init the inverter (default port is /dev/ttyUSB0, several optional keyword-arguments are available)\n# Example: inverter = Inverter(\"/dev/ttyAMA0\", timeout=5.0)\ninverter = Inverter()\n\n# Send a command to the inverter\nresponse = inverter.send(\"QID\")\n\n# The same command via an alias\nresponse = inverter.send(\"serial-no\")\n\n# The same command using a constant\nresponse = inverter.send(constants.CMD_SERIAL_NO)\n```\n\n## Program\n\nThe module comes with the `wks-read` program.\nYou can use it to send commands to inverters, and see what data you can get from.\n\nThe usage is as follows:\n\n```bash\n$ wks-read [--port SERIAL_PORT] [--debug] COMMAND_OR_ALIAS [COMMAND_OR_ALIAS...]\n```\n\nAs an example, here is how to retrieve the inverter serial number:\n\n```bash\n$ wks-read QID\n\"96332309100452\"\n\n# The same command via an alias\n$ wks-read serial-no\n\"96332309100452\"\n```\n\nWhen enabling debug logs, it will likely show:\n\n```log\n$ wks-read --debug serial-no\nDEBUG:wks_com.inverter:/dev/ttyUSB0 > SEND 'QID\u00d6\u00ea\\r'\nDEBUG:wks_com.inverter:/dev/ttyUSB0 > WRITTEN 6 chars (OK)\nDEBUG:wks_com.inverter:/dev/ttyUSB0 < RAW b'(96332309100452?\\xf3\\r'\nDEBUG:wks_com.inverter:/dev/ttyUSB0 < DECODED '96332309100452'\n\"96332309100452\"\n```\n\nThe default port is `/dev/ttyUSB0`, you can change that:\n\n```log\n$ wks-read --port /dev/ttyAMA0 serial-no\n\"96332309100452\"\n```\n\n## Commands and Aliases\n\nYou can send any commands as defined in the official documentation, and even unknown commands.\n\nThere are also aliases you could use:\n\n- `daily-load` for the `QLD` command (it will automatically fill the date using the current time);\n- `daily-pv` for the `QED` command (it will automatically fill the date using the current time);\n- `metrics` for the `QPGS0` command;\n- `monthly-load` for the `QLM` command (it will automatically fill the date using the current time);\n- `monthly-pv` for the `QEM` command (it will automatically fill the date using the current time);\n- `ratings` for the `QPIRI` command;\n- `serial-no` for the `QID` command;\n- `status` for the `QPIGS` command;\n- `time` for the `QT` command;\n- `total-load` for the `QLT` command;\n- `total-pv` for the `QET` command;\n- `warnings` for the `QPIWS` command;\n- `yearly-load` for the `QLY` command (it will automatically fill the date using the current time);\n- `yearly-pv` for the `QEY` command (it will automatically fill the date using the current time);\n\nWhen the inverter does not understand a command, it will respond with `NAK`.\n\n## Development\n\nSet up a virtual environment:\n\n```bash\n$ python -m venv venv\n$ . venv/bin/activate\n```\n\nInstall, or update, dependencies:\n\n```bash\n$ python -m pip install -U pip\n$ python -m pip install -e '.[dev]'\n```\n\nRun tests:\n\n```bash\n$ python -Wd -m pytest --doctest-modules src\n```\n\nRun linters, and quality checkers:\n\n```bash\n$ ./checks.sh\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023-2024, Micka\u00ebl 'Tiger-222' Schoentgen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Communicate with your inverter (WKS EKO Circle).",
"version": "1.2.1",
"project_urls": {
"Changelog": "https://github.com/BoboTiG/python-wks-com/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/BoboTiG/python-wks-com",
"Released Versions": "https://github.com/BoboTiG/python-wks-com/releases",
"Source": "https://github.com/BoboTiG/python-wks-com",
"Sponsor": "https://github.com/sponsors/BoboTiG",
"Tracker": "https://github.com/BoboTiG/python-wks-com/issues"
},
"split_keywords": [
"eko",
" inverter",
" rs232",
" serial",
" wks"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f01ecf25c0ff24b722a4c0e6c3ff61c7c0716ea9f6b62a11d5a3210da4d31790",
"md5": "4027045e2a716c6ddfec8570a3461572",
"sha256": "7b4f19e8e390196baaacfcd7d552aa9abb8ff75fddb1c460bd919499a29e275c"
},
"downloads": -1,
"filename": "wks_com-1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4027045e2a716c6ddfec8570a3461572",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 13372,
"upload_time": "2024-11-02T17:12:48",
"upload_time_iso_8601": "2024-11-02T17:12:48.931668Z",
"url": "https://files.pythonhosted.org/packages/f0/1e/cf25c0ff24b722a4c0e6c3ff61c7c0716ea9f6b62a11d5a3210da4d31790/wks_com-1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dfbcfbfaabb3622837bc8c9a4f11cbcc219405d5ae5f5c4d4386d677632a2632",
"md5": "ec2499d0b75bad302698d0259476da5e",
"sha256": "34739d0d42745c2683f16a4edc067c1ca0cdaa687bc1345586c87bfa1be87725"
},
"downloads": -1,
"filename": "wks_com-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "ec2499d0b75bad302698d0259476da5e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 14308,
"upload_time": "2024-11-02T17:12:50",
"upload_time_iso_8601": "2024-11-02T17:12:50.949045Z",
"url": "https://files.pythonhosted.org/packages/df/bc/fbfaabb3622837bc8c9a4f11cbcc219405d5ae5f5c4d4386d677632a2632/wks_com-1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-02 17:12:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BoboTiG",
"github_project": "python-wks-com",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "wks-com"
}