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

PSU control wont wake printer after V2.2.0 update #2036

Closed
bach37strad opened this issue Jul 10, 2021 · 11 comments
Closed

PSU control wont wake printer after V2.2.0 update #2036

bach37strad opened this issue Jul 10, 2021 · 11 comments
Labels
stale Stale issue support Something isn't working with the users setup

Comments

@bach37strad
Copy link

raspberry pi 3b+ / Ender 3 V2 (4.2.7)
Optopi 0.17.0 / Octoprint 1.6.1 / Octodash V2.2.0

After updating to V2.2.0 from V2.0.0 the powertoggle function in custom actions will no longer wake the printer, only turn it off. Sleep mode screen has not worked since installing klipper however I was always able to navigate to the control screen to turn the printer on. PSU control still works normally through octoprint's desktop UI.

@bach37strad bach37strad added the support Something isn't working with the users setup label Jul 10, 2021
@bach37strad
Copy link
Author

@bach37strad
Copy link
Author

Please ignore the "unable to open port" connection issue stuff. That was a klipper issue that's since been resolved.

@UnchartedBull
Copy link
Owner

Did OctoPrint show any errors? Did you enable multiple PSU Control Plugins with v2.2.0?

@bach37strad
Copy link
Author

bach37strad commented Jul 16, 2021

No errors in octoprint. It's like the commands dont even register until the printer is powered on. As far as PSU control plugins, I only have the one instance installed and have not changed anything since the initial setup.
Capture

config.json.txt

I'm using the [!POWERTOGGLE] command in custom actions.

@bach37strad
Copy link
Author

bach37strad commented Jul 16, 2021

I have noticed sometimes using the custom home action ["G28; G91; G0 X-40 F3000; G90; G0 Z0 F200"] will wake the printer, but not reliably, and it does not home after waking until i run the command again.

Entering the [!POWERTOGGLE] command manually in the octoprint terminal spits out the following errors:

Send: !POWERTOGGLE
Recv: // Lost communication with MCU 'mcu'
Recv: // Once the underlying issue is corrected, use the
Recv: // "FIRMWARE_RESTART" command to reset the firmware, reload the
Recv: // config, and restart the host software.
Recv: // Printer is shutdown
Recv: !! Lost communication with MCU 'mcu'
Recv: ok

@UnchartedBull
Copy link
Owner

!POWERTOGGLE is an octodash only command, so the error here is expected.

From what I can see in the logs it seems like OctoPrint is having a hard time connecting to your printer tmp/printer. Please double check your connection settings and ideally post a screenshot of that part of the UI (once while connected and once while sleeping)

@stale
Copy link

stale bot commented Aug 10, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale issue label Aug 10, 2021
@stale stale bot closed this as completed Aug 24, 2021
@jrydval
Copy link

jrydval commented Aug 28, 2021

I am facing the same problem -
The "command": "[!POWERTOGGLE]" is only able to switch my printer off (via PSU Control plugin) but not on when pressed on the "sleep screen".

  • OctoDash 2.2.0
  • OctoPrint 1.7.0rc2

I found these errors in octoprint.log file:

2021-08-28 12:50:00,718 - tornado.application - ERROR - Exception in callback functools.partial(<function RawWebSocketTransport.send_pack.<locals>.<lambda> at 0xa60b1ae0>)
Traceback (most recent call last):
  File "/home/pi/Apps/OctoPrint/venv/lib/python3.7/site-packages/tornado/ioloop.py", line 741, in _run_callback
    ret = callback()
  File "/home/pi/Apps/OctoPrint/venv/lib/python3.7/site-packages/octoprint/vendor/sockjs/tornado/transports/rawwebsocket.py", line 90, in <lambda>
    self.server.io_loop.add_callback(lambda: self.send_pack(message, binary))
  File "/home/pi/Apps/OctoPrint/venv/lib/python3.7/site-packages/octoprint/vendor/sockjs/tornado/transports/rawwebsocket.py", line 85, in send_pack
    self.write_message(message, binary).add_done_callback(self.send_complete)
  File "/home/pi/Apps/OctoPrint/venv/lib/python3.7/site-packages/tornado/websocket.py", line 339, in write_message
    message = tornado.escape.json_encode(message)
  File "/home/pi/Apps/OctoPrint/venv/lib/python3.7/site-packages/octoprint/server/util/tornado.py", line 48, in fixed_json_encode
    return json.dumps(value, default=JsonEncoding.encode, allow_nan=False).replace(
  File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/usr/lib/python3.7/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/pi/Apps/OctoPrint/venv/lib/python3.7/site-packages/octoprint/util/json/__init__.py", line 49, in encode
    raise TypeError
TypeError

These ERRORs are new ones after octodash installation but to be honest I am not 100% sure that they are related to this problem. But they appear around my attempts to switch the printer on.

Best Regards,
Jan

@jneilliii
Copy link
Contributor

This could be an issue introduced by my companion plugin @jrydval ? I had a couple of issues with some of the plugin settings early on. Are you using that plugin?

@jrydval
Copy link

jrydval commented Aug 28, 2021

Hi there! Yes, it's installed but actually I do not need it anymore. I edit the config file directly. I will uninstall it and we will see...

Jan

@jneilliii
Copy link
Contributor

would need to know which field got messed up if you don't mind. not sure what could have triggered the type error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issue support Something isn't working with the users setup
Projects
None yet
Development

No branches or pull requests

4 participants