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
310 stars 80 forks source link

Update modbus_sungrow.yaml #114

Closed dst6se closed 1 year ago

dst6se commented 1 year ago

Added export controll

mkaiser commented 1 year ago

nice!

Will check and test this in a couple of days and integrate it. First look on the phone was very promising :)

mkaiser commented 1 year ago

works good for me!

Did some renaming to be more consistent with the rest of the code.

I was a bit suprised, that I could not find a register to readback the current "export power limit"

Added some registers for testing I found in the specs. Do they work for you (I have the SH10.RT)

image

dst6se commented 1 year ago

works good for me!

Did some renaming to be more consistent with the rest of the code.

I was a bit suprised, that I could not find a register to readback the current "export power limit"

Added some registers for testing I found in the specs. Do they work for you (I have the SH10.RT)

image

The readback for the set vaule is

  - name: Max export
    unique_id: sg_max_export
    slave: !secret sungrow_modbus_slave
    address: 13073 # reg 13074

your reg 5622,23 is the max min limit for your inverter

Screenshot 2023-06-20 at 16 46 48
dst6se commented 1 year ago

12eaf2c

I thing you broke something with the commit 12eaf2c

There is a lot of changes that does not make sense

both of the ID , you have mixed up something with battery EMS mode ,changes some register

and that part does not have the name as you entered after renaming

both the autoations ,etc , maybe something went wrong with your commit

Thanks

Danne

Edit:

Seems to be some problem with the sensor.sg_export_power_limit and sensor.sg_export_power_limit_mode_raw

when i renamed those two sensors in the yaml to new names , they never appears in HA , have to trubleshoot that

mkaiser commented 1 year ago

sorry, I messed up some stuff... need more time and a fresh head (and sun) tomorrow

{% if ((states('sensor.export_power_limit_mode_raw') | int(default=0)) == 0x00AA) %} what do you mean with this? Could you link to code lines?

hmm the automations worked fine for me. Only thing currently not working is the readback of the current set "export power limit". When using the slider the exported power adapts accordingly.

What inverter model are you using?

Please make sure to make a good HA restart. The yaml reload does not work well with changed uids

dst6se commented 1 year ago

sorry, I messed up some stuff... need more time and a fresh head (and sun) tomorrow

{% if ((states('sensor.export_power_limit_mode_raw') | int(default=0)) == 0x00AA) %} what do you mean with this? Could you link to code lines?

hmm the automations worked fine for me. Only thing currently not working is the readback of the current set "export power limit". When using the slider the exported power adapts accordingly.

What inverter model are you using?

Please make sure to make a good HA restart. The yaml reload does not work well with changed uids

Hi , i have a SH10RT-V112 , the best way to check if the automation works is to change the feed in limit parameters in the isolar(web) , and see if hass update the value for you ! It works for me , but the strange thing is if I change the entity name the sensor with the new name never appear , have to check more on that. I have been quite busy on work this week , I should check some more this weekend !

mkaiser commented 1 year ago

hmm okay, will give the inverter some internet access and check for newer firmware updates first. Then try to check via isolarcloud (I hoped to never use it, again...)

@all:

Someone there with an SH10.RT (first version) who can confirm if "Max Export" is updated when using the slider?

mkaiser commented 1 year ago

Upgraded the firmware and now I can set the new export limits via isolarcloud and also readback settings I did with HA.

So the issue was clearly on my side!

Will give it more testing and will PR your changes, soon!

the strange thing is if I change the entity name the sensor with the new name never appear

I assume that this is related to my changing of unique ids. Can you check under "developer tools" --> "Statistics", if there is something wrong with some entities?

dst6se commented 1 year ago

Upgraded the firmware and now I can set the new export limits via isolarcloud and also readback settings I did with HA.

So the issue was clearly on my side!

Will give it more testing and will PR your changes, soon!

the strange thing is if I change the entity name the sensor with the new name never appear

I assume that this is related to my changing of unique ids. Can you check under "developer tools" --> "Statistics", if there is something wrong with some entities?

Nice ! I removed all my old entities and after that it seams to work as it should. I fixed the update of slider for power limit in my last commit

EDIT: deleted my last commit , something was wrong with my sensors ! !

Thanks

Danne

dst6se commented 1 year ago

Sorry for all the messy commits, Im not so used to git , when i tried to remove my last commit i delete the file , so i went back to your last commit !

mkaiser commented 1 year ago

no worries, git confuses me all the time, too :)

just append the new files. Will do a squash commit (so only one commit to the main repo)

mkaiser commented 1 year ago

merged - thanks again for implementing the new feature :)

dst6se commented 1 year ago

Big thanks to you for a very neat integration to hass !! 

Thanks

Danne

From: mkaiser @.> To: mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant @.> Cc: dst6se @.>, State change @.> Sent: 2023-07-05 16:08 Subject: Re: [mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant] Update modbus_sungrow.yaml (PR #114)

merged - thanks again for implementing the new feature :) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>