-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Sunsynk inverter via Solarsynk2 add-on for Home Assistant #129
Comments
Forgot to add HA entities to read:
|
I can certainly try to get something working for you. It may take a while - need to solve a few other bugs 1st. |
That's great, thankyou. The installation's only been in for a week and we're not certified to export yet. Then I'll need to familiarise myself with programming it manually. What do you think about the update settings method provided by the Solarsynk add-on? It takes up to 5 min to send to the cloud, then maybe another 5 min until the results are readable from HA sensors. Is that fast enough? regards |
OK - I've had a very preliminary start at this. It will is v4.0.0-alpha-1 pre-release so you will need to enable Beta versions in HACS and manually select it. You will also need the If you are very lucky it might work in Read Only mode! Either way please send me the logs. In the meantime I will try to have a look at the documentation for the integration. |
Thanks I'll give it a go! I'll try to clarify the working modes for the inverter tomorrow - they control whether the inverter gives priority to essential load / non-essential load / battery / grid export. I've also discovered another check we should do - the inverter will support battery types which use voltage instead of SOC to control charge / discharge so we should check that the battery is compatible with SOC. Also, I think my documentation is wrong about ticking 'Grid' for a discharge, it looks like it should be unticked. I'll update the documentation |
Sorry my mistake - {inverter sn} should be {sunsynk_serial} as defined in solarsynk addon. Also - cosmetic change - could you change the spelling of solarsync2 to solarsynk2 please. I don't know how far I can get with testing because we're not certified for export yet so we haven't changed tariff from the fixed rate Flexible Octopus to some thing smart such as Agile or Flux. Unless there's a way to bypass it for testing purposes? |
Is there any way of extracting {sunsynk_serial} from the addon? If not I might prefer to keep {inverter_sn} as a generic parameter across brands. Will fix the typos now and re-release as alpha-2 |
alpha-2 available. You will need to manually copy |
[sunsynk_serial} is in the config for the Solarsynk add-on but I can't see a sensor for it |
OK - then it shouldn't matter if we call it something else in the config file. I suspect other brand/integrations may need something similar so I'd rather keep it generic where possible
…________________________________
From: Mark W (UK) ***@***.***>
Sent: 24 February 2024 09:58
To: fboundy/pv_opt ***@***.***>
Cc: fboundy ***@***.***>; Comment ***@***.***>
Subject: Re: [fboundy/pv_opt] Support for Sunsynk inverter via Solarsynk2 add-on for Home Assistant (Issue #129)
[sunsynk_serial} is in the config for the Solarsynk add-on but I can't see a sensor for it
—
Reply to this email directly, view it on GitHub<#129 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABHJ7POK2BADLACPAGPJUUTYVG2TRAVCNFSM6AAAAABDONK3YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGMYTKNJYHE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Also I think the underline character is missing in {inverter_sn} on all of the sensors above |
Updated my documentation for the inverter. There are a couple of problems, such as
Apart from that I think it should work! |
That's great - I will have a proper read of this now and have a think about how to implement it |
Here are the logs from running v4.0.0 alpha2 |
Cheers
Away on holiday this week. Will have a look when I’m back.
…On 4 Mar 2024 at 16:00 +0100, Mark W (UK) ***@***.***>, wrote:
Here are the logs from running v4.0.0 alpha2
error.log
main.log
pv_opt.log
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hope you're having a nice holiday. I made some progress by hard coding the inverter serial number in config.yaml (inverter serial number redacted manually - 10 digits, also my Octopus account has an e instead of an m): Now pv_opt gets further: You'll see I'm on the Octopus Flux tariff for import but don't yet have an export tariff. I have submitted the MCS certificate and permission from the DNO but I think it can take weeks to get an export MPAN number |
following developments |
I've synced this branch up with the main branch so it should now handle the lack of an export contract OK which was the point of failure before. Also added the inverter_sn to the redaction list. Released as 4.0.0-alpha3 |
Hope you had a good holiday! We got our export MPAN this morning but Octopus don't seem to have taken any readings yet. Perhaps overnight. I reloaded the Octopus integration in HA and the export sensors appeared. I installed pv_opt 4.0.0-alpha4 and ran again. I reverted to the config_sunsynk.yaml from GitHub and used this to overwrite my config.yaml because pv_opt doesn't seem to be picking up some values correctly. I edited it to add the correct value of {inverter_sn}. From the logs it looks like pv_opt isn't picking up {device_name} or {inverter_sn}. Also I think there are a couple of typos in config.yaml:
|
Thanks for this. In 4.0.0-alpha-5 I have removed I've also updated the regex pattern for the MPAN. Hopefully with the correction of SOLARSYNC2 to SOLARSYNK2 it should get a bit further. Let me know how you get on. |
Thanks - got a lot further this time but still seems to be ending with an error: |
would really like to get this working |
OK - apologies for the delay. Please can you try pre-release |
Thanks I'll give it a go. Actually I wasn't ready until today - SSD failed and it's taken me a week to get a replacement and recover Home Assistant from backup. We've also got some persistent connectivity problems with Solarsynk as a result of which my updates from a couple of HA automations don't seem to be working. It seems to be affecting all users of Solarsynk so it might be the cloud app that is at fault. On the plus side I'm now exporting to the grid and getting paid for it. As a result I've found out more about the Sunsynk inverter's eccentricities. For example, charge current is not controlled by the timers. Also, to discharge the batteries to the grid I need to change the Work Mode from 'Limited to Home' = 2 to 'Selling First' = 0 in real time because otherwise I can't discharge the battery to Home at other times without exporting as well. I've also found a different Sunsynk HA integration by MorneSaunders360 which also works via the cloud API but has an HA service to update the inverter which might be more appropriate for pv_opt. I'll have a look at that. In the meantime I have updated my documentation - sorry if I've misled you so far! |
Currently unable to test properly due to ongoing problems with Solarsynk. Sunsynk.py still has references to "SUNSYNK_SOLARSYNC2" should be "SUNSYNK_SOLARSYNK2" (Lines 72, 86, 117) |
|
I think I've got the latest version but it's reporting
When I start the application it is stuck at 'Initialising PV model'. There is a warning in error.log:
|
Ok - maybe that it had just rolled over into a new file. Is there anything in error.log.1?
…On 3 Apr 2024 at 14:59 +0100, alz41 ***@***.***>, wrote:
It was empty at the time of posting
Sent from Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: fboundy ***@***.***>
Sent: Wednesday, April 3, 2024 2:27:50 PM
To: fboundy/pv_opt ***@***.***>
Cc: alz41 ***@***.***>; Mention ***@***.***>
Subject: Re: [fboundy/pv_opt] Support for Sunsynk inverter via Solarsynk2 add-on for Home Assistant (Issue #129)
The last error.log was empty. Could you please re-upload?
—
Reply to this email directly, view it on GitHub<#129 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHMIQS2QMNYB2PCEI33Z453Y3P7VNAVCNFSM6AAAAABDONK3YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZUGYYTENBZGU>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@alz41 is Mosquitto running OK? |
@fboundy whats strange is the sensors are created but not the helpers LOG AFTER 30MINS OF RUNNING (ERROR LOG [EMPTY) |
OK - I'll try to get an update out tomorrow which is up to date with the main beta version. Might help |
thanks Mosquitto log shows connection as below Mosquitto broker |
I've just released I'm trying to get all these various features into 3.14.0 and get that out asap so let me know what you find |
3.14.0-alpha-16 Mosquitto.log Supervisor.log |
Does sound like an MQTT problem.
…On 4 Apr 2024 at 22:15 +0100, alz41 ***@***.***>, wrote:
3.14.0-alpha-16
helpers still not being created
error.log
main.log
pv_opt.log
Mosquitto.log
2024-04-04 21:51:52: New connection from 172.30.33.6:52653 on port 1883.
2024-04-04 21:51:52: New client connected from 172.30.33.6:52653 as localad (p2, c1, k60, u'PV_OPT').
Supervisor.log
2024-04-04 20:48:11.237 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'PV_OPT'
2024-04-04 20:48:11.711 INFO (MainThread) [supervisor.auth] Successful login for 'PV_OPT'
2024-04-04 20:57:04.842 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'PV_OPT'
2024-04-04 20:57:05.317 INFO (MainThread) [supervisor.auth] Successful login for 'PV_OPT'
2024-04-04 21:51:52.312 INFO (MainThread) [supervisor.auth] Auth request from 'core_mosquitto' for 'PV_OPT'
2024-04-04 21:51:53.567 INFO (MainThread) [supervisor.auth] Successful login for 'PV_OPT'
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
solar assistant works fine with MQTT, ANY IDEA HOW TO DEBUG. |
I've successfully debugged MQTT issues with MQTT Explorer in the past. There is an error being caused by a bug in the sunsynk controller which I will fix for the next release . This isn't related to the MQTT but if we can get everything else running perhaps we can diagnose better. |
Sounds good to me
Sent from Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: fboundy ***@***.***>
Sent: Monday, April 8, 2024 7:11:25 PM
To: fboundy/pv_opt ***@***.***>
Cc: alz41 ***@***.***>; Mention ***@***.***>
Subject: Re: [fboundy/pv_opt] Support for Sunsynk inverter via Solarsynk2 add-on for Home Assistant (Issue #129)
I've successfully debugged MQTT issues with MQTT Explorer in the past.
There is an error being caused by a bug in the sunsynk controller which I will fix for the next release . This isn't related to the MQTT but if we can get everything else running perhaps we can diagnose better.
—
Reply to this email directly, view it on GitHub<#129 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHMIQS2CHSN65MVZQDDWMZ3Y4LMU3AVCNFSM6AAAAABDONK3YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBTGM4DGOBXGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Should be fixed in the |
logs from 3.14.0 release |
@ElectricMolehill |
I'm away for a couple of days. Will try to look when I'm back |
version 3.14.2 logs |
@alz41: @ElectricMolehill: It should also allow you to specify two a list of entities for the solar power:
|
3.14.3 logs WARNING pv_opt: Unexpected error in worker for App pv_opt: |
after changing overwrite_ha_on_restart: to false and ev charger to none everything working as expected. should PVOPT be making changes to inverter settings for charge/discharge? |
At present it should just be writing the state of the Solarsynk helper to the log but I've just spotted a typo. I will fix and issue an update but if you want to edit yourself it is line 135 in
|
Made the above change, Full logs below |
Rebooting HA with read only set true in Pvop config runs, but setting read only false gives error |
I've updated my sunsynk document to include some new information such as
|
Been tied up with other things but will hopefully get back on this next week |
I've had pv_opt running in read only mode for a couple of weeks now without error. I don't always understand the plan it produces but that is probably because I don't understand the algorithm. Solarsynk is also running reliably now since the CA cert check was removed |
Can you upload the pv_opt.log file so I can see what it’s doing?
Thanks
…On 28 Apr 2024 at 17:08 +0100, Mark W (UK) ***@***.***>, wrote:
I've had pv_opt running in read only mode for a couple of weeks now without error. I don't always understand the plan it produces but that is probably because I don't understand the algorithm. Solarsynk is also running reliably now since the CA cert check was removed
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
reboot HA change ev charge to none @ 17:34 |
Hi fboundy
regards
Mark
PV Opt can be updated to support additional models and brands of inverter. If you want to request this, please supply as much of the following information as possible:
Home Assistant Entities to Read
PV Opt reads data from a number of entities in Home Assistant. These will vary by inverter. Please document what your inverter provides. Examples are provided from the Solis Solax Modbus integration:Inverter Control
PV Opt also needs to control your inverter. How this is done and what can be done varies hugely by brand, by model and by the integration you use with Home Assistant. Please provide as much detail under each heading. Examples are provided for the Solis inverter using the both the Solax Modbus Integration and the HA Core Modbus functionality. Please add your details below:Examples
number.timed_charge_start_hour
,number.timed_charge_start_minute
,number.timed_charge_end_hour
,number.timed_charge_start_minute
. Then press 'button.solis_update_charge_discharge_times
. Set the required current tonumber.solis_timed_charge_current
. Ensureselect.solis_energy_storage_control_switch
has Timed Grid Charging enabled.modbus\write_register
service to write start and end hours and minutes to the correct registers. Ensure theenergy_storage_control_switch
has Bits 2 and 5 enabled. Set the required current using themodbus\write_register
servicedischarge
rather thancharge
Energy Control Switch
which controls mode in a bit-wise sense. Only some modes can be selected vai the entityselect.solis_energy_storage_control_switch
Energy Control Switch
which controls mode in a bit-wise sense. The required number is set using themodbus\write_register
serviceYour Setup
What is the inverter brand?
SunsynkWhat is the inverter model?
ECCO 3.6kW hybrid inverter SYNK-3.6K-SG04LP1What integration do you use in Home Assistant
Solarsynk2 add-on. There is another one Deye/Sunsynk Home Assistant add-on by kellerza but this requires a direct wired connection to the inverterHow do you enable forced charging?
Only done via a timer. Set a time slot x, tick grid time x to allow charging from grid, target SOC x (above current SOC) and power x. 6 slots are availableHow do you enable forced discharging?
Only done via a timer. Set a time slot x, tick grid time x to allow charging from grid, target SOC x (below current SOC) and power xAre forced charge and discharge controlled using Power or Current?
Power (W) and target SOC whichever is the smallerDoes your inverter support timed charging slots?
6 slots used for charge and discharge. Should be contiguous, sequential and cover the whole 24 hrsDoes your inverter support timed discharging slots?
Same timeslots as for charging but with a different target SOCHow do you enabled timed charge?
Set Use Timer = true To do this, populate helper input_text.solarsynk_{inverter serial no}_settings with json to update Sunsynk cloud api: {"peakAndVallery": "1"} (just possible this is a misspelling) Also required for slot x - Start time ("sellTime(x)": "02:00") Grid timer x ("time(x)on": true) Target SOC ("cap(x)": "80") if this is higher value than current SOC, batteries wil charge up to this value from the grid Power x ("sellTime(x)Pac": "3600") End time is defined implicitly by the start time of the next slot. An appdaemon process runs every 5 min to post the contents of this helper to the Sunsunk cloud api. This is not ideal because it's not online. Perhaps I could get the Solarsynk developer martinville to add a realtime update methodHow do you enabled timed discharge?
As for charging but set target SOC lowCan you set a target SOC for a timed charge period?
Yes - this would be the usual manual methodCan you set a target SOC for a timed discharge period?
YesWhat modes does you inverter have and how are they controlled?
There are some settings which limit export to load or grid. Details to be confirmed but probably should be set manuallyAny other useful information
See attached doc [sunsynk inverter class for pv_opt.odt](https://github.com/fboundy/pv_opt/files/14324224/sunsynk.inverter.class.for.pv_opt.odt)The text was updated successfully, but these errors were encountered: