Add propulsion diagnostics group: engine fault lamps and active trouble codes - #682
Open
dirkwa wants to merge 1 commit into
Open
Add propulsion diagnostics group: engine fault lamps and active trouble codes#682dirkwa wants to merge 1 commit into
dirkwa wants to merge 1 commit into
Conversation
…codes Engine controllers report structured diagnostics that had no home in the spec: the four standard fault lamps (malfunction, red stop, amber warning, protect) and the list of active diagnostic trouble codes identified by SPN and FMI (e.g. J1939 DM1). Engine measurements were already covered by the existing propulsion paths; this adds only the diagnostics surface, with the alerting side left to the notifications tree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Engine controllers report structured diagnostics that currently have no home in the spec: the four standard fault lamps (malfunction, red stop, amber warning, protect) and the list of active diagnostic trouble codes identified by SPN and FMI — J1939's DM1 message, which many marine engines (Yamaha, Volvo Penta, Yanmar, ...) emit natively and NMEA 2000 gateways translate.
This adds
propulsion.<id>.diagnosticswith boolean lamp values and anactiveCodesarray of{spn, fmi, occurrenceCount}objects. Engine measurements need no spec change — the existing propulsion paths cover the J1939 engine suite — and the alerting side stays with the notifications tree; this is only the structured-data surface, so a consumer can show the actual fault codes rather than just "engine alarm".Context: canboat is growing a J1939 decode flavor (canboat/canboat#820) and Signal K Server a listen-only J1939 socketcan connection, with n2k-signalk mapping the decoded records (SignalK/n2k-signalk#340). DM1 lamp states currently land as a notification; once this is in, the structured codes get proper paths.
Tested: schema validates the extended
propulsion-sample.json(207 passing), and rejects a malformedactiveCodesvalue (verified, then removed the negative fixture).