-
Notifications
You must be signed in to change notification settings - Fork 102
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
Crash when changing battery charge settings #156
Comments
Can you try with the multi addon? |
Hi, Sorry this took a little while it's not my install. I've switched over to multi, I can read everything fine, and unlike the dev add-on it doesn't crash when I try and make a setting change but at the same time it doesn't make the change, this is in debug level 1 logs when trying to change battery SOC in one of the timeslots after start-up:
config file:
|
I've done a complete uninstall and re-install. I can see the critical log now when attempting to write:
|
And reading is ok? Can you modify the inverter settings on the inverter's control panel? (I believe there was some lockout mode where an inverter could be placed in read-only mode) If this is still not working, try the fault finding again, as the problem does present itself like a bad connection (timeouts) For a direct serial port, I would still use mbusd as a TCP proxy... |
Reading is working from this add-on. We can make changes on the inverter directly and also via the sunsynk app. I've copied the set-up I've used but I'm on 8kw inverter and this issue is on a 16kw. |
I'm stumped. I can read data OK. I've swapped out the USB adapter and ethernet: https://www.amazon.co.uk/gp/product/B01N3LM0PU/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 I've tried the different settings you outlined here: #131 Is this an issue with the 16kw Inverter? I am happy to try anything else you can suggest to try and diagnose this. |
You are probably the first user with a 16kW inverter,- is this a 3-phase inverter? |
I've just compared this to mine and there's no difference. My 8kw has options for phase a/b/c too but I'm not on 3 phase from the grid either. So the difference seems to be mine is 8kw and the one not working is 16kw |
The register I had in mind for the lockout was. But this probably affect changes via the UI and Modbus 020 | Remote Lock | R/W |
I've moved the PORT to use: tcp://homeassistant.local:502 using the Modbus TCP to Modbus RTU Gateway Add-on, this has removed all timeout errors. I've set debug level to 2. When I try and make a change to Battery SOC using pymodbus driver, this is the error:
This with umodbus:
When using the Modbus TCP to Modbus RTU Gateway Add-on when trying to write the sensors it results in a crash, when connecting direct serial on pymodbus it fails but doesn't crash. Trying 3 phase option in the add-on had no effect as it failed to read any of the configured sensors. I've asked via supplier for inverter firmware to be checked. |
Is there any additional logging I can generate to try and assist diagnostics? |
Can you try to write with an external tool? You should be able to connect from your laptop to the mbusd server |
Good day, I have the sunsynk 16k and this is working perfect for me using kellerza instructions and rs485 adapter he said was most reliable. Are you sure you have everything wired correctly? It's possible this could be a wiring/crimping problem? Or also try lowering the number of registers read in one go? When I set up mine, increasing the timeout between reads/writes in mbusd conf file made read errors less likely, so you may have to play with mbusd conf settings and test with modpoll also. Just some ideas. |
I'll try again but at this point I've replaced everything including etherent and usb adapter. I've also gone direct to the can port the wifi dongle uses. Just to confirm, are you able to write settings OK? I can read fine just not write battery soc and turn grid charge on. Edit additional: I've just updated to the latest version of the multi-package, and on changing from "no grid or gen" to "allow grid" it is crashing. In the previous version it wasn't crashing. |
Good day, Yes I can write everything ok, I'm using this version of addon, plan to update today: 2023.08.06-0.4.0 I did not have grid charge function, but I enabled since you were having issues. Previously I had grid charge permanently enabled and used grid charge current. I was abled to adjust the current via slider without issue. I've done some testing and here is what I found:
2023-08-17 07:03:28,275 CRITICAL Writing sensor grid_charge=OFF [(232,)=(0,)] Here's the code: from sunsynk import AMPS, CELSIUS, KWH, VOLT, WATT
from sunsynk.rwsensors import NumberRWSensor, SelectRWSensor, TimeRWSensor, SwitchRWSensor
from sunsynk.sensors import (
MathSensor,
Sensor,
SensorDefinitions,
TempSensor,
)
SENSORS = SensorDefinitions()
SENSORS += SwitchRWSensor(232, "Grid Charge") |
Hi. This is great you replicated the issue. I think this confirm an issue specifically on 16kw inverter and this add-on as I'm using the exact same set up, add on, configuration etc on an 8kw sunsynk converter without issues and can toggle grid/gen/grid+gen/no grid or gen without any issues for 8kw inverter. I'll also try and enable grid charge for one of the battery switch points via app then adjust the target as previously I think this also caused a crash. |
@ASomerN, what sensor are you trying to write to? Can you write these with an external tool? From what @trackmafia posted, it seems like you cannot write to 232 registers, but the rest seems ok. |
Hi, I'm trying to write the setting supplied on this: When trying to change any of these settings it crashes: I believe these are:
I can change any of the settings using the official app and directly in the inverter. I won't be able to connect anything directly other than what's there right now as it's at my parent's house (I'm gladly doing the dutiful son tasks). Also, I'm not 100% sure what I'm required to do should I connect a different device. I hope that helps clarify what it is that's not working. Everything is the same as with my set-up apart from the inverter and it works for me at my property using the "multi" add-on. |
@kellerza All of those I tried to write to work. It shows an error in the logs when writing every time, but still proceeds with the write. It seems like the first try fails but then 2nd try works. To confirm, I have written to grid charge enabled, grid current, and battery charge current. All have this behavior. However, what I said was that the grid charge enabled code is set to sensor, which is read only. I made a custom sensor using switchRWsensor for the same modbus register, and then it worked. So you may want to consider changing sensor to switchrwsensor for this register. |
Thanks for the update @trackmafia - will add a small delay (10ms) before attempting to write anything in the next version, maybe that improves things |
Hi thanks fpr the info both and I'll aim to be at the property soonish to
try new things.
I'll give the custom code a go, but to confirm, this doesn't happen with my
8kw converter when writing which confuses me.
I've asked the installers to get firmware updated but due to sunsynk
mondodb migration it's some way off happening.
…On Tue, 22 Aug 2023, 11:52 Johann Kellerman, ***@***.***> wrote:
Thanks for the update @trackmafia <https://github.com/trackmafia> - will
add a small delay (10ms) before attempting to write anything in the next
version, maybe that improves things
—
Reply to this email directly, view it on GitHub
<#156 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6L5EX3EBUE22VBYHN4WO3XWSFQBANCNFSM6AAAAAA2C6OFAA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I've determined there's nothing wrong software-wise, but it's worth leaving this open until I can document everything and suggest updates to the wiki. Long story short, having replaced everything again, and tested with a new USB to RS232, the 16kw Sunsynk inverter only allows writing of settings via the rs232 port the wifi dongle uses. I've had a dig around and on this link: https://solar-assistant.io/shop/products/sunsynk_rs485 Following through the help section it seems to suggest a method of connecting both battery and solar-assistant monitoring: "Note with the latest 16kW models/firmware the BMS port is used for SolarAssistant monitoring and battery CAN communication at the same time. See the 2 in 1 BMS port" I'm exploring options to move the default Sunsynk monitoring app to the read-only port and connect the home assistant system into the RS232. |
I'm using the rs485 port and writing is happening for me just fine. I have the WiFi dongle on the serial port, and used to have battery communication on canbus, but I removed that. Maybe you have a newer model, I don't have the 2 in 1 port, everything is separate on my model.
Aug 30, 2023, 03:31 by ***@***.***:
…
I'm not sure it will work with the 2-in-1 port, since that is still RS485 but just a different port.
According to the links you shared, you have to move it to the RS232 port. So no more RS485
<https://user-images.githubusercontent.com/6756881/264263305-db21243b-7e77-4895-8d97-02ace1c31979.png>
—
Reply to this email directly, > view it on GitHub <#156 (comment)>> , or > unsubscribe <https://github.com/notifications/unsubscribe-auth/A6GTYDH7EBEKZM5ZDT4BR53XX3T37ANCNFSM6AAAAAA2C6OFAA>> .
You are receiving this because you were mentioned.> Message ID: > <kellerza/sunsynk/issues/156/1698643969> @> github> .> com>
|
What's the method for connecting via the solarman WiFi adapter? The one
supplied in the UK doesn't have an Ethernet port inside.
…On Wed, 30 Aug 2023, 11:59 trackmafia, ***@***.***> wrote:
I'm using the rs485 port and writing is happening for me just fine. I have
the WiFi dongle on the serial port, and used to have battery communication
on canbus, but I removed that. Maybe you have a newer model, I don't have
the 2 in 1 port, everything is separate on my model.
Aug 30, 2023, 03:31 by ***@***.***:
>
>
>
>
> I'm not sure it will work with the 2-in-1 port, since that is still
RS485 but just a different port.
>
>
> According to the links you shared, you have to move it to the RS232
port. So no more RS485
>
> <
https://user-images.githubusercontent.com/6756881/264263305-db21243b-7e77-4895-8d97-02ace1c31979.png>
>
>
>
>
> —
> Reply to this email directly, > view it on GitHub <
#156 (comment)>>
, or > unsubscribe <
https://github.com/notifications/unsubscribe-auth/A6GTYDH7EBEKZM5ZDT4BR53XX3T37ANCNFSM6AAAAAA2C6OFAA>>
.
> You are receiving this because you were mentioned.> Message ID: >
<kellerza/sunsynk/issues/156/1698643969> @> github> .> com>
>
>
>
—
Reply to this email directly, view it on GitHub
<#156 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6L5ERXIPQ6RG63FE3XYCTXX4MINANCNFSM6AAAAAA2C6OFAA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The solarman dongle connects to your wifi The addon then connects to the local IP of the solarman dongle (over wifi) |
Thanks.
Is there an example of the yml configuration you would use for this? I've
tested so far with umodbus and pymodbus. Would assume I need to reference
an ip address?
…On Thu, 31 Aug 2023, 18:26 Johann Kellerman, ***@***.***> wrote:
The solarman dongle connects to your wifi
The addon then connects to the local IP of the solarman dongle (over wifi)
—
Reply to this email directly, view it on GitHub
<#156 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6L5EVBFHSLBF4INHAE743XYDCLJANCNFSM6AAAAAA2C6OFAA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Unfortunately the wifi logger that was supplied is the sunsynk version not solarman, the serial number isn't an integer its a mix of letters and numbers. I'll try and find where to get a solarman dongle from supplier. I've been asked to try and keep both the sunsynk app working and also the home assistant connection. |
Issue related to
Sunsynk / mbusd Home Assistant Add-On
Describe the issue/bug
When requesting a change to the battery settings, the add-on crashes (using Dev add-on).
Expected behavior
Setting changes are made
Your environment
Logs
The text was updated successfully, but these errors were encountered: