Open 6ffm70 opened 5 years ago
I need to do some research to see if it is possible.
This would be nice for me and anyone who peeks a look at a print every 15 mins or so. It would save a lot of clicking around.
I need to do some research to see if it is possible.
I'm still keen, Henrique! :)
I was browsing the OctoPrint documentation for clues how to make this possible. There's an event called ClientOpened
mentioned here http://docs.octoprint.org/en/master/events/index.html#available-events, which occurs when a client connects to the webserver. Equally, there's an event available for ClientClosed
. That's not limited to the webstream tab, but could already minimise the time the camera light is turned on. Could that be easily implemented?
**Problem: When watching the webstream while it's dark at the printer, I have to manually switch the light on (via the Enclosure plugin). Also, automated sending snapshots from a messenger plugin would require to have the enclosure illumination to be permanently switched on.
**Solution: The plugin shall make use of Octopi's function that the webcam-stream get started, when it is called once or by multiple users. The same trigger can be used to switch a GPIO.
**Bonus Solution: A popular light sensor can be connected to the Raspi, and pause the illumination feature (via the plugin) when it's not dark.