Temperature reporting now working with new ender 3 V2

Hello,
Installed and connected octoprint to my new ender 3 V2. everything smooth, great !
There is just a small problem, the temperature reported by the printer doesn't show on the display.

It looks like the terminal codes reports are not standard.

2020-06-14 09:04:21,533 - serial.log is currently not enabled, you can enable it via Settings > Serial Connection > Log communication to serial.log
2020-06-14 09:14:53,639 - Enabling serial logging
2020-06-14 09:14:54,667 - Recv:   TT::27.9327.93  //0.000.00  BB::39.6739.67  //0.000.00  @@::00  BB@@::00
2020-06-14 09:14:54,667 - Recv: 
2020-06-14 09:14:56,667 - Recv:   TT::27.7827.78  //0.000.00  BB::39.6339.63  //0.000.00  @@::00  BB@@::00
2020-06-14 09:14:56,670 - Recv: 
2020-06-14 09:14:58,667 - Recv:   TT::27.7627.76  //0.000.00  BB::39.6039.60  //0.000.00  @@::00  BB@@::00
2020-06-14 09:14:58,668 - Recv: 
2020-06-14 09:15:00,667 - Recv:   TT::27.7827.78  //0.000.00  BB::39.4839.48  //0.000.00  @@::00  BB@@::00
2020-06-14 09:15:00,667 - Recv: 
2020-06-14 09:15:02,667 - Recv:   TT::27.7627.76  //0.000.00  BB::39.3539.35  //0.000.00  @@::00  BB@@::00
2020-06-14 09:15:02,669 - Recv: 
2020-06-14 09:15:04,667 - Recv:   TT::27.7627.76  //0.000.00  BB::39.3339.33  //0.000.00  @@::00  BB@@::00
2020-06-14 09:15:04,667 - Recv: 
2020-06-14 09:15:04,830 - Send: M104 S180
2020-06-14 09:15:04,834 - Recv: ok
2020-06-14 09:15:06,668 - Recv:   TT::27.8127.81  //180.00180.00  BB::39.3339.33  //0.000.00  @@::127127  BB@@::00
2020-06-14 09:15:06,668 - Recv: 
2020-06-14 09:15:06,926 - Send: M140 S60
2020-06-14 09:15:06,930 - Recv: ok
2020-06-14 09:15:08,668 - Recv:   TT::28.6428.64  //180.00180.00  BB::39.3839.38  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:08,669 - Recv: 
2020-06-14 09:15:10,668 - Recv:   TT::30.9130.91  //180.00180.00  BB::39.7539.75  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:10,669 - Recv: 
2020-06-14 09:15:12,668 - Recv:   TT::34.3234.32  //180.00180.00  BB::40.2840.28  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:12,668 - Recv: 
2020-06-14 09:15:14,668 - Recv:   TT::38.6538.65  //180.00180.00  BB::40.6440.64  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:14,669 - Recv: 
2020-06-14 09:15:16,668 - Recv:   TT::43.0943.09  //180.00180.00  BB::41.1841.18  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:16,668 - Recv: 
2020-06-14 09:15:18,668 - Recv:   TT::48.3948.39  //180.00180.00  BB::41.7641.76  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:18,668 - Recv: 
2020-06-14 09:15:20,668 - Recv:   TT::53.3753.37  //180.00180.00  BB::42.3542.35  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:20,668 - Recv: 
2020-06-14 09:15:20,961 - Send: M104 S100
2020-06-14 09:15:20,965 - Recv: ok
2020-06-14 09:15:22,668 - Recv:   TT::58.8758.87  //100.00100.00  BB::42.9442.94  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:22,668 - Recv: 
2020-06-14 09:15:24,668 - Recv:   TT::63.8963.89  //100.00100.00  BB::43.5143.51  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:24,670 - Recv: 
2020-06-14 09:15:26,668 - Recv:   TT::68.8668.86  //100.00100.00  BB::44.1244.12  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:26,670 - Recv: 
2020-06-14 09:15:28,179 - Send: M104 S190
2020-06-14 09:15:28,183 - Recv: ok
2020-06-14 09:15:28,668 - Recv:   TT::74.2374.23  //190.00190.00  BB::44.7144.71  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:28,669 - Recv: 
2020-06-14 09:15:30,668 - Recv:   TT::79.0979.09  //190.00190.00  BB::45.2645.26  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:30,670 - Recv: 
2020-06-14 09:15:32,667 - Recv:   TT::84.1984.19  //190.00190.00  BB::45.7945.79  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:32,668 - Recv: 
2020-06-14 09:15:34,668 - Recv:   TT::88.7188.71  //190.00190.00  BB::46.3246.32  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:34,669 - Recv: 
2020-06-14 09:15:36,667 - Recv:   TT::93.6193.61  //190.00190.00  BB::46.8646.86  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:36,668 - Recv: 
2020-06-14 09:15:38,667 - Recv:   TT::98.0298.02  //190.00190.00  BB::47.4247.42  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:38,668 - Recv: 
2020-06-14 09:15:40,668 - Recv:   TT::102.71102.71  //190.00190.00  BB::47.9947.99  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:40,668 - Recv: 
2020-06-14 09:15:42,667 - Recv:   TT::106.85106.85  //190.00190.00  BB::48.5748.57  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:42,668 - Recv: 
2020-06-14 09:15:44,667 - Recv:   TT::111.35111.35  //190.00190.00  BB::49.0149.01  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:44,668 - Recv: 
2020-06-14 09:15:46,668 - Recv:   TT::115.41115.41  //190.00190.00  BB::49.4949.49  //60.0060.00  @@::127127  BB@@::127127
2020-06-14 09:15:46,668 - Recv: 
2020-06-14 09:15:48,532 - Send: M104 S0
2020-06-14 09:15:48,536 - Recv: ok
2020-06-14 09:15:48,667 - Recv:   TT::119.70119.70  //0.000.00  BB::50.0750.07  //60.0060.00  @@::00  BB@@::127127
2020-06-14 09:15:48,667 - Recv: 
2020-06-14 09:15:50,395 - Send: M140 S0
2020-06-14 09:15:50,399 - Recv: ok
2020-06-14 09:15:50,666 - Recv:   TT::123.46123.46  //0.000.00  BB::50.5150.51  //0.000.00  @@::00  BB@@::00
2020-06-14 09:15:50,667 - Recv: 
2020-06-14 09:15:52,666 - Recv:   TT::126.46126.46  //0.000.00  BB::50.8950.89  //0.000.00  @@::00  BB@@::00
2020-06-14 09:15:52,667 - Recv: 
2020-06-14 09:15:54,666 - Recv:   TT::127.97127.97  //0.000.00  BB::50.9250.92  //0.000.00  @@::00  BB@@::00
2020-06-14 09:15:54,667 - Recv: 
2020-06-14 09:15:56,666 - Recv:   TT::128.47128.47  //0.000.00  BB::50.9150.91  //0.000.00  @@::00  BB@@::00
2020-06-14 09:15:56,669 - Recv: 
2020-06-14 09:15:58,666 - Recv:   TT::128.28128.28  //0.000.00  BB::50.9150.91  //0.000.00  @@::00  BB@@::00
2020-06-14 09:15:58,667 - Recv: 
2020-06-14 09:16:00,666 - Recv:   TT::127.50127.50  //0.000.00  BB::50.8550.85  //0.000.00  @@::00  BB@@::00
2020-06-14 09:16:00,667 - Recv: 
2020-06-14 09:16:01,684 - Disabling serial logging

I run on an Ubuntu in docker and it's the latest version of octoprint.
Is it a bug, a malformed response or did I miss something ?
Thanks for your help

Creality's ability to find new ways to mess with the Marlin firmware is beyond comprehension.

To make sure we have the correct data, please enable your serial.log (<- link) and provide it along with the rest of the information requested:

Need help? Read this first! Remember to provide version numbers, relevant log files and general information about your setup. Problem solved? Mark the solution! WE NEED LOGS TO HELP YOU!

1 Like

Thanks for your answer @b-morgan but I do not understand, I provided the serial.log in my post... :thinking:

Hello,
Launched a test print ... and SURPRISE !! :grimacing: the temps are displaying once the gcode is launched.!
So, only the temp reporting when not currently printing are not displayed.
Seems that Octoprint cannot make use of the temps sent by The Ender 3 when idle.
Thanks for your help.

You provided what appears to be the contents of the serial.log file, but not the file itself. I want to make sure that what you provided is exactly what's in the file because it looks odd.

It may be possible to convert this "non-standard" temperature report into something OctoPrint understands with a plugin. If I write one, you will have to test (debug) it because I don't own an ender 3 V2.

Another possibility is to flash a more compatible version of Marlin. One place to find such firmware is https://www.th3dstudio.com/.

Hello,
It was the CC of it, but here is the complete file.
serial.log.zip (1.0 KB)
As for the Firmware, I already had a look at how to flash a new one, but I do not own an arduino.
There is also the new "big screen" interface, not sure it would be supported by actual firmwares other than the ones of Creality.

As for not owning an Arduino, see https://www.th3dstudio.com/product/arduino-uno-bootloader-flashing-kit/.

I missed your post about it working once the gcode is launched. I wrote a plugin to fix the (now idle only) reports which I'll include here just because it is ready for testing. It goes in the ~/.octoprint/plugins directory and its output will appear in octoprint.log if you enable debug logging (see the Setup, Logging tab in OctoPrint). Ender3V2TempFix.zip (915 Bytes)

Feel free to ignore it. Report back (via the log file) if it works or not.

1 Like

Thanks a lot @b-morgan b-morgan.
For testing, unfortunately, I run octoprint in a docker, so i cannot add this file, because (as far as I known , a docker is read only).
I will test it once it will be added in the next release.
I think there will be other that will welcome this, as the ender 3 V2 is really an amazing machine.

Hello,
I have the same problem with my Ender3v2. Indeed the temp are only displayed after the print start. I did a preheat before that and temp were not displayed.

I tried the fix provided by @b-morgan but it doesn't seem to work. Here's my octoprint.log (423.3 KB) and my serial.log (303.2 KB)

Seems there's an error in the plugin's code:

2020-06-17 09:47:15,506 - octoprint.plugin.core - ERROR - Invalid syntax in /home/pi/.octoprint/plugins/Ender3V2TempFix.py for plugin Ender3V2TempFix

Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 599, in _parse_metadata
    root = ast.parse(f.read(), filename=path)
  File "/usr/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "/home/pi/.octoprint/plugins/Ender3V2TempFix.py", line 42
    "octoprint.comm.protocol.gcode.received": __plugin_implementation__.check_for_temp_report
                                           ^
SyntaxError: invalid syntax

For copying the files from the host to the docker container :

First, set the path in your localhost to where the file is stored.
Next set the path in your docker container to where you want to store the file inside your docker container.
Then copy the file which you want to store in your docker container with the help of CP command. 

ex: sudo docker cp /home/(name)/(folder_name)/(file_name) (container_id):/(to_the_place_you_want_the_file_to_be)

source

You are correct, the plugin has errors. That's what I get for having two versions, one to test on my TAZ 6 and one that should work on an Ender 3 V2. I didn't copy my fixes from one to the other. Try this one:
Ender3V2TempFix.zip (915 Bytes)

If you want to see the debug output, please to go to Settings, Logging, and under Logging Levels, add Ender3V2TempFix at the DEBUG level.

Edit: I have replaced the .zip file with a working version as verified by @noirvent

Thanks for your answer. It still doesn't work.
Here's the octoprint.log (1.4 MB)

2020-06-17 17:30:46,632 - octoprint.util.comm - ERROR - Error while processing hook Ender3V2TempFix:
Traceback (most recent call last):
 File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2849, in _readline
   ret = hook(self, ret)
 File "/home/pi/.octoprint/plugins/Ender3V2TempFix.py", line 21, in check_for_temp_report
   new_line = (" T:%s.%s /%s.%s B:%s.%s /%s" % (m.group(1), m.group(2), m.group(3), m.group(4), m.group(5), m.group(6), m.group(7), m.group(8)))
TypeError: not all arguments converted during string formatting
2020-06-17 17:30:48,625 - octoprint.plugins.Ender3V2TempFix - DEBUG - Original:   TT::131.18131.18  //0.000.00  BB::50.4550.45  //50.0050.00  @@::00  BB@@::00

Is it normal there's 8 "m.group" param passed but only 7 %s in the string ?

Is it normal there's 8 "m.group" param passed but only 7 %s in the string ?

That was it. I added the missing %s corresponding to the 8th capture group and it parse now.
Thanks a lot !

Here's the file modified Ender3V2TempFix.zip (913 Bytes)

btw what's the meaning of the @ and B@ that are completly ignored at the end of the parsing line ?

Thanks for fixing the plugin. That line was one that I couldn't test without the actual hardware.

That's a very good question and I don't know the answer! What I do know is that part of the line seems to be ignored by everyone. I haven't found any documentation so I guess spending some time studying the Marlin source code would be necessary to figure it out.

Even worse, I'm not sure how to parse that part of the line. The first portion was a weird doubling of the values but because there were two decimal points, I could just ignore the part in the middle. The last part would need to do something like capture the string of digits, count how many, and then keep the first half of them and throw away the rest.

I have edited both of my messages with .zip files in them by replacing the .zip file with the fixes discovered by @noirvent (and I bumped the version number).

I did some quick research because I was curious. I found here: https://reprap.org/wiki/G-code

 T, T0, ..., Tn - extruder temperature. In a single extruder setup, only T will be reported. Some firmware variants will report no T0 in multi extruder setups - in that case T is to be considered the temperature of the first tool. Otherwise, T should be considered the temperature of the currently selected tool (which will be repeated in one of the Tn entries)
B - bed temperature
C - chamber temperature
@ - Hotend power (Prusa only)
B@ - Bed power (Prusa only)
P - PINDAv2 actual (Prusa MK2.5/s MK3/s only)
A - Ambient actual (Prusa MK3/s only)

Apparently, it's not "Prusa only" since creality seems to report too, but it's not really useful in our case

Extremely new to octopi but also just got a v2, and was trying to get the tasmota switch to turn off the printer after the print was completed and wasn't able to. Noticed that it appears that octoprint was not updating the temperature after the print was complete, so octoprint was wait for the temp to drop below a certain threshold to turn the switch off, but it never happened.

I think this might fix that issue, but I'm a bit confused on how to get it to octopi. I've tried to upload it through the plugin manager but it errors out and does not install.

Is there anyway to get it integrated into octopi?

I also think it might fix it. Changes are coming to the OctoPrint Plugin Manager to allow single file plugins but I have not integrated the plugin in this thread yet. In any case, it almost certainly will not get integrated into core OctoPrint (integrated into OctoPi doesn't make sense, see https://community.octoprint.org/t/what-is-the-difference-between-octoprint-and-octopi-are-they-the-same-thing/185).

In the meantime, download the .zip file and extract its contents into the ~/.octoprint/plugins directory on your RPi. First, you will need to connect to your RPi using SSH. The following link can help with that.

How to Use SSH on Your Raspberry Pi

Learn how to SSH into the Raspberry Pi in just a few short steps. Scroll down and start with the Connecting to Your Raspberry Pi over SSH part. The first part is already done for you in the OctoPi image.

If you are using a Windows Desktop, I recommend WinSCP in addition to PuTTY. WinSCP provides a graphical UI for transferring files (over SSH) and will make adding this plugin easier.

Learning a little bit of Linux is going to be a big help in your 3D Printing experience. Let us know if you still need help after absorbing some of this.

Thank you, I had some exposure to Linux a LOOOOONGGG time ago, kinda amusing I still have putty and scn on my laptop from those days.

Thank you for taking the time to explain it again, I'm sure you've had to do that countless times.

In checking the file directly it appears that my plugin directory is on a slightly different path. mjpg-streamer/plugins, would that be correct? Under Octoprint all I have is a readme.txt

Uploaded the file into /mjpg-streamer/plugins, and unfortunately it looks like Octoprint will report the temperature while the print is occurring, but when it finishes there is no update to the temperature. The graph under the temperature tab shows that the target T and the bed have been switched off, but the actual T and Actual bed are stopped at the temperature of the print.

If I refresh the Octoprint instance, the graph still reads the temperature that was when the print finished, but down in the table the actual temp is 0.0.