-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]:Printer does not turn off after the idle period #361
Comments
This issue has been automatically marked as stale because it has not had activity in 14 days. It will be closed if no further activity occurs in 7 days |
Sometimes I also observe that described behaviour, but isn't needed to print something. Just turn on the plug, connect and wait should turn off the printer. But it's not present everytime, so I can't reproduce it yet. M81 in terminal does not turn off the plug. |
Both of you need to share screenshots of your settings please. For M81 to work you have to include the IP address of the plug you want to turn off. |
@lethuer for gcode to work you have to enable the gcode trigger option. |
Awesome ! That works immediately if I send this manually in terminal :) Now let me ask: After Idle time I can't observe M81 command in the terminal. |
You could do that in your end gcode of your slicer or in OctoPrint's gcode script section. Can't remember if sending the wait for temp command will block until the temp is reached and then allow power off. |
I also configured @TPLINKOFF code in section of cancelling a print.
|
I tried again and now received this:
I think the problem was that in my previous post I used @TPLINKOFF 192.168.178.46 instead of M81 192.168.178.46 in gcode section. So now M81 was sent which I can observe in the terminal. |
Based on your printer response to m81 I suspect the other option of using @TPLINKOFF command would be better. Also, typically what I see with gcode processing is that the delay isn't long enough to allow the final commands from the file to clear the printing buffer. If you want me to assist further I need you to enable debug logging in the plugin's settings and restart OctoPrint. After attempting and it fails share plugin_tplinksmartplug_debug.log. That will help determine what the plugin is doing. |
But I didn't observe any command is sent if @TPLINKOFF was set up in gcode script section
Logging was active the hole time, here is the file also containing yesterday evening. Can you work with that ? 1st try with @TPLINKOFF |
I missed that option in plugin settings, so here is another try... Nothing configured in gcode script section terminal:
M81 configured in gcode script section terminal:
@TPLINKOFF configured in gcode script section terminal output: Again I didn't observe any command is sent if @TPLINKOFF was set up in gcode script section
The log file: |
ok, so idle timeout is working properly. honestly that's the preferred approach as it will account for temperatures to be below a certain threshold before powering off. It's normal to not see @ commands in the terminal, because those aren't sent to the printer, they are specifically used internally by OctoPrint. It is strange that it doesn't work as expected. Based on your comment you added that command to OctoPrint's on cancel gcode script? |
Yes this time it worked like it should but in the past I had problems with it...
|
Thanks I'll do some additional testing with gcode scripts being used to trigger. There's a chance that those commands might not go through the processing queue like the file commands do that the plugin is using to do the work. |
Hi ! I again observe this issue that printer does not turn off after printing... |
Sorry, no, my focus has been on one of the many other plugins I maintain lately. Did you still have debug logging enabled? Could you share an updated log file if so. Also, by chance are you running the current stable version or the latest rc version? |
Here is an updated log file, print finished at 21:15 |
Did you happen to restart OctoPrint after the change? |
Yes sure :) |
ok, had a chance to look at the actual log and noticed this...
but that was way after the idle timeout, any errors in octoprint.log? what version are you running of the plugin? I just tested on my OctoPrint instance and powered on the printer from the button, it auto-connected and after the 3 minute timeout I got the message in the UI to allow me to cancel the power off if I wanted to and then it powered off. |
Yes. this is also working for me but the printer does not turn off after a print. This were the settings of the print today: And the tp link log file: Print was started at 16:33 and finished at 19:48. Also I have enabled this one for logging: I'm not really sure what to search for. The file is to large to upload here, but here is a download link: |
let's see if the issue persists in the current rc version. in OctoPrint's software update settings change the release channel for the plugin to |
I reproduced the observed bahavior and created a log file with "Drucker Anzeige" set on where tp link didn't switch off after print. Here is the tp link log from that aswell Last message regarding idle timer I can find is this at printing start
|
Ignoring M117 commands does not help |
Also ignoring M118 commands does not help. |
Yep, I tried exactly like that. |
Just for Information: I activated ssd1306 plugin again which also should send M117 messages. With that active tp link does also switch off after print. https://plugins.octoprint.org/plugins/ssd1306_oled_display/ Or did I understand it wrong and this plugin does not send M117 ? |
That plugin will display M117 messages not generate them. Enable serial logging in the firmware settings of OctoPrint, that's will show us what actually is being sent and received from printer. |
Also, you entered it exactly like that, with no spaces between any characters? |
Again I made a test with a space in between, again it does not turn off. Last M117 message of regular printing:
So I will do following things:
|
Yes, this makes sense to me. The whole input field is split by comma only, not come and space. I have an idea on how to fix that, but am away on vacation right now. |
Just released 1.0.4rc5 with a fix for the space issue. |
tested and works for me ! |
@Anathema-Device did you happen to also have the DisplayLayerProgress plugin installed in OctoPrint? |
Did you really mean @Anathema-Device ? I have DisplayLayerProgress installed but without "Drucker Anzeige" and now your fix for spaces in field for ignored g code commands just seem to work :) |
Yes, they're the one that originally posted this issue. |
Not specifically, I did see that one plugin was writing messages to the terminal after printing had finished and I just nuked that one, so now I just have the basic set of stuff, Marlin docs and plugins specific to the printer. I have not been relying on the TP Link plugin to shut things down and try and walk over and push the button on the smartplug to turn it on or off. This should be a list of the plugins that I currently have and the terminal is quiet now when the print is done but I will admit that I have not checked out the log to see if there was any messages saying why it does not turn off automatically 15 mins after the print is finished. Plugin Licenses BTW, sorry about the slow response I did do the email reply thing but it seems that my email is not sending for some reason, just another issue to figure out, grrr ... |
Just took a second look at your debug log @Anathema-Device and your issue I think is related to this line...
I believe you would also benefit from the latest RC version and adding X5 to the added ignore heaters list. Similar to what's described in #336 |
OK, thanks, I will get the rc version and see if it helps. I notice that Octoprint seems to find 8 heaters (0-5 plus X and the bed). Since the UI only shows heaters 0-4 should I also add 5 to the exclude list or is 5 (tool5) and X5 the same thing? [2024-12-07 08:48:12,429] DEBUG: Idle timeout reached after 10 minute(s). Turning heaters off prior to powering off plugs. |
Do you have 5 heads? If so your printer profile settings in OctoPrint should be set that way to show all the heaters in the UI. Since it's detecting that tool5 as already off I don't think it's necessary to also add it. Do you have a XL printer? Might need to add X1,X2,X3,X4,X5 to the ignore list. |
I got the new code and put X,X5,tool5 in the heater exclude list and it seemed to power off from just sitting and not having been run. With the improved logging (thanks!) I see that there is a whole raft of other "heaters" so I should probably add A and all the B_* heaters to the exclude list but it seems to turn off now. 2024-12-07 14:23:56,399] DEBUG: Idle timeout reached after 10 minute(s). Turning heaters off prior to powering off plugs. |
You do want to leave the B ones, those are actually the different bed segments on your printer and you want those to cool down before petting off I suppose. |
OK, I left the B_* but added the A heater to the ignore list and it seemed to work OK. That is, if I turn the machine on then it will turn off after the idle time, yay! Then I deleted the log to start a clean one and ran a real print. The print completed just fine but the machine was still on this morning, sigh. Is there something that I need to put in the end Gcode to say that the job is finished and to power down? |
Share the new log, there shouldn't be anything necessary added for idle timeout to work. |
Left running last night it shows this now, I have changed the exclude list to include X, A, and X1 through X5 as well as tool5. It does not seem to try again, just shows the poll messages. ... |
Yep, I assumed this would happen and require all of them to be added. Try toggling the power manually from the button in OctoPrint and see then if the idle off works. |
Just cycling the power with the switch seemed to work fine before, and this time too. I've added all the things and it is running now, likely into the evening so we'll see if it turns off or now. FWIW, I notice that if I start something from the printer USB drive the Octoprint seems stuck in some "finishing" state when the print completes but that is a base Octoprint issue it would seem. |
That stuck in finishing state will basically never trigger the idle power off timer. |
Well, glory be, it finally worked. Yesterday it failed again whinging about heater X0. This got me wondering if there was a way to just ignore the heaters entirely? In any case the ignore string that I used is tool5,A,X,X0,X1,X2,X3,X4,X5. Octoprint gets confused as Prusa goes by T1 to T5 and Octoprint uses heater .0 through heater 4. My next challenge is to figure out what causes Octoprint to think that the printer is still "Finishing" after printing from the USB. |
Describe the bug
Configuring the printer to be turned off after a 30 minute idle time does not seem to result in it being turned off. The printer can be turned off and on with the icon that the plugin puts in the Octoprint toolbar but does not turn off when the printer is idle
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The TPLink smart plug should be turned off after the idle time
Desktop (please complete the following information):
plugin_tplinksmartplug_debug.log
The text was updated successfully, but these errors were encountered: