Suppress Temperature Messages not working

I have changed the suppress Terminal Filter to - (Send: (N\d+\s+)?M105)|(Recv: == T:.*$)
which seems to be doing the job. The problem with the plug-in code is strange in that it seems that the code gets the correct line data and returns the correctly amended data but somehow it is not being used.

1 Like


further to my last message I have noticed that if you use a terminal filter you get [...] displayed to indicate the suppressed messages. If however you deselect the Suppress Temperature Messages all of the suppressed messages are then displayed. This indicates to me that the messages are being buffered somewhere.. Could this eventually present a problem with a large number of buffered lines?

@ChrisMower, I'm glad you found a way to suppress the messages. Obviously, OctoPrint's Terminal Filters are being run before the plugin hook sees the line. I originally authored this plugin to solve another Creality firmware transgression and it worked there so I thought I'd give it a shot here.

Your question about the buffered lines is beyond my pay grade. @foosel or someone more familiar with the OctoPrint internals would have to answer that one.

OctoPrint has a Discord server (icon at the top of this page) and you could try asking there in support-octoprint or dev-core.

I have changed the suppress Terminal Filter to - (Send: (N\d+\s+)?M105)|(Recv: == T:.*$)
which seems to be doing the job.

I think multiple whitespace characters are trimmed in the forum text editor. Therefore @ChrisMower's filter text was altered.
I needed to put an extra whitespace after "Recv:" for my printer.

Thats why there is a function to display program code in the top bar of the editor: </>

Thats why there is a function to display program code in the top bar of the editor: </>

Good Point :metal:

So the correct filter text is:

(Send: (N\d+\s+)?M105)|(Recv:  == T:.*$)
1 Like

Hi there..
I'm having exactly the same issue here, but your solutions are beyond my understanding. I'm an inexperienced old-guy.
I thought I was following along at the beginning of the post, but you lost me with language and code I don't understand (yet).

Would someone please be willing to translate or clarify what the solution was to enabling the "Suppress Temperature Messages", and how I can do the same to mine?

Ender 5 Plus, Marlin firmware, Raspberry Pi4 running OctoPi + Octodash. My temperature report is identical with the "extra =="
My knowledge base takes me as far as accessing the Pi through Putty, but I don't really know what to do from there for this issue.

Very much appreciate any help.

Recv: == T:23.32 /0.00 == B:21.52 /0.00 @:0 B@:0
Recv: == T:23.40 /0.00 == B:21.60 /0.00 @:0 B@:0
Recv: == T:23.44 /0.00 == B:21.56 /0.00 @:0 B@:0
Recv: == T:23.36 /0.00 == B:21.60 /0.00 @:0 B@:0
Recv: == T:23.36 /0.00 == B:21.60 /0.00 @:0 B@:0
Recv: == T:23.40 /0.00 == B:21.72 /0.00 @:0 B@:0
Recv: == T:23.44 /0.00 == B:21.52 /0.00 @:0 B@:0
Recv: == T:23.36 /0.00 == B:21.48 /0.00 @:0 B@:0
Recv: == T:23.48 /0.00 == B:21.60 /0.00 @:0 B@:0
Recv: == T:23.40 /0.00 == B:21.64 /0.00 @:0 B@:0
Recv: == T:23.40 /0.00 == B:21.52 /0.00 @:0 B@:0
Recv: == T:23.32 /0.00 == B:21.52 /0.00 @:0 B@:0
Recv: == T:23.40 /0.00 == B:21.60 /0.00 @:0 B@:0

If the only downside to this temperature report is that the terminal output doesn't suppress these reports when the box is checked, then the solution is to change the regex in OctoPrint settings (the wrench icon), Terminal Filters. You do this through your browser.

The filter text to use is listed in the post just above yours, @frybr. You should be able to cut and paste.

1 Like

Thanks for very much for your reply. Was tied up at work, and just trying this now.

I tried copy/pasting the text into the Terminal Filter:
"(Send: (N\d+\s+)?M105)|(Recv: == T:.*$)"

and the text in this thread with the extra space:
"(Send: (N\d+\s+)?M105)|(Recv: == T:.*$)"

Neither had the desired affect of suppressing the temperature messages. I understand this certainly isn't critical functionality for the program, but just a little nuisance.
As a beginner, I don't know where to look or ask next.
Any suggestions are greatly appreciated.

The regex had a extra space. There should only be one space on either side of the ==.
This is the corrected regex: (Send: (N\d+\s+)?M105)|(Recv: == T:.*$).

I need a tool to help me figure out regex strings. I found this one which I like because it explains what the regex is supposed to do, has a quick reference, and allows you to select the flavor (use Python) of regex (there's subtle differences between them).

(Send: (N\d+\s+)?M105)|(Recv: == T:.*$)
1st Alternative (Send: (N\d+\s+)?M105)
1st Capturing Group (Send: (N\d+\s+)?M105)
Send:  matches the characters Send:  literally (case sensitive)
2nd Capturing Group (N\d+\s+)?
? Quantifier — Matches between zero and one times, as many times as possible, giving back as needed (greedy)
N matches the character N literally (case sensitive)
\d+ matches a digit (equal to [0-9])
+ Quantifier — Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
\s+ matches any whitespace character (equal to [\r\n\t\f\v ])
+ Quantifier — Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
M105 matches the characters M105 literally (case sensitive)
2nd Alternative (Recv: == T:.*$)
3rd Capturing Group (Recv: == T:.*$)
Recv: == T: matches the characters Recv: == T: literally (case sensitive)
.* matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
$ asserts position at the end of a line
Global pattern flags
g modifier: global. All matches (don't return after first match)
m modifier: multi line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)
Match 1
Full match	0-48	Recv: == T:23.32 /0.00 == B:21.52 /0.00 @:0 B@:0
Group 3.	0-48	Recv: == T:23.32 /0.00 == B:21.52 /0.00 @:0 B@:0
Search reference
(Send: (N\d+\s+)?M105)|(Recv: == T:.*$)
Recv: == T:23.32 /0.00 == B:21.52 /0.00 @:0 B@:0
insert your replacement value here

Actually, for the terminal filters these are all done client side so the correct one would be JavaScript in this instance.

Opps... Fortunately in this case, the regex is the same in both flavors.

1 Like

Thanks again for your assistance. Unfortunately "(Send: (N\d+\s+)?M105)|(Recv: == T:.*$)" also had no change in the temperature feed or filtering.
I'm literally stabbing in the dark with no idea myself.
It is very much an entirely new language for me, and I don't even know what this language is called at this point :laughing:.

I'll have to learn much more before I can do any real troubleshooting or make an informed comment or form logical question.
Your reference to "regex" is the first time I'm hearing that word, and don't know what it means. I've never had exposure to any of this language before now.

Your efforts are very much appreciated, but I think you're offering advice to someone that doesn't know what to do with it.

Not sure if this makes any difference, but this is the current RegExp thing text before changing it. All might as well be hieroglyphs to me.

(Send: (N\d+\s+)?M105)|(Recv:\s+(ok\s+((P|B|N)\d+\s+))?(B|T\d):\d+)

It appears to work for me, see demo here:

Regex is a beast of a thing, very powerful but at the same time incredibly confusing. The only way I have managed to make it work is using an online tool, Not suggesting you learn regex, but I would wonder why it works in the online tool. Please absolutely double check you have it right, if not upload a serial.log file with the commands that need to be suppressed in the terminal within, and we will see if there are some differences.

Relevant gif was posted on the OctoPrint discord server the other day:

RegEx == Regular Expression. They are quite cryptic when you first encounter them but sites like Regex101 will help demystify them. With that site you can put in your regex and your test string and it will tell you what the regex is expecting, what it finds and you can probably fix it.

I would fix it but I don't have the test strings from your serial.log files.

Dear all,

thanks for the work so far. I am using an Ender 3 v2, firmware 1.0.2 (stock, got it some days ago) and I am facing the double temperature readings in the terminal. The plot itself is running fine for me thanks to :heart:

I hope you can help with the Terminal problem, too because I am not sure how to use the Regex101 properly. Therefore, please find attached my serial.log

Also, can you help me understand why I am getting delayed double Recvs? Your help would be greatly appreciated!


serial.log (10.7 KB)

Edit: Played around with the parameters a bit and found this to work for me:

(Send: (N\d+\s+)?M105)|(Recv: TT::.*$)

However, I am not happy with the final result due to the "double Revs". If I interpret it correctly, then the [...] hides the temperature readings but the next double Recv arrives and "resets" the filter. I was hoping to get only one [...] throughout until the next non-temperature reading/command arrives. Any thoughts here?



(Send: (N\d+\s+)?M105)|(Recv:\s+TT::.*$)|(Recv:\s*$)
1 Like