Skip to content
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

Closed
Anathema-Device opened this issue Mar 17, 2024 · 68 comments
Closed

[BUG]:Printer does not turn off after the idle period #361

Anathema-Device opened this issue Mar 17, 2024 · 68 comments
Labels
bug Something isn't working

Comments

@Anathema-Device
Copy link

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:

  1. Enable the checkbox to turn off on idle
  2. Set the idle delay to be 30 minutes
  3. Print something
  4. Wait for it to turn off and nothing happens.

Expected behavior
The TPLink smart plug should be turned off after the idle time

Desktop (please complete the following information):

  • Windows 11
  • Brave
  • OctoPrint Version : current release
  • Plugin Version : current version

plugin_tplinksmartplug_debug.log

Copy link

github-actions bot commented Apr 1, 2024

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

@github-actions github-actions bot added the stale issues without activity label Apr 1, 2024
@lethuer
Copy link

lethuer commented Apr 1, 2024

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.
My idle time is set to 3min...
Also not switching off after a print and reaching idle temperature...

But it's not present everytime, so I can't reproduce it yet.
Often after restarting OctoPrint (or System ?!) it's working again...
Any recommendations ?

M81 in terminal does not turn off the plug.
Shouldn't that be the case ?
Lightning button is working as expected.
HS110 with Firmware 1.0.6

@jneilliii
Copy link
Owner

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.

@jneilliii jneilliii removed the stale issues without activity label Apr 1, 2024
@lethuer
Copy link

lethuer commented Apr 1, 2024

Here are my settings.
image
image

For M81 I included the ip address...
But the plug didn't switched off.

In terminal:
Send: M81 192.168.178.46 Recv: M106 P0 S0 Recv: //action:notification Artillery Genius (lethuer) OFF. Recv: ok P15 B3
image

In log file:
[2024-04-01 16:25:45,237] DEBUG: Received M81 command, attempting power off of 192.168.178.46. [2024-04-01 16:25:45,242] DEBUG: {'autoConnect': True, 'autoConnectDelay': 10, 'autoDisconnect': True, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': True, 'btnColor': '#808080', 'countdownOffDelay': 1, 'countdownOnDelay': 1, 'currentState': 'off', 'displayWarning': True, 'emeter': {'get_realtime': {'current_ma': 13, 'err_code': 0, 'power_mw': 0, 'total_wh': 358, 'voltage_mv': 231418}}, 'event_on_disconnect': False, 'event_on_error': True, 'event_on_shutdown': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeCmdOff': False, 'gcodeCmdOn': False, 'gcodeEnabled': False, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'gcodeRunCmdOff': '', 'gcodeRunCmdOn': '', 'icon': 'icon-bolt', 'ip': '192.168.178.46', 'label': '3D Drucker', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': True, 'useCountdownRules': False, 'warnPrinting': True} [2024-04-01 16:27:58,798] DEBUG: resetting idle timer due to ClientOpened event.

Log file manual clicking lightning button for turning off (works):

[2024-04-01 16:37:01,151] DEBUG: Turning off 192.168.178.46. [2024-04-01 16:37:01,152] INFO: Turning off 192.168.178.46 at 2024-04-01 16:37:01.150941 [2024-04-01 16:37:01,157] DEBUG: {'autoConnect': True, 'autoConnectDelay': 10, 'autoDisconnect': True, 'autoDisconnectDelay': 0, 'automaticShutdownEnabled': True, 'btnColor': '#808080', 'countdownOffDelay': 1, 'countdownOnDelay': 1, 'currentState': 'off', 'displayWarning': True, 'emeter': {'get_realtime': {'current_ma': 13, 'err_code': 0, 'power_mw': 0, 'total_wh': 358, 'voltage_mv': 231418}}, 'event_on_disconnect': False, 'event_on_error': True, 'event_on_shutdown': False, 'event_on_startup': False, 'event_on_upload': False, 'gcodeCmdOff': False, 'gcodeCmdOn': False, 'gcodeEnabled': False, 'gcodeOffDelay': 0, 'gcodeOnDelay': 0, 'gcodeRunCmdOff': '', 'gcodeRunCmdOn': '', 'icon': 'icon-bolt', 'ip': '192.168.178.46', 'label': '3D Drucker', 'sysCmdOff': False, 'sysCmdOffDelay': 0, 'sysCmdOn': False, 'sysCmdOnDelay': 0, 'sysRunCmdOff': '', 'sysRunCmdOn': '', 'thermal_runaway': True, 'useCountdownRules': False, 'warnPrinting': True} [2024-04-01 16:37:01,284] DEBUG: IP 192.168.178.46 is valid. [2024-04-01 16:37:01,293] DEBUG: Sending command {'system': {'set_relay_state': {'state': 0}}} to 192.168.178.46 [2024-04-01 16:37:01,374] DEBUG: «��-ý"system":{"set_relay_state":{"err_code":0}}} [2024-04-01 16:37:01,400] DEBUG: 0 [2024-04-01 16:37:01,401] DEBUG: Checking status of 192.168.178.46.

@jneilliii
Copy link
Owner

@lethuer for gcode to work you have to enable the gcode trigger option.

@lethuer
Copy link

lethuer commented Apr 1, 2024

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.
If gcode trigger is enabled, is M81 command send automatically and under which conditions ?
Is it possible to send M81 command when a desired nozzle temp is reached after a print ?

@jneilliii
Copy link
Owner

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.

@lethuer
Copy link

lethuer commented Apr 1, 2024

Okay I will try if it is waited until reaching desired nozzle temperature...

Is here the correct location ?
image

@lethuer
Copy link

lethuer commented Apr 1, 2024

I also configured @TPLINKOFF code in section of cancelling a print.
Unfortunately I can't observe in terminal that this is sent.
Not directly after aborting the print and also not when nozzle is reaching 50 degree again.
Maybe because printer has changed it's status to "Operational" directly after "Cancelling" and long before reaching 50 degree ?

Send: N16 M118 P0 A1 action:cancel*14 Recv: //action:cancel Cancelling on request of the printer... Recv: ok N16 P15 B3 Send: N17 M84*41 Recv: ok N17 P15 B3 Send: N18 M104 T0 S0*24 Recv: ok N18 P15 B3 Send: N19 M140 S0*93 Recv: //action:notification Bed Cooling... Recv: ok N19 P15 B3 Send: N20 M106 S0*85 Recv: M106 P0 S0 Recv: ok N20 P15 B3 Changing monitoring state from "Cancelling" to "Operational" [...] Send: M117 L=-/- E=- Recv: ok P15 B3 Connection closed, closing down monitor Changing monitoring state from "Operational" to "Offline"

@lethuer
Copy link

lethuer commented Apr 3, 2024

I tried again and now received this:

Changing monitoring state from "Printing" to "Cancelling" Send: N15 M108*30 Recv: ok N14 P15 B3 Recv: ok N15 P15 B3 Send: N16 M117 L=-/83 E=-*62 Recv: ok N16 P15 B3 Send: N17 M118 P0 A1 action:cancel*15 Recv: //action:cancel Cancelling on request of the printer... Recv: ok N17 P15 B3 Send: N18 M84*38 Recv: ok N18 P15 B3 Send: N19 M104 T0 S0*25 Recv: ok N19 P15 B3 Send: N20 M140 S0*87 Recv: //action:notification Bed Cooling... Recv: ok N20 P15 B3 Send: N21 M106 S0*84 Recv: M106 P0 S0 Recv: ok N21 P15 B3 Send: N22 M81 192.168.178.46*29 Recv: M106 P0 S0 Recv: //action:notification Artillery Genius (lethuer) OFF. Recv: ok N22 P15 B3

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.
But nethertheless the plug didn't turned off.
I thought maybe because temperature was higher than needed for idle but tried also aborting a print when nozzle temp was below 50 degree and got the same result.
If I manually type M81 in the terminal the plug switches of immediately, so my assumption is that the plugin does prevent switching off somehow ?

@jneilliii
Copy link
Owner

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.

@lethuer
Copy link

lethuer commented Apr 4, 2024

Based on your printer response to m81 I suspect the other option of using @TPLINKOFF command would be better

But I didn't observe any command is sent if @TPLINKOFF was set up in gcode script section

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.

Logging was active the hole time, here is the file also containing yesterday evening. Can you work with that ?
plugin_tplinksmartplug_debug.log

1st try with @TPLINKOFF
2nd try with M81

@lethuer
Copy link

lethuer commented Apr 4, 2024

I missed that option in plugin settings, so here is another try...
image

Nothing configured in gcode script section
14:39 turn on
14:39 start print
14:41 cancel print (nozzle temp in heating phase about 60 degree)
14:45 plug switches off (idle)

terminal:

Recv: echo:busy: processing
[...]
Changing monitoring state from "Printing" to "Cancelling"
Recv: echo:busy: processing
Send: N15 M108*30
Recv: ok N14 P15 B3
Recv: ok N15 P15 B3
Send: N16 M117 L=-/124 E=15:05*20
Recv: ok N16 P15 B3
[...]
Send: N17 M117 L=-/124 E=-*3
Recv: ok N17 P15 B3
Send: N18 M118 P0 A1 action:cancel*0
Recv: //action:cancel
Cancelling on request of the printer...
Recv: ok N18 P15 B3
Send: N19 M84*39
Recv: ok N19 P15 B3
Send: N20 M104 T0 S0*19
Recv: ok N20 P15 B3
Send: N21 M140 S0*86
Recv: //action:notification Bed Cooling...
Recv: ok N21 P15 B3
Send: N22 M106 S0*87
Recv: M106 P0 S0
Recv: ok N22 P15 B3
Changing monitoring state from "Cancelling" to "Operational"
[...]
Send: M117 L=-/- E=-
Recv: ok P15 B3
Connection closed, closing down monitor
Changing monitoring state from "Operational" to "Offline"

M81 configured in gcode script section
14:46 turn on
14:46 start print
14:48 cancel print (nozzle temp in heating phase about 70 degree)
14:52 plug switches off (idle)

terminal:

Recv: echo:busy: processing
[...]
Changing monitoring state from "Printing" to "Cancelling"
Send: N15 M108*30
Recv: ok N14 P15 B2
Recv: ok N15 P15 B3
Send: N16 M117 L=-/124 E=-*2
Recv: ok N16 P15 B3
Send: N17 M118 P0 A1 action:cancel*15
Recv: //action:cancel
Cancelling on request of the printer...
Recv: ok N17 P15 B3
Send: N18 M84*38
Recv: ok N18 P15 B3
Send: N19 M104 T0 S0*25
Recv: ok N19 P15 B3
Send: N20 M140 S0*87
Recv: //action:notification Bed Cooling...
Recv: ok N20 P15 B3
Send: N21 M106 S0*84
Recv: M106 P0 S0
Recv: ok N21 P15 B3
Send: N22 M81 192.168.178.46*29
Recv: M106 P0 S0
Recv: //action:notification Artillery Genius (lethuer) OFF.
Recv: ok N22 P15 B3
[...]
Changing monitoring state from "Cancelling" to "Operational"
[...]
Send: M117 L=-/- E=-
Recv: ok P15 B3
Connection closed, closing down monitor
Changing monitoring state from "Operational" to "Offline"

@TPLINKOFF configured in gcode script section
14:53 turn on
14:53 start print
14:55 cancel print (nozzle temp in heating phase about 60 degree)
14:58 plug switches off (idle)

terminal output: Again I didn't observe any command is sent if @TPLINKOFF was set up in gcode script section

Recv: echo:busy: processing
Changing monitoring state from "Printing" to "Cancelling"
Send: N14 M108*31
Recv: ok N13 P15 B2
Recv: ok N14 P15 B3
Send: N15 M117 L=-/124 E=15:18*27
Recv: ok N15 P15 B3
Send: N16 M117 L=-/124 E=-*2
[...]
Recv: ok N16 P15 B3
Send: N17 M118 P0 A1 action:cancel*15
Recv: //action:cancel
Cancelling on request of the printer...
Recv: ok N17 P15 B3
Send: N18 M84*38
Recv: ok N18 P15 B3
Send: N19 M104 T0 S0*25
Recv: ok N19 P15 B3
Send: N20 M140 S0*87
Recv: //action:notification Bed Cooling...
Recv: ok N20 P15 B3
Send: N21 M106 S0*84
Recv: M106 P0 S0
Recv: ok N21 P15 B3
Changing monitoring state from "Cancelling" to "Operational"
[...]
Send: M117 L=-/- E=-
Recv: ok P15 B3
Connection closed, closing down monitor
Changing monitoring state from "Operational" to "Offline"

The log file:
plugin_tplinksmartplug_debug.log

@jneilliii
Copy link
Owner

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?

@lethuer
Copy link

lethuer commented Apr 4, 2024

ok, so idle timeout is working properly.

Yes this time it worked like it should but in the past I had problems with it...
But don't know what was the reason for it.
Anyhow, this was the reason I was looking for another possibility to switch off the plug after a print.
Let's say kind of redundant if everything is working but double functionality if one approach does not work because of any circumstances :)

Based on your comment you added that command to OctoPrint's on cancel gcode script?

Correct, just like this.
image

@jneilliii
Copy link
Owner

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.

@jneilliii jneilliii added the bug Something isn't working label Apr 4, 2024
@lethuer
Copy link

lethuer commented Nov 8, 2024

Hi ! I again observe this issue that printer does not turn off after printing...
Did you have the chance to look into it ?

@jneilliii
Copy link
Owner

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?

@lethuer
Copy link

lethuer commented Nov 8, 2024

Here is an updated log file, print finished at 21:15
20241108_plugin_tplinksmartplug_debug.log

Version: 1.0.3
image

Settings:
image

image

@jneilliii
Copy link
Owner

Your settings are probably preventing the process from happening properly. Turn off run gcode command, and increase the GCODE off delay to allow the printer's printing buffer to complete and the printing status to change away from "printing". I'd start with trying 30 seconds.

image

@lethuer
Copy link

lethuer commented Nov 9, 2024

GCode was disabled before but I never tried with the delay.
Now I did but this makes no difference.

image

@jneilliii
Copy link
Owner

Did you happen to restart OctoPrint after the change?

@lethuer
Copy link

lethuer commented Nov 9, 2024

Yes sure :)

@jneilliii
Copy link
Owner

ok, had a chance to look at the actual log and noticed this...

resetting idle timer due to ClientOpened event.

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.

image

image

@lethuer
Copy link

lethuer commented Nov 11, 2024

what version are you running of the plugin?

Version: 1.0.3
image

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:
image

And the tp link log file:
20241111_plugin_tplinksmartplug_debug.log

Print was started at 16:33 and finished at 19:48.
At start I have this message:
[2024-11-11 16:33:25,096] DEBUG: Resetting idle timer since plug 192.168.178.46 was just turned on.
and approx 40min after finishing this one:
[2024-11-11 20:29:46,344] DEBUG: resetting idle timer due to ClientOpened event.
no such messages during printing...

Also I have enabled this one for logging:
image

I'm not really sure what to search for. The file is to large to upload here, but here is a download link:
https://1drv.ms/u/s!AmTrnLTKnK36iuoUUfBW8yk-SdGiKw?e=DGPUPO

@jneilliii
Copy link
Owner

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 release candidate and update when prompted.

@lethuer
Copy link

lethuer commented Nov 12, 2024

Ok. Did so and started a print...

image

I 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.
We'll see in a few hours what is happening after a print...

@lethuer
Copy link

lethuer commented Nov 22, 2024

I reproduced the observed bahavior and created a log file with "Drucker Anzeige" set on where tp link didn't switch off after print.
Print started at 15:10 and finished at 15:48.
File is to large to upload here and zip is forbidden. You can download it here: https://1drv.ms/u/s!AmTrnLTKnK36iuxHlbkJyexTaQH4GA?e=1E423h

Here is the tp link log from that aswell
20241122 plugin_tplinksmartplug_debug.log

Last message regarding idle timer I can find is this at printing start
[2024-11-22 15:10:32,657] DEBUG: Resetting idle timer since plug 192.168.178.46 was just turned on.

You might be able to add that to tplink's ignored commands and it would allow for the idle to be detected.

You mean like that ?
image

@lethuer
Copy link

lethuer commented Nov 22, 2024

Ignoring M117 commands does not help

@lethuer
Copy link

lethuer commented Nov 22, 2024

Also ignoring M118 commands does not help.

@jneilliii
Copy link
Owner

It definitely looks like that plugin is sending over and over the last layer of layer and current time to the printer with M117. Did you add the M117 like this?

M105,M117

image

@lethuer
Copy link

lethuer commented Nov 23, 2024

Yep, I tried exactly like that.
So commaseparated list (maybe with a space after the comma...)

@lethuer
Copy link

lethuer commented Nov 23, 2024

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 ?

@jneilliii
Copy link
Owner

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.

@jneilliii
Copy link
Owner

Also, you entered it exactly like that, with no spaces between any characters?

@lethuer
Copy link

lethuer commented Nov 24, 2024

With no spaces it is working :)
image

image

@lethuer
Copy link

lethuer commented Nov 24, 2024

Again I made a test with a space in between, again it does not turn off.
Here is a log from that, print startet at 15:16 and finished at 19:36
20241124 serial.log

Last M117 message of regular printing:
2024-11-24 19:35:42,306 - Send: N142416 M117 L=96/96 E=19:36*1
From here on once in a minute M117 message is sent:

2024-11-24 19:37:00,960 - Send: M117 L=96/96 E=19:37
2024-11-24 19:38:01,030 - Send: M117 L=96/96 E=19:38
2024-11-24 19:39:01,101 - Send: M117 L=96/96 E=19:39
2024-11-24 19:40:01,172 - Send: M117 L=96/96 E=19:40

So I will do following things:

  • add M117 to ignore list of tp link without comma
  • deactivate "Drucker Anzeige" of plugin "DisplayLayerProgress"
  • activate ssd1306 plugin again or remove additional external oled display

@jneilliii
Copy link
Owner

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.

@jneilliii
Copy link
Owner

Just released 1.0.4rc5 with a fix for the space issue.

@lethuer
Copy link

lethuer commented Dec 6, 2024

Just released 1.0.4rc5 with a fix for the space issue.

tested and works for me !

@jneilliii
Copy link
Owner

@Anathema-Device did you happen to also have the DisplayLayerProgress plugin installed in OctoPrint?

@lethuer
Copy link

lethuer commented Dec 7, 2024

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 :)

@jneilliii
Copy link
Owner

Did you really mean @Anathema-Device ?

Yes, they're the one that originally posted this issue.

@Anathema-Device
Copy link
Author

@Anathema-Device did you happen to also have the DisplayLayerProgress plugin installed in OctoPrint?

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
BGCode: AGPLv3
Cancel Objects: AGPLv3
Cura Thumbnails: AGPLv3
Dashboard: AGPLv3
DisplayZ: AGPLv3
Exclude Region: AGPLv3
FileManager: AGPLv3
Marlin GCode Documentation: AGPLv3
OctoApp: AGPLv3
Prusa Filament Runout: AGPLv3
Segmented Bed: AGPLv3
Slicer Thumbnails: AGPLv3
Spoolman: AGPLv3
TP-Link Smartplug: AGPLv3
UI Customizer: AGPLv3

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 ...

@jneilliii
Copy link
Owner

Just took a second look at your debug log @Anathema-Device and your issue I think is related to this line...

[2024-03-17 00:53:18,109] DEBUG: Turning off heater: X5

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

@Anathema-Device
Copy link
Author

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.
[2024-12-07 08:48:12,430] DEBUG: Heater tool0 already off.
[2024-12-07 08:48:12,431] DEBUG: Heater tool1 already off.
[2024-12-07 08:48:12,431] DEBUG: Heater tool2 already off.
[2024-12-07 08:48:12,431] DEBUG: Heater tool3 already off.
[2024-12-07 08:48:12,432] DEBUG: Heater tool4 already off.
[2024-12-07 08:48:12,432] DEBUG: Heater tool5 already off.
[2024-12-07 08:48:12,432] DEBUG: Heater bed already off.
[2024-12-07 08:48:12,433] DEBUG: Turning off heater: X5

@jneilliii
Copy link
Owner

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.

@Anathema-Device
Copy link
Author

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.
[2024-12-07 14:23:56,401] DEBUG: Heater tool0 already off.
[2024-12-07 14:23:56,402] DEBUG: Heater tool1 already off.
[2024-12-07 14:23:56,402] DEBUG: Heater tool2 already off.
[2024-12-07 14:23:56,402] DEBUG: Heater tool3 already off.
[2024-12-07 14:23:56,403] DEBUG: Heater tool4 already off.
[2024-12-07 14:23:56,403] DEBUG: Heater bed already off.
[2024-12-07 14:23:56,403] DEBUG: Heater A already off.
[2024-12-07 14:23:56,403] DEBUG: Heater B_0_0 already off.
[2024-12-07 14:23:56,404] DEBUG: Heater B_1_0 already off.
[2024-12-07 14:23:56,404] DEBUG: Heater B_2_0 already off.
[2024-12-07 14:23:56,404] DEBUG: Heater B_3_0 already off.
[2024-12-07 14:23:56,404] DEBUG: Heater B_0_1 already off.
[2024-12-07 14:23:56,405] DEBUG: Heater B_1_1 already off.
[2024-12-07 14:23:56,405] DEBUG: Heater B_2_1 already off.
[2024-12-07 14:23:56,405] DEBUG: Heater B_3_1 already off.
[2024-12-07 14:23:56,406] DEBUG: Heater B_0_2 already off.
[2024-12-07 14:23:56,406] DEBUG: Heater B_1_2 already off.
[2024-12-07 14:23:56,406] DEBUG: Heater B_2_2 already off.
[2024-12-07 14:23:56,406] DEBUG: Heater B_3_2 already off.
[2024-12-07 14:23:56,407] DEBUG: Heater B_0_3 already off.
[2024-12-07 14:23:56,407] DEBUG: Heater B_1_3 already off.
[2024-12-07 14:23:56,407] DEBUG: Heater B_2_3 already off.
[2024-12-07 14:23:56,407] DEBUG: Heater B_3_3 already off.
[2024-12-07 14:23:56,408] DEBUG: Heater tool0 = 22.0C
[2024-12-07 14:23:56,408] DEBUG: Heater tool1 = 24.0C
[2024-12-07 14:23:56,408] DEBUG: Heater tool2 = 22.0C
[2024-12-07 14:23:56,409] DEBUG: Heater tool3 = 22.0C
[2024-12-07 14:23:56,409] DEBUG: Heater tool4 = 22.0C
[2024-12-07 14:23:56,409] DEBUG: Heaters below temperature.
[2024-12-07 14:23:56,409] DEBUG: Checking for timelapse running.
[2024-12-07 14:23:56,410] DEBUG: Checking timelapse status before shutting off power...
[2024-12-07 14:23:56,410] DEBUG: Starting abort power off timer.
[2024-12-07 14:24:26,481] DEBUG: Automatically powering off enabled plugs.

@jneilliii
Copy link
Owner

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.

@Anathema-Device
Copy link
Author

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?

@jneilliii
Copy link
Owner

Share the new log, there shouldn't be anything necessary added for idle timeout to work.

@Anathema-Device
Copy link
Author

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.

...
[2024-12-09 02:18:46,839] DEBUG: Checking status of 192.168.1.111.
[2024-12-09 02:18:46,840] DEBUG: {'system': {'get_sysinfo': {}}}
[2024-12-09 02:18:46,840] DEBUG: IP 192.168.1.111 is valid.
[2024-12-09 02:18:46,840] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 192.168.1.111
[2024-12-09 02:18:46,855] DEBUG: «��:è"system":{"get_sysinfo":{"sw_ver":"1.0.3 Build 201015 Rel.142523","hw_ver":"5.0","model":"HS103(US)",
[2024-12-09 02:18:46,857] DEBUG: TIM
[2024-12-09 02:26:20,557] DEBUG: Idle timeout reached after 20 minute(s). Turning heaters off prior to powering off plugs.
[2024-12-09 02:26:20,560] DEBUG: Heater tool0 already off.
[2024-12-09 02:26:20,560] DEBUG: Heater tool1 already off.
[2024-12-09 02:26:20,561] DEBUG: Heater tool2 already off.
[2024-12-09 02:26:20,561] DEBUG: Heater tool3 already off.
[2024-12-09 02:26:20,561] DEBUG: Heater tool4 already off.
[2024-12-09 02:26:20,562] DEBUG: Heater bed already off.
[2024-12-09 02:26:20,562] DEBUG: Heater B_0_0 already off.
[2024-12-09 02:26:20,562] DEBUG: Heater B_1_0 already off.
[2024-12-09 02:26:20,563] DEBUG: Heater B_2_0 already off.
[2024-12-09 02:26:20,563] DEBUG: Heater B_3_0 already off.
[2024-12-09 02:26:20,563] DEBUG: Heater B_0_1 already off.
[2024-12-09 02:26:20,564] DEBUG: Heater B_1_1 already off.
[2024-12-09 02:26:20,564] DEBUG: Heater B_2_1 already off.
[2024-12-09 02:26:20,564] DEBUG: Heater B_3_1 already off.
[2024-12-09 02:26:20,564] DEBUG: Heater B_0_2 already off.
[2024-12-09 02:26:20,565] DEBUG: Heater B_1_2 already off.
[2024-12-09 02:26:20,565] DEBUG: Heater B_2_2 already off.
[2024-12-09 02:26:20,565] DEBUG: Heater B_3_2 already off.
[2024-12-09 02:26:20,566] DEBUG: Heater B_0_3 already off.
[2024-12-09 02:26:20,566] DEBUG: Heater B_1_3 already off.
[2024-12-09 02:26:20,566] DEBUG: Heater B_2_3 already off.
[2024-12-09 02:26:20,567] DEBUG: Heater B_3_3 already off.
[2024-12-09 02:26:20,567] DEBUG: Turning off heater: X3
[2024-12-09 02:33:46,861] DEBUG: Checking status of 192.168.1.111.
[2024-12-09 02:33:46,861] DEBUG: {'system': {'get_sysinfo': {}}}
[2024-12-09 02:33:46,861] DEBUG: IP 192.168.1.111 is valid.
[2024-12-09 02:33:46,862] DEBUG: Sending command {'system': {'get_sysinfo': {}}} to 192.168.1.111
[2024-12-09 02:33:46,874] DEBUG: «��:è"system":{"get_sysinfo":{"sw_ver":"1.0.3 Build 201015 Rel.142523","hw_ver":"5.0","model":"HS103(US)",
[2024-12-09 02:33:46,875] DEBUG: TIM
...

@jneilliii
Copy link
Owner

Turning off heater: X3

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.

@Anathema-Device
Copy link
Author

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.

@jneilliii
Copy link
Owner

jneilliii commented Dec 9, 2024

That stuck in finishing state will basically never trigger the idle power off timer.

@Anathema-Device
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants