mkaiser / Sungrow-SHx-Inverter-Modbus-Home-Assistant

Sungrow SH Integration for Home Assistant for SH3K6, SH4K6, SH5K-20, SH5K-V13, SH3K6-30, SH4K6-30, SH5K-30, SH3.RS, SH3.6RS, SH4.0RS, SH5.0RS, SH6.0RS, SH5.0RT, SH6.0RT, SH8.0RT, SH10RT, SH5.0RT-20, SH6.0RT-20, SH8.0RT-20, SH10RT-20, SH5.0RT-V112, SH6.0RT-V112, SH8.0RT-V112, SH10RT-V112, SH5.0RT-V122, SH6.0RT-V122, SH8.0RT-V122, SH10RT-V122, SH4.6R
328 stars 86 forks source link

Unknown device code #29

Closed Svanmark closed 1 year ago

Svanmark commented 1 year ago

I've previously had a working installation of this integration bit from some time ago it can't connect to the inverter (SH10RT).

07A50C84-EB4D-4E8E-B0B6-D09143DC6183

I have the latest version of the integration installed. Firmware in inverter was updated automatically on the 22nd of November. Can't figure out what version was installed.

Any help appreciated. Thanks.

mkaiser commented 1 year ago

mh, a bit clueless here... standard procedure restart all Home-assistant related stuff? After some minutes there should be values.

At least I can confirm, that there were no larger upgrades / changes in this integration. The yaml files rely on the python modbus module, which has not changed.

Can you give me a quick feedback, if the problem still exists?

dzarth commented 1 year ago

Hi, I got the same problem. Could solve it by fixing the slave config from "100" (default in the secrets.yaml) to "1", like it is mentioned in the comment. Thanks a lot for your work mkaiser!

UPDATE: I was a bit too fast with commenting, everything works fine es expected now, but the "Sungrow Device Type" is indeed "Unknown device code!" even after 45 minutes. It should be a SH10RT, too. Got it installed last week, firmware was updated to the latest when it arrived. Connected using the 2nd LAN. I'm happy to provide more debug infos.

LAST UPDATE: Your latest commit fixed the issue for me: {% elif ((states('sensor.sungrow_device_type_code') | int(default=0)) == 0x0E0F) %} SH10RT-V112

Thanks a lot again, Dirk

mkaiser commented 1 year ago

hey Dirk,

thank you for the feedback. I just set the modbus slave address default to 1 in the secrets.yaml. Hopefully that limits confusing in the future :)

@Svanmark: there is a good chance that the new version fixes that for you. Can you double check?

BR Martin