# GoodWe
[![PyPi](https://img.shields.io/pypi/v/goodwe.svg)](https://pypi.python.org/pypi/goodwe/)
[![Python Versions](https://img.shields.io/pypi/pyversions/goodwe.svg)](https://github.com/marcelblijleven/goodwe/)
[![Build Status](https://github.com/marcelblijleven/goodwe/actions/workflows/publish.yaml/badge.svg)](https://github.com/marcelblijleven/goodwe/actions/workflows/publish.yaml)
![License](https://img.shields.io/github/license/marcelblijleven/goodwe.svg)
Library for connecting to GoodWe inverter over local network and retrieving runtime sensor values and configuration parameters.
It has been reported to work on GoodWe ET, EH, BT, BH, ES, EM, DT, MS, D-NS, XS and BP families of inverters.
It may work on other inverters as well, as long as they listen on UDP port 8899 and respond to one of supported communication protocols.
(If you can't communicate with the inverter despite your model is listed above, it is possible you have old ARM firmware version.
You should ask manufacturer support to upgrade your ARM firmware (not just inverter firmware) to be able to communicate with the inveter via UDP.)
## Usage
1. Install this package `pip install goodwe`
2. Write down your GoodWe inverter's IP address (or invoke `goodwe.search_inverters()`)
3. Connect to inverter and read all runtime data, example below
```python
import asyncio
import goodwe
async def get_runtime_data():
ip_address = '192.168.1.14'
inverter = await goodwe.connect(ip_address)
runtime_data = await inverter.read_runtime_data()
for sensor in inverter.sensors():
if sensor.id_ in runtime_data:
print(f"{sensor.id_}: \t\t {sensor.name} = {runtime_data[sensor.id_]} {sensor.unit}")
asyncio.run(get_runtime_data())
```
or the old way (for XS inverters only), create a processor and inverter instance:
```python
import asyncio
from goodwe import GoodWeInverter, GoodWeXSProcessor
async def get_data():
ip_address = '192.168.200.100'
processor = GoodWeXSProcessor()
inverter = GoodWeInverter(inverter_address=(ip_address, 8899), processor=processor)
data = await inverter.request_data()
print(f'power is {data.power} at {data.date:%H:%M:%S}')
asyncio.run(get_data())
```
## References and useful links
- https://github.com/mletenay/home-assistant-goodwe-inverter
- https://github.com/yasko-pv/modbus-log
- https://github.com/tkubec/GoodWe
- https://github.com/OpenEMS/openems
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共33个文件
py:24个
txt:3个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:goodwe-0.2.8.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
goodwe-0.2.8.tar.gz (33个子文件)
goodwe-0.2.8
PKG-INFO 3KB
pyproject.toml 94B
goodwe
const.py 6KB
xs.py 2KB
inverter.py 8KB
goodwe.py 840B
sensor.py 11KB
processor.py 1KB
modbus.py 3KB
__init__.py 5KB
es.py 11KB
dt.py 10KB
protocol.py 9KB
et.py 19KB
exceptions.py 835B
tests
inverter_scan.py 2KB
test_goodwe.py 245B
test_es.py 19KB
test_sensor.py 3KB
test_processor.py 1KB
inverter_check.py 2KB
__init__.py 0B
test_dt.py 17KB
test_protocol.py 4KB
test_modbus.py 2KB
test_et.py 16KB
LICENSE 1KB
setup.cfg 936B
goodwe.egg-info
PKG-INFO 3KB
SOURCES.txt 605B
top_level.txt 13B
dependency_links.txt 1B
README.md 2KB
共 33 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功