Ich hatte ebenfalls das Problem, dass ich bei laufendem MJPEG-Streamer keine Aktion take_snapshot ausführen konnte. Die Fehlermeldung im log war dabei:
Code
<strong>SnapShotAction with args () and kwargs {'snapshot_path': '/home/pi/snapshots'} for event_name OnKeyUp_onboardpins.29</strong>
<strong>Traceback (most recent call last):</strong>
<strong> File "/usr/local/lib/python2.7/dist-packages/DoorPi-2.5.1-py2.7.egg/doorpi/action/handler.py", line 284, in fire_event_synchron</strong>
<strong>result = action.run(silent)</strong>
<strong> File "/usr/local/lib/python2.7/dist-packages/DoorPi-2.5.1-py2.7.egg/doorpi/action/base.py", line 48, in run</strong>
<strong>return self.__callback(**self.__kwargs)</strong>
<strong> File "/usr/local/lib/python2.7/dist-packages/DoorPi-2.5.1-py2.7.egg/doorpi/action/SingleActions/take_snapshot.py", line 49, in get_snapshot_from_picam</strong>
<strong>with picamera.PiCamera() as camera:</strong>
<strong> File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 433, in __init__</strong>
<strong>self._init_preview()</strong>
<strong> File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 513, in _init_preview</strong>
<strong>self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])</strong>
<strong> File "/usr/lib/python2.7/dist-packages/picamera/renderers.py", line 558, in __init__</strong>
<strong>self.renderer.inputs[0].connect(source).enable()</strong>
<strong> File "/usr/lib/python2.7/dist-packages/picamera/mmalobj.py", line 2212, in enable</strong>
<strong>prefix="Failed to enable connection")</strong>
<strong> File "/usr/lib/python2.7/dist-packages/picamera/exc.py", line 184, in mmal_check</strong>
<strong>raise PiCameraMMALError(status, prefix)</strong>
<strong>PiCameraMMALError: Failed to enable connection: Out of resources</strong>
Alles anzeigen
Offensichtlich ist die PI-Camera durch den MJPEG streamer blockiert.
Mit folgendem Eintrag geht es jetzt:
10=take_snapshot:
Wichtig war dabei die vollständige ULR incl "http://". Das hat im obigen Post wohl die automatische Formatierung "geschluckt".
Damit wird im entsprechenden Script take_snapshot.py get_snapshot_from_URL aktiviert anstatt get_snapshot_from_picam.
Damit wird der mjpeg streamer für den snapshot verwendet.