-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Sofar ME3000-SP requests often result in V5FrameError (modbus exception 5) or CRCError #307
Comments
Hi @coserotondo, it looks like your inverter from time to time replies w/ nonsense data... Did you tried to increase |
Hi @davidrapan, nope, I left the default I tried only with What would be a reasonable |
I mean it should be good w/ 5. But try incrementing by 5 and observe if it has any impact! |
Trying Now I have: |
It's just correctly parsed exception but it's the same as invalid frame. |
I see. Any changes to catch this retaining the previous state of the sensors (so without making them |
What is stick's firmware version? @githubDante, could you take a look when (and if) you have a moment? |
Stick firmware version: H4.01.51MW.2.01W1.0.72(2018-11-271-D) |
Could you also give me some "background"? Has it started behaving badly now or are you a new user? |
Sure. I was long time user of Stephan Joubert's integration and just recently migrated to your integration. |
What version it was? Latest or the one before? If I remember correctly there is update interval 30 seconds, did you tried to increase it to |
It was the latest, yes 30 seconds. I'm trying now. |
It looks like overlapping. @coserotondo do you have another client querying the inverter at the same time/same interval?!? |
I was also thinking about this @githubDante. I’ve a HA dev instance where I tested the upgrade from Stephan Joubert's integration but it was on for few seconds, just to check the data collection. The inverter is also configured (by default) to send the data over the internet to the solarmanpv servers every 5 minutes but the disconnections seems to be more frequent. Attached the settings in |
That would be something way more frequent than solarman servers. |
I see this too. Both of my ME3000SPs go ‘unavailable’ for all parameters about once a minute, with the values returning a second or two later. It’s been like this for a long time, but seems worse now than it has been previously. It only really affects me if one of my automations tries to read, say, battery SOC and if it coincides with an unavailable period the automation fails. |
Do you clear the values before writing the new data, rather than just overwriting the old data with the new? |
I remember with the old integration, although maybe I had CRC errors, I never found the sensors in unavailable state. |
I'm also seeing this in my logs:
|
This could indicate overlapping of requests. |
Can any of you try this proxy to see if it will improve the situation. Instructions how to be used are available in the README. Just make sure to start it in |
Trying now. Still having CRC errors. and so disconnections (from the proxy). I'm leaving the integration in debug. See tomorrow. From the proxy:
@githubDante what is |
EOF is a connection closed by the client/remote side. This is not an actual error, but is reported as such on read. It requires extra check to be explicitly skipped. |
Because I have two inverters? Any way to stop that happening? I guess first step is to disable one of them in HA and see whether the problem persists. |
So any suggestion to improve the situation? Better stay with the proxy? @PaulOckenden did you tried the proxy? |
I didn’t try the proxy - sorry. It struck me as one more thing to maintain, and another possible point of failure. I thought it would be better to help get the integration working properly, like the old version used to. |
Trying out the proxy wasn't about getting it working, but about debugging the issues you're having. 😆 |
Of course. So, do you need more info before I'll switch back (without proxy). |
It is unclear why the inverter returns these zeroed frames, but their CRC is definitely wrong/invalid. If the proxy doesn't help try to increase/change the query interval. Edit: Looking at the log again, this inverter seems slow in its responses, 400-500ms for a few registers when the read is OK and up to a second when the CRC error occurs. It's obviously busy with something, but I really have no idea what. The only reasonable explanation is data upload to the Solarman platform, but this is usually a relatively small packet, the data for which should not be problem at all. |
What about this:
2.5 seconds for 11 registers, and soon after that:
zeroed packet for under 40ms. It seems that the request interrupted something and the logger is throwing away what is already in its buffer. |
Yeah it's obvious that there is something wrong going on. This integration treats every "not successful" request as if the device is not online for obvious reason (data accuracy over data availability). And it won't be changed nor workarounds (for issues that are clearly from the outside) added as the code contains way too many of those already for devices which do not follow standards. You should focus on finding out what the hell is going on. Few hints:
|
Try change (
to
|
Thanks David - that appears to have helped. I'd have thought more frequent updates would cause more frequent problems, but apparently not! |
It looks like your device requires requests to specific register address ranges and this change just does exactly that so it's more about what and when than how often. |
fix: ME3000SP V5FrameError and CRCError, try these changes as it also has 1 less request in the 0x2000 up range. |
Ah. I assumed ‘update_interval’ would be about timing! |
It is but in this case it's about timing that one register the same as others. 😉 |
Ah ha, that makes sense. |
Can you show me 10 minute debug log now? |
Here's a ten minute log file using the complete new wifikit.yaml (not just the 300 -> 5 change). Note that I have two inverters, but I think that's obvious from the logs. |
Sure, just wanted to check if that interrupting error disappeared completely and it looks like it did. 😉 |
@davidrapan a quick question: after changing the inverter definition (custom) do I need to restart HA or an integration reload is enough? |
Reload is enough. |
Thanks for fixing this David. Are the BTC details shown in the Wallet link here still the best way to reward you for the time you've put into this integration? |
Description
Very often all entities become
unavailable
for few seconds. The inverter is "always on" as it is a storage inverter Sofar ME3000SP.The definition file is
sofar_wifikit.yaml
. I tried to manually query the registers and it works without errors.Reproduction Steps
No specific actions to reproduce, it happens regularly.
Log
home-assistant_solarman_2024-12-09T07-35-27.188Z.log.filterline.log
Version
24.12.06_4
Home Assistant Version
2024.11.3
The text was updated successfully, but these errors were encountered: