RoboMagus / OctoPrint-LightControls

Raspberry PI pwm Light controlls plugin for Octoprint
GNU General Public License v3.0
5 stars 2 forks source link

Is it possible to control the lights via API? #3

Closed Fernando-Checa closed 2 years ago

RoboMagus commented 2 years ago

Yes.

Do this by POSTing to api/plugin/LightControls with:

E.g.:

    url: OCTOPRINT_URL + "/api/plugin/LightControls",
    type: "POST",
    dataType: "json",
    data: JSON.stringify({
        command: "setLightValue",
        pin: 21,
        percentage: 100
    }),
    contentType: "application/json; charset=UTF-8"
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity in 31 days. It will be closed if no further activity occurs in 14 days.