OctoPrint — Camera control

Integration: OctoPrint
Suggestion: Add the ability to turn the camera on and off at octoprint.

Simply override the unrealized turn_on and turn_off methods of the Camera base class in the OctoprintCamera class.
For example, the following actions can be added to the OctoPrint configuration (following this note):

system:
  actions:
    - name: Turn camera on
      action: camon
      command: sudo service webcamd start
      confirm: You are about to start the bundled webcam server.
    - name: Turn camera off
      action: camoff
      command: sudo service webcamd stop
      confirm: You are about to stop the bundled webcam server.

And then you can call them using the OctoPrint API:

POST /api/system/commands/custom/custom/camoff HTTP/1.1
Host: octoprint.local
X-Api-Key: ...