Closed TDI4 closed 3 years ago
Hi @TDI4,
It looks like there is some information missing from this issue that is required to process it:
Please read this guide, especially the troubleshooting section.
If you have read this guide, please tick the box in your issue next to 'I have read the Get Help Guide'
* [x] I have read the Get Help Guide
If you didn't mean to ask for help, please make sure you used the right template - bugs and requests should have [Bug]
and [Request]
respectively in the title.
I'm just a bot 🤖, not a human being, so don't expect any replies from me :) Your ticket is read by humans too, I'm just not one of them.
This is the page you want:
https://cp2004.gitbook.io/ws281x-led-status/documentation/rest-api
The commands you found, are host @ commands. These can be added to gcode scripts or other plugins that execute gcode commands. They aren't API commands.
I've seen that page, but you mention "see blow" but the API commands are missing, and not equal to the host @ commands. That's why I say it's confusing, and if you add that 5 commands to the documentation, you could save time for someone else who would like to use it.
Hmm, below that used to be a table there that documented all the options. I wonder where it went. Will check and fix ASAP - it should have been there, but I wasn't aware it had gone missing. Now to hunt down a missing table on the internet.
Apologies for the inconvenience there, it is back at https://cp2004.gitbook.io/ws281x-led-status/documentation/rest-api#commands
Thank you for the fast response :) Now it looks (again), how it shoud be. Perfect!
Is your feature request related to a problem? Please describe. I liked to implement my printer in my home automation deeper than Octoprint binding in Openhab, so i started to work on power on/off the PSU with MQTT, switch lights with MQTT and so on. With the "PSU Control" plugin and it's documentation it worked flawlessly, but with this plugin I had to dig much deeper. Your github wiki is pretty fine, but the commands tab (at least for me) did not helped a lot. https://cp2004.gitbook.io/ws281x-led-status/v/0.7.x/documentation/host-commands
response: { "status" : 400, "response" : Expected valid command "data" : {"command":"WS_LIGHTSON"} }
Describe the solution you'd like Finally I found the solution in your code itself (octoprint_ws281x_led_status/api.py) where you define for example "CMD_LIGHTS_ON = "lights_on" insted of "@WS_LIGHTSON" what's in the documentation. Since I modded it in my "MQTT Subscribe" plugin it works.
response: { "status" : 200, "response" : {"lights_on":true,"torch_on":false} "data" : {"command":"lights_on"} }
Why should this be implemented? To prevent others spending half a day finding where's the problem in the command.
Additional context
With this setup it works. Thank you in advance for your effort, and by the way, the plugin is pretty awesome, instead of using Marlin's built-in feature :)![2021-05-08_21h01_57](https://user-images.githubusercontent.com/70479047/117550435-a8b8a200-b040-11eb-91a8-46d4aa49318a.png)