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.

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:.*$)
2 Likes

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:.*$)
"
gm
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, https://regex101.com. 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

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 https://community.octoprint.org/t/temperature-reporting-now-working-with-new-ender-3-v2/21053/58 :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!

Best
GtrAngus

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?

Recv:
[...]
Recv:
[...]
Recv:
[...]
Recv:
[...]
Recv:

Try

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

That did the trick, no more temperature entries.. Thank you, thank you, thanks you

1 Like

I tried that with my Ender 5+, and it didn't work. Here's a sample temperature line:
Recv: == T:215.47 /215.00 == B:55.09 /55.00 @:46 B@:127

When I use https://regex101.com/ and input the quoted regular expression and the sample temperature line you supplied, I get a match.

Not sure what to say except "it works for me". Verify that the regular expression you entered into OctoPrint is exactly as shown. Copy and paste it into the regex101 site, select Python as the Flavor, cut and paste your sample line and see what it says.