与solaredge逆变器本地通信的api包装器

solaredge-local的Python项目详细描述


本地日光浴

如果这个respository的目标是提供关于在一些太阳能边缘逆变器上使用本地api的信息。这是基于我的观察的WIP,可能包含不准确的地方。鼓励拉取请求或问题更正任何错误或添加其他信息。

相关型号

本地API可在sexxxxh US模型(带setapp)以及欧洲三相逆变器sexk-xxxtxbxx4模型(带setapp)上获得。s://www.solaredge.com/sites/default/files/se-three-phase-inverter-setapp-ds.pdf" rel="nofollow">se3k-e10k,se12.5k-se27.6kse33.3k。 请仔细检查数据表,如果在"附加功能"一节的"逆变器调试"小节中出现以下行"使用内置Wi-Fi接入点进行本地连接的setapp移动应用程序"。

有关seeapp的更多信息,请参见此处的。这些型号没有LED屏幕,仅在调试期间通过手机应用程序提供。 有关更多信息,请查看setapp faq。 为了方便起见,此处报告一个问题和解答:

< Buff行情>

问:新的应用程序能否用于已经安装的逆变器?

A:只有带有新通信板(无显示器)的Solaredge逆变器才能通过SETAPP激活或配置。

据报道,这些新型逆变器的CPU编号从04开始。

您可以通过查找逆变器的IP地址并在浏览器中访问它来进行检查。如果它支持本地api,您将看到solaredge徽标和"调试"菜单。

如果您没有可用的本地API,请参阅此存储库作为替代方案。

使用python包装器

为了方便起见,提供了一个python api包装器,即solaredge_local。仅支持Python3

要安装:pip install solaredge local

使用:

from solaredge_local import SolarEdge
client = SolarEdge("http://<inverter ip address>")
client.get_status()  # Provides general energy and other overview information
client.get_maintenance() # Provides optimizer level information and other details
client.get_information() # Provides software versions and error log list.
client.get_power_control() # Provides power control information and other details.

API端点

  • app configs:"web/v1/app_configs"
  • 区域:"web/v1/region"
  • 地区/国家:"Web/v1/地区/国家"
  • 地区语言:"web/v1/region/language"
  • 配对:"web/v1/pairing"
  • 配对请求:"web/v1/pairing/request"
  • 通信:"web/v1/communication"
  • 通信服务器:"web/v1/communication/server"
  • 通信局域网:"web/v1/communication/lan"
  • 通信rs485_slave detect:"web/v1/communication/rs485/<;id>;/从机检测"
  • 通信rs485协议:"web/v1/communication/rs485/<;id>;/协议"
  • 通信设备ID:"web/v1/communication/rs485/<;id>;/设备ID"
  • 通信RS485"网络/v1/communication/rs485/<;id>;/modbus"
  • 通信RS485_modbus_add device:"web/v1/communication/rs485/<;id>;/modbus/add_device"
  • 通讯设备:"web/v1/communication/rs485/<;id>;/通讯设备"
  • 通信无线:"网络/v1/通信/wifi"
  • 通信WiFi WPS:"Web/v1/communication/WiFi/WPS"
  • 通信WiFi连接:"Web/v1/communication/WiFi/connect"
  • 通信蜂窝:"web/v1/communication/cellular"
  • communication_zigbee_默认值:"web/v1/communic字符串/zigbee/defaults
  • communication \ \ uzigbee \ \ fs20模块配置:
  • web/v1/communication/zigbee/module \ \ uconfigs
  • communication \ \ op mode:
  • communication \ \ upri:"Web/v1/communication/gpio/pri"
  • communication=modbus tcp:"web/v1/communication/modbus=tcp"
  • PowerControl:"Web/V1/Power&U Control"
  • PowerControl=U GridControl:"Web/V1/Power&U Control/GRID&U Control"
  • PowerControl=U Energymanager=U LimitControl:"Web/V1/Power=U Control/Energy=U Manager/Limit=U Control"
  • PowerControl \ \ EnergyManager \ \ Energycontrol:"Web/V1/Power \ \ U Control/Energy/Energy/Manager/Energy \ \ U Control"
  • PowerControl=U Energymanager=U StorageControl:"Web/V1/Power=U Control/Energy=U Manager/Storage=U Control"
  • PowerControl=U ReactivePower:"Web/V1/Power=U Control/Reactive=U Power"
  • PowerControl=U ActivePower:"Web/V1/Power=U Control/Active=Power"
  • PowerControl \ \ wakeup:"Web/V1/Power \ \ U Control/Wakeup"
  • PowerControl \ \ advanced:"Web/V1/Power \ \ U Control/Advanced"
  • PowerControl=Reset:"Web/V1/Power=U Control/Reset"
  • PowerControl=URRCR:"Web/V1/Power=URRCR"
  • 维护:"Web/V1/维护"
  • maintenance \ \ date time:"Web/V1/maintenance/date \ \ time"
  • 维修\ \ reset counters:"Web/V1/maintenance/reset \ \ n counters" 维修\ \ reset factory:"Web/v1/maintenance/reset \ \ factory" 维修\ AFIC:"Web/V1/Maintenance/AFIC"
  • maintenance \ afci test:"web/v1/maintenance/afci/test"
  • 维护\ \ inverters \ \ self test:"Web/v1/maintenance/inverters/</position>/self \ \ test"
  • 维修\ \ standby:"Web/V1/Maintenance/Standby"
  • 维护\ \ gridprotectionLogin:"Web/V1/Maintenance/GRID \ \ fs12/Login"
  • 维修\ \ grid protection:web/v1/maintenance/grid \ \ fn保护 维修\ \ ugradeusb:"Web/v1/maintenance/fw \ \ ugrade/usb"
  • Information:"Web/V1/Information"
  • status:"Web/V1/status"
  • status \ \ servercommeste:"Web/V1/status/server \ \ comm \ \ test"

The status endipoint appears to the most useful used for realtime production data. 优化水平数据可从维护API Endpoint中检索。

using the api

all endpoints I have explored so far appear to be a get,and responses useProtocol buffersview raw response

you can see the raw data doing the following(assuming you have the protocal buffers cli tool installed)

ααα2

many numbers appear to be 32 bit floating point.

The protocol definitions required to parse the responses are available in Javascript if you choose"view source"in the developer tools of your browser.

view parsed response

if there is a correspondingfile inmessage \ \ typesyou can see the parsed response from the API.每个原始文件对应于API Endpoint的名称。这些是非常宽广的,而且可能是不完整的。这些可以通过选择"视图源"在您浏览器的开发工具中创建,并搜索文本如proto.web \ \ status.<.Apinameincamelcase>>toobject

here is an example for the status API:

ααα3 更新协议缓冲器响应

to add or change the Protocol缓冲器defintions,please do the following

  1. manually change themessage&types/*protofiles as required

    .
  2. test the file usingcurlas described inview parsed response

  3. update the generated*\ \ pb2.pyfiles for each file changed by running a command like:

    ααα4
  4. commit the generated updates

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用MVC设计模式观察嵌套对象   java将多个客户端连接到服务器   合并Java Web应用程序   Spring Security中未捕获java AuthenticationSuccessEvent   java Firebase JSON到Arraylist内部的Arraylist,存在对象问题   在Java15的sealedclasses特性中,final类和非密封类之间有什么区别?   java我可以使用数组。copyOf制作二维数组的防御副本?   java球不会在屏幕上移动   Java类如何在同一个文件中包含两个类?   java使用“Character.isWhiteSpace”删除所有空白   java阻止在RealmList中保存时创建领域对象   如何仅在ConnectionFactory上使用Java JMS身份验证   spring可以强制java对象在运行时实现接口吗?   socket无法在JAVA中使用TCP启用双工模式通信