TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: ROBH
date: 2018-05-19 09:16:00
subject: Re: ftp causing invalid s

On 18/05/18 21:53, Björn Lundin wrote:
> On 2018-05-18 21:39, RobH wrote:
>>>      Why are you trying to put the /script/ there?
>>
>> Because another poster told me to do that:
>> This is what I was told:
>>
>>> in your script ON THE PI, save to *local directory* /mnt/CCTV/PiZero
>>> and the file will show up on the *remote directory* on the nas.
>>
>> That is what I have right now: //mnt/CCTV/PiZero,  in the python script
>
> where the *script* resides does not matter.
> I said  *in* your script ON THE PI, save to *local directory*
> This is  - of course - about the file you wanh't on then NAS - the picture.
>
> so - save the *picture* (which you do *in your script*) to the local
> directory.
>
>

Ok I misunderstood what you meant about the script, so you to save the
picture on or to a local directory

This is the script I was supplied with,and where and how would save the
video, as it is now, to a local directory. I imagine that the may well
be an alteration or 2

from picamera import PiCamera
import time
import os
import os.path
import shutil

from gpiozero import MotionSensor  #According to google motionsensor is
in gpiozero

# Create object for PIR Sensor
# PIR Sensor is on GPIO-4 (Pin 7)
pir = MotionSensor(4)

# Create Object for Camera
camera = PiCamera()


while True:
     # Wait for motion being detected
     pir.wait_for_motion()
     triggerTime = time.time()

     #create base filename at time of motion trigger
     fname = time.strftime("%Y-%d-%d_%H.%M.%S.h264",
time.localtime(triggerTime))

     RAMname = os.path.join("/run/shm", fname)
     NASname = os.path.join("/mnt/CCTV/PiZero" , fname)

     camera.start_preview()

     #capture video to RAM device first

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.