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

Add support for action command prompts #1625

Closed
ulope opened this issue Oct 24, 2023 · 5 comments · Fixed by #1630
Closed

Add support for action command prompts #1625

ulope opened this issue Oct 24, 2023 · 5 comments · Fixed by #1630
Labels
💡 Type: FR Requests a new feature

Comments

@ulope
Copy link

ulope commented Oct 24, 2023

Requested feature:

Octoprint has had support for Action Command Prompts for quite some time now.

It would be great if Mainsail also supported it.

Solves the following problem:

They are very useful for user interactive macros, e.g. filament loading / unloading, color change, confirmation prompts, etc.
See this very elaborate example (it says for Fluidd in the description, although I'm not sure if Fluidd supports this, Octoprint definitely does.)

Additional information:

The protocol is quite simple and described on the linked octoprint page.

@ulope ulope added the 💡 Type: FR Requests a new feature label Oct 24, 2023
@meteyou
Copy link
Member

meteyou commented Oct 24, 2023

Octoprint is quite different to mainsail. Octoprint is server and webclient at the same time. Mainsail is only a webclient. So this is not possible without any change on the server side. Mainsail only supports Klipper macros to start this command.

@meteyou meteyou closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
@ulope
Copy link
Author

ulope commented Oct 24, 2023

Hm yeah alright that makes sense from an implementation standpoint, nonetheless I think this would be a great usability win in general.

Would you be open to implementing this / accepting a PR if server support (i.e. moonraker) were available?

@meteyou
Copy link
Member

meteyou commented Oct 24, 2023

Ok... We spent the half evening discussing this feature internally with the crew, and I was probably a bit hasty in closing it. Maybe we have found a way to implement this. I will reopen this FR and test it before I can give feedback.

@meteyou meteyou reopened this Oct 24, 2023
@ulope
Copy link
Author

ulope commented Oct 25, 2023

Awesome!
I also looked a bit more into this yesterday and it looks to me that the RESPOND messages are already coming through to the frontend via the notify_gcode_response websocket messages.

So it should "just" be a matter of parsing the // action: prompt_... messages.
(And yes I know that "just" is a dangerous word in software development ;))

@meteyou
Copy link
Member

meteyou commented Oct 25, 2023

yeah, thats my idea. Klipper use this "commands" already for talking with octoprint. so i can use it the same way and "just" parse the console output for these commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Type: FR Requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants