-
Notifications
You must be signed in to change notification settings - Fork 113
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 togglePSU API Command #33
Comments
Yes, please! I want to build a keypad that issues API commands and I want to have a button that toggles power. However, I neither found a way via the API to get the current PSU status nor is this toggle option available. |
@yschroeder Yeah status makes sense too. |
Add getPSUState API Command (#34)
@yschroeder I've added both API commands to the additional_api_commands branch if you want to test it out and let me know how it goes. Added:
|
Actually, I have no idea how to use a plugin that is not installed via the integrated GUI. Can you give me a hint on where to find this info? |
URL: |
I will try it today. Yesterday mounted a ATX PSU to it, and turning it on and off goes just fine using the lightning icon. Will try it using the API. |
I'm testing it remotely, don't know I am doing it wrong.
|
See #21 |
I've tested it now. togglePSU works as expected, thanks for that! However I can't get the |
It should be a POST that returns json data but I haven't tested it as I don't have a working environment at the moment. |
curl -s -H "Content-Type: application/json" -H "X-Api-Key: YOUR_API_KEY" -X POST -d '{ "command":"getPSUState" }' http://YOUR_OCTOPRINT_SERVER/api/plugin/psucontrol |
That curl command returns a 500 error. |
Remove plugin and add again via the same url. Yesterday they fixed it in a new commit based on my log. (See the other issue) |
Getting the status works as described for me after installing again. I would like to see both features getting deployed to release. For now I will keep using the plugin from the zip file. |
Add getPSUState API Command (#34)
plugin url does not work . i get 404 |
@gurusonwheels its in devel now. |
Add getPSUState API Command (#34) Set initial state of the switching GPIO accordingly (#40) Add Pseudo On/Off G-Code Switching (#26) Added M106 to autoOnTriggerGCodeCommands defaults (#45) Move static power off dialog from jinja2 template to js (#46) Change power off dialog message Add invert and pull-up/down options for Sensing (#39) Add support for sensing via system commands
No description provided.
The text was updated successfully, but these errors were encountered: