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

Restarting Home Assistant pauses Print #16

Closed
edalquist opened this issue Jun 15, 2023 · 5 comments
Closed

Restarting Home Assistant pauses Print #16

edalquist opened this issue Jun 15, 2023 · 5 comments

Comments

@edalquist
Copy link

I'm not really sure how or why but I'm experiencing a situation where when I restart Home Assistant my print pauses.

Similar to: https://community.home-assistant.io/t/print-halts-upon-system-restart-octoprint/138107/2

@edalquist
Copy link
Author

2023-06-15 14:55:21,386 - octoprint.plugins.psucontrol_homeassistant - ERROR - Exception while making API call
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_psucontrol_homeassistant/__init__.py", line 67, in send
    response = requests.get(url, headers=headers, verify=verify_certificate)
  File "/home/pi/oprint/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/pi/oprint/lib/python3.7/site-packages/requests/sessions.py", line 528, in request
    prep = self.prepare_request(req)
  File "/home/pi/oprint/lib/python3.7/site-packages/requests/sessions.py", line 466, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/home/pi/oprint/lib/python3.7/site-packages/requests/models.py", line 316, in prepare
    self.prepare_url(url, params)
  File "/home/pi/oprint/lib/python3.7/site-packages/requests/models.py", line 390, in prepare_url
    raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '/api/states/switch.prusa_mk3s': No schema supplied. Perhaps you meant http:///api/states/switch.prusa_mk3s?

@edekeijzer
Copy link
Owner

@edalquist do you have Automatically turn PSU ON enabled?

@edalquist
Copy link
Author

I did have that option on, I missed it in the original readme. Does that cause the printer to pause when HA becomes unavailable?

@edekeijzer
Copy link
Owner

@edalquist since it tries to turn on the printer, it will wait for the printer to turn on. PSU Control initially just supported GPIO pins, which can't really go offline during a print. Home Assistant can, as well as pretty much every external power switch supported by PSU Control plugins.
I'll emphasize this warning even more, since you're surely not the first who mentions a stop or very slow response from Octoprint when HA becomes unavailable.

@edalquist
Copy link
Author

Interesting, so is the underlying issue in the parent PSU Control plugin not handling unavailable switches gracefully?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants