Temperature reporting now working with new ender 3 V2

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.

1 Like

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.

The username is pi and the password is what you (hopefully) changed it to. Using these credentials in PuTTY (and/or WinSCP) should put you into the /home/pi (also known as ~) directory. The plugin .py file goes in the ~/.octoprint/plugins directory. Directories that start with a period are "hidden" but can be seen with "ls -a" in the PuTTY terminal or by setting Show Hidden in WinSCP Preferences.

After placing the file in the correct location, OctoPrint must be restarted. During that process, it will find and install the plugin(s) placed in that directory.

Files in /mjpg-streamer/plugins may augment the camera, but will do nothing for OctoPrint.