Default timelapse plugin in Octoprint 1.9+ wasn’t working with MultiCam provided cameras, this makes it functional.
Looking at commit history, it seems this is relatively new code and never worked. The problem originates in an inconsistency on the type of the argument for take_webcam_snapshot() in WebcamProviderPlugin. In octoprint/plugin/types.py:
def take_webcam_snapshot(self, webcamName):
"""
Used to take a JPEG snapshot of the webcam. This method may raise an exception, you can expect failures to be handled.
:param string webcamName: The name of the webcam to take a snapshot of as given by the configurations
Returns:
An iterator over bytes of the JPEG image
“""
However, in octoprint/timelapse.py, a ProvidedWebcam is passed:
self._logger.debug(
f"Going to capture {filename} from {self._webcam.config.name} provided by {self._webcam.providerIdentifier}"
)
snapshot = self._webcam.providerPlugin.take_webcam_snapshot(self._webcam)
This changes the plugin to use ProvidedWebcam, thus not requiring a change to Octoprint (although it probably would make sense to make the plugin interface align with Timelapse’s usage).
Default timelapse plugin in Octoprint 1.9+ wasn’t working with MultiCam provided cameras, this makes it functional.
Looking at commit history, it seems this is relatively new code and never worked. The problem originates in an inconsistency on the type of the argument for
take_webcam_snapshot()
inWebcamProviderPlugin
. In octoprint/plugin/types.py:However, in octoprint/timelapse.py, a
ProvidedWebcam
is passed:This changes the plugin to use ProvidedWebcam, thus not requiring a change to Octoprint (although it probably would make sense to make the plugin interface align with Timelapse’s usage).