MQTT CAN Filter: add option to publish expressions in individual topics#488
Open
hurzhurz wants to merge 1 commit intomeatpiHQ:mainfrom
Open
MQTT CAN Filter: add option to publish expressions in individual topics#488hurzhurz wants to merge 1 commit intomeatpiHQ:mainfrom
hurzhurz wants to merge 1 commit intomeatpiHQ:mainfrom
Conversation
meatpiHQ
requested changes
Dec 18, 2025
Owner
meatpiHQ
left a comment
There was a problem hiding this comment.
Please change RX Individual Enable to something more indictive like "Per-Filter MQTT Topics" or something more appropriate
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.
This adds options to publish the expressions from the CAN filter as individual topics, and optionally, with the retain flag set:
This for example results in such a message:
The reason is that some applications don't like to get multiple different values spread across multiple messages under the same shared "rx" topic.
Also sometimes the retain flag can be helpful to keep the last known state (but it wouldn't be reasonable to use it for the "rx" topic).
My personal use case is to get the live SoC for EVCC while charging by capturing broadcast frames.
Therefore I use EVCC's custom vehicle type and MQTT plugin.
While the MQTT plugin would allow it to extract the actual value from the json payload of the rx-topic-messages, it isn't happy when it tries to process a message for the SoC that doesn't contain that value. With individual topics, it is ensured that it only gets the right messages for each type.
Also the retain flag helps to get the last known state if the vehicle is sleeping (CAN bus silent).