-
-
Notifications
You must be signed in to change notification settings - Fork 91
VE.Direct frame error logging #1810
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
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 7 out of 10 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- webapp/src/locales/de.json: Language not supported
- webapp/src/locales/en.json: Language not supported
- webapp/src/locales/fr.json: Language not supported
Update, System 2 days and 12h online Logging: |
Build ArtifactsFirmware built from this pull request's code:
Notice
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to log and display VE.Direct transmission errors in greater detail for both the MPPT charge controllers and the Victron SmartShunt. Key changes include:
- Adding transmission error values in the JSON output for MPPT and SmartShunt.
- Introducing new error counter and logging functions in the VeDirect frame handler.
- Updating the VE.Direct data structure to map error codes to human‐readable strings.
Reviewed Changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/solarcharger/victron/Stats.cpp | Adds JSON entries for MPPT transmission errors. |
src/battery/victronsmartshunt/Stats.cpp | Updates Live View data to include transmission error value. |
lib/VeDirectFrameHandler/VeDirectFrameHexHandler.cpp | Updates error handling to include HEX_CHECKSUM errors. |
lib/VeDirectFrameHandler/VeDirectFrameHandler.h | Declares new error counter and logging function members. |
lib/VeDirectFrameHandler/VeDirectFrameHandler.cpp | Implements error counting and logging, including transmission error averaging. |
lib/VeDirectFrameHandler/VeDirectData.h and VeDirectData.cpp | Adds mapping for transmission error codes to readable strings. |
include/battery/victronsmartshunt/Stats.h | Adds a new member to hold transmission error data for the SmartShunt. |
Files not reviewed (3)
- webapp/src/locales/de.json: Language not supported
- webapp/src/locales/en.json: Language not supported
- webapp/src/locales/fr.json: Language not supported
Comments suppressed due to low confidence (1)
src/solarcharger/victron/Stats.cpp:255
- [nitpick] Consider aligning the naming for transmission error keys across device types. For consistency, either use 'MpptTransmitError' or a similar naming convention as used in the SmartShunt ('transmitError').
device["MpptTransmitError"]["v"] = mpptData.transmissionErrors_Day;
881f70a
to
c68f9c2
Compare
Now using DTU_LOGI to log the transmission errors. |
d196439
to
12fa025
Compare
Small improvement: Do not print the transmission faults in the logging if we do not have any. |
e2985bd
to
f6946ca
Compare
I've implemented a transmission error log for the VE.Direct connections (charge controller, shunt). The Live View displays the recorded transmission errors for each device per day. This allows you to check the quality of your VE.Direct connection.
Additionally, the log displays transmission errors in more detail every 60 seconds. You can see which errors (checksum, buffer overflow, etc.) were detected.
23:13:09.079 > [VE.Direct MPPT 10/9] Average transmission errors per day: 0.0
23:13:09.079 > [VE.Direct MPPT 10/9] Total Sum: 0, Frame Timeout: 0, Text Checksum: 0
23:13:09.133 > [VE.Direct MPPT 10/9] Hex Checksum: 0, Hex Buffer: 0, Nested Hex: 0
23:13:09.133 > [VE.Direct MPPT 10/9] Debug Buffer: 0, Unknown Data: 0, Invalid Char: 0
For the sake of completeness, I should also mention: