Code Monkey home page Code Monkey logo

sungrowinverter's People

Contributors

caliph9k avatar carstennz avatar lapplandscohan avatar mvandersteen avatar octofinger avatar ortogonal avatar tinywiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sungrowinverter's Issues

SG15RT

Hi and thanks for your impressive work!

I'm about to receive a SG15RT string inverter myself in a few weeks. Can you confirm your script works with it? I know you listed it as supported, but I read elsewhere that Modbus TCP does currently not work on string inverters, only on the hybrid ones. Thank you.

Missing and broken dependencies

Tried installing on python 3.10.5. This failed due to:

  • pyserial-asyncio is not listed as a requirement
  • pymodbus is installed in version 3.0.0 but it seems an older version is required

This fixed it for me:

pip install pyserial-asyncio
pip install pymodbus==2.4.0

It would probably best to update requirements.txt to list the missing package and pin the pymodbus package to the desired older version.

Sungrow parallel TCP & RTU

Hello there, has anyone tried running both the Modbus RTU & Modbus TCP from Sungrow's RS-485 & Ethernet port respectively, simultaneously?

Will it interfere with each other?

SG2.5RS-S timeout on 'self._send(GET_KEY)'

My SunGrow SG2.5RS-S inverter times out on 'self._send(GET_KEY)'. After (the default 60s) timeout the communication proceeds without encryption and returns valid values. When commenting out 'self._send(GET_KEY)' the communication completes very quickly, without timeout.
I think this problem affects all SGxxRS models (type codes 0x2600-0x2607) and possibly others.
A possible (very ugly) workaround is to decrease the timeout value, but I do not really want to do this.

@jarod1990-Developper: Could you please confirm if you have the same timeout problem with your SG2.0RS-S inverter?
@mvandersteen: Please look into the problem and provide a solution! Thanks!

import error

I would like to get data out of my inverter but I seem unable to import the SungrowInverter library.
pip3 successfully installed both SungrowModbusTcpClient-0.1.6 and SungrowInverter-0.1.7 but when I try to import the module I get a TypeError that I am unable to figure out the reason for.

`PI:~# python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

from sungrowinverter import SungrowInverter
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.7/dist-packages/sungrowinverter/init.py", line 4, in
from sungrowinverter.SungrowInverter import SungrowInverter
File "/usr/local/lib/python3.7/dist-packages/sungrowinverter/SungrowInverter.py", line 16, in
from sungrowinverter.configs.inverter import (
File "/usr/local/lib/python3.7/dist-packages/sungrowinverter/configs/inverter.py", line 21, in
ModBusRegister(5001, "nominal_output_power", "U16", 0.1, KILO_WATT),
TypeError: 'type' object is not subscriptable
`

pymodbus.exceptions.ConnectionException: Connection unexpectedly closed

If I loop the test.py file with 10 seconds of sleep after each cycle 4 out of 5 times I get the error:
"pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] ModbusTcpClient(192.168.10.28:502): Connection unexpectedly closed 3.814697265625e-05 seconds into read of 8 bytes without response from slave before it closed connection"
and the 5th time it reads the data perfect.

python version 3.9.2
pymodbus version 3.4.1
code test.py file:

_#!/usr/local/bin/python3
import asyncio
import logging
import time

from sungrowinverter import SungrowInverter

logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)

# Change IP Address (192.168.4.2) to suit your inverter 
client = SungrowInverter("192.168.10.28", timeout=5)

while True:
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    result = loop.run_until_complete(client.async_update())

    #Get a list data returned from the inverter.
    if result:
        print(client.data)
    else:
        print("Could not connect to inverter")
    
    time.sleep(10)_

Has anyone encountered this issue?

Sungrow Device Model: SG5K-D

Greetings

I have a Sungrow Device Model: SG5K-D with a Wifi V31 dongle on it. When trying the test.py, I get this error.

ERROR:UPSUPPORT INVERTER: Supported inverter device_type_code [294] is not supported

I see that someone has a fix for this with a HA docker but I haven't implemented it yet.

Regards

Stephen

it's not a bug ! Thanks a lot.

Thanks a lot for this work. If you want you can add this inverter :
SungrowInverterModel(0x2600,'SG2.0RS-S','string',2),
this perfectly run on windows with python3.11.

However, on my raspberry Pi (same version of python), have this issue :
image

in red, the different with windows : "Using proactor "IocProactor"

Any ideas ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.