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

Turn on Load Relay (DO relay) #80

Open Kawobei opened 1 year ago

Kawobei commented 1 year ago

Hi, I do not understand something from the documentation. Both addresses for Total PV generation 13002 and Load Adjustment 13002 10 Load 1 adjustment mode 13002 U16 0: Timing mode; 1: ON/OFF mode; 2: Power optimized mode

How can I add this as a switch? I have my hot water hooked up but I would like more complex automation rules than the inverter allows. Regards, Brenton

Louisbertelsmann commented 1 year ago

Should still work. Those are different types. If you look at "Inverter start stop" and "System state" it's the same thing.

Kawobei commented 1 year ago

You are correct, I got it working last night (very happy) my guess was the holding ones are different even though same numbers. Not sure if you want the code? I dont know how do pull/push stuff.

Louisbertelsmann commented 1 year ago

You can Post it here. Maybe someone will also find it useful. I might Do a pullrequest.

Kawobei commented 1 year ago

Home Assistant Sungrow inverter integration

https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant

by Martin Kaiser

last update: 2023-03-24

modbus:

'virtual' template sensors for better readability

template:

getting input for Min and Max SoC

input_number: set_sg_min_soc: name: Set min SoC min: 0 max: 50 step: 1

set_sg_max_soc: name: Set max SoC min: 50 max: 100 step: 1

set_sg_reserved_soc_for_backup: name: Set reserved SoC for backup min: 0 max: 75 step: 1

set_sg_forced_charge_discharge_power: name: Set forced charge discharge power in W min: 0 max: 5000 step: 100

set_sg_battery_max_charge_power: name: Set max battery charge power in W min: 100 max: 5000 step: 100

set_sg_battery_max_discharge_power: name: Set max battery discharge power in W

initial: 40

min: 100
max: 5000
step: 100

set_sg_battery_charging_start_power: name: Set battery charging start power in W min: 0 max: 1000 step: 10

set_sg_battery_discharging_start_power: name: Set battery discharging start power in W min: 0 max: 1000 step: 10

input_select: set_sg_start_stop_mode: name: Inverter mode options:

Automations: Write modbus registers on input changes via GUI

note: If you change a value by the sliders, it will take up to 60 seconds until the state variables are updated

Unfortunately, I could not find a way to "force update" modbus registers, yet...

automation:

Louisbertelsmann commented 1 year ago

Would you mind checking this for me, since I don't have anything connected to my DO relay? just copy the content of modbus_sungrow.yaml

Kawobei commented 1 year ago

OFFICIAL

I did try today and it didn’t work. I am in the process of trying to identify which line is the issue. Looking at the changes in a compare I don’t really see what is the problem. I’ll spend some more time over the weekend.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Louis @.> Sent: Friday, March 31, 2023 5:37:48 AM To: mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant @.> Cc: Brenton Arnold @.>; Author @.> Subject: EXTERNAL: Re: [mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant] Turn on Load Relay (DO relay) (Issue #80)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Would you mind checking this for me, since I don't have anything connected to my DO relay? just copy the content of modbus_sungrow.yamlhttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FLouis712%2FSungrow-SHx-Inverter-Modbus-Home-Assistant-fork&data=05%7C01%7Cbarnold%40sunitafe.edu.au%7C773dd42fc0df45fec7c908db314de1b4%7Cf561ef0fae55424d82afb039b9522053%7C1%7C0%7C638157982816089818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=4dW%2FHxDk0nlEgJU5ydpAxGsQ82BmLTrc9BHsl0IxbJ4%3D&reserved=0

— Reply to this email directly, view it on GitHubhttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmkaiser%2FSungrow-SHx-Inverter-Modbus-Home-Assistant%2Fissues%2F80%23issuecomment-1490752510&data=05%7C01%7Cbarnold%40sunitafe.edu.au%7C773dd42fc0df45fec7c908db314de1b4%7Cf561ef0fae55424d82afb039b9522053%7C1%7C0%7C638157982816089818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=toayv6g7cWfFIejmrSqXujZi7%2BWwKaXH1JaYTzi4%2BiE%3D&reserved=0, or unsubscribehttps://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABUH37OXKWLOAJDZ3VWLYCLW6XHHZANCNFSM6AAAAAAWJ33MEE&data=05%7C01%7Cbarnold%40sunitafe.edu.au%7C773dd42fc0df45fec7c908db314de1b4%7Cf561ef0fae55424d82afb039b9522053%7C1%7C0%7C638157982816089818%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=EII80gzPPjuj5ivBnzNCodzuoYEwnPuY45zgGGodmXY%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

OFFICIAL


RTO Code: 4693 CRICOS no. 01985A This email and any attachments may contain privileged and confidential information. If you are not the intended recipient, you may not distribute reproduce this e-mail or the attachments. If you have received this message in error, please notify us by return e-mail.

Please consider the environment before printing this email.