Go to advanced search

by Dubman
Mon Mar 02, 2020 12:16 pm
Forum: General discussion
Topic: systemd service file to run at startup
Replies: 10
Views: 964

Re: systemd service file to run at startup

Finally! Thanks for that observation: From the command line you are running: python /usr/local/sbin/alarm.py In your service file your have something different: ExecStart=/usr/bin/python3 /home/pi/alarm.py So I changed the line in the alarm.service file: ExecStart=/usr/bin/python3 /usr/local/sbin/al...
by Dubman
Mon Mar 02, 2020 9:48 am
Forum: General discussion
Topic: systemd service file to run at startup
Replies: 10
Views: 964

Re: systemd service file to run at startup

I still have no idea how to solve the issue. My python script is working correctly with: $ python /usr/local/sbin/alarm.py But just can't get it to start automatically at boot This is what the terminal is showing at the moment:: pi@raspberrypi:~ $ sudo nano alarm.service /etc/systemd/system pi@raspb...
by Dubman
Mon Mar 02, 2020 8:34 am
Forum: General discussion
Topic: systemd service file to run at startup
Replies: 10
Views: 964

Re: systemd service file to run at startup

Also the thread where I told you how to do this the first time is here:viewtopic.php?f=63&t=215892 I did check the old thread, but still couldn't figure out the solution. What wasn't clear to me was where exactly to store the alarm.service file - I didn't see something like: $ sudo nano /etc/system...
by Dubman
Mon Mar 02, 2020 7:57 am
Forum: General discussion
Topic: systemd service file to run at startup
Replies: 10
Views: 964

Re: systemd service file to run at startup

I will try my script again now and let you know the results. thanks
by Dubman
Mon Mar 02, 2020 12:29 am
Forum: General discussion
Topic: systemd service file to run at startup
Replies: 10
Views: 964

systemd service file to run at startup

i got help in this forum before with getting a python script to run at RPi startup, but I need to get it working again and I don't remember exactly how I got it to work before. Basically my doubt is where to store the service file. This is what I tried: $ sudo nano /etc/systemd/system/alarm.service ...
by Dubman
Wed Oct 23, 2019 7:55 pm
Forum: General discussion
Topic: mmal errors in python file when I run startup service script
Replies: 2
Views: 223

Re: mmal errors in python file when I run startup service script

To be honest, I'm not completely sure I "caused" the errors by altering my python script and reverting back to the previously backed up working script. I think it's possible that the mmal error was going to be there in any case. What I do know is that when the service script is active and running, I...
by Dubman
Wed Oct 23, 2019 12:46 pm
Forum: General discussion
Topic: mmal errors in python file when I run startup service script
Replies: 2
Views: 223

mmal errors in python file when I run startup service script

Hi, In Rpi terminal, running python alarm.py gives me MMAL errors: pi@raspberrypi:~ $ python alarm.py mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0xfcf2e0 (ENOSPC) mmal: mmal_connect...
by Dubman
Tue Oct 22, 2019 1:34 pm
Forum: General discussion
Topic: Getting RPi. Python script to run 24/7 without laptop turned on
Replies: 70
Views: 5628

Re: Getting RPi. Python script to run 24/7 without laptop turned on

Hi, Just wanted to revisit this thread because I have a doubt about exactly how /where to create a Unit file: This was from a post that I found very helpful, but my question is for example at the very start, I want to create the Unit file. Is this the first step? sudo nano awesome.service /etc/syste...
by Dubman
Sun Oct 20, 2019 5:17 pm
Forum: General discussion
Topic: Adding email video alerts to home security system
Replies: 3
Views: 520

Re: Adding email video alerts to home security system

Great! I have been checking this link: https://picamera.readthedocs.io/en/release-1.10/recipes1.html and I was wondering if you think this modification of my Python file might work? First, I omitted this: def capture_image(): global texte data= time.strftime("%Y-%b-%d_(%H%M%S)") texte= "picture take...
by Dubman
Sun Oct 20, 2019 2:55 pm
Forum: General discussion
Topic: Adding email video alerts to home security system
Replies: 3
Views: 520

Adding email video alerts to home security system

Hi, I'm currently using a python script, similar to the slightly adapted one below. How would I go about adding video alerts, of say 10/15 seconds, instead of still images? Is it possible to implement this on my existing Raspbian Stretch? I'm not sure where I found this code: #!/usr/bin/env python3 ...
by Dubman
Fri Sep 13, 2019 3:50 pm
Forum: General discussion
Topic: Combining PIR and normal motion detection?
Replies: 7
Views: 711

Re: Combining PIR and normal motion detection?

Thanks for those suggestions. Hopefully I might manage to implement one of them.
by Dubman
Fri Sep 13, 2019 11:08 am
Forum: General discussion
Topic: Combining PIR and normal motion detection?
Replies: 7
Views: 711

Re: Combining PIR and normal motion detection?

The thing is that it's so hard to avoid false alarms and I suspect even harder when relying on only "in camera" type detection - that's why I thought of combining both (PIR and "in camera") together. I know that it's possible to install a dual PIR plus microwave type detector, but I don't like the i...
by Dubman
Thu Sep 12, 2019 6:59 pm
Forum: General discussion
Topic: Combining PIR and normal motion detection?
Replies: 7
Views: 711

Re: Combining PIR and normal motion detection?

Yes, I am currently using a pir sensor, a bit like the one in the previous post. I was wondering if it may be possible to also add another "in camera" type sensor capable of detecting movement, with the objective of reducing false alerts. I'm using the Rpi camera module. Would motioneyeos be a solut...
by Dubman
Thu Sep 12, 2019 2:58 pm
Forum: General discussion
Topic: Combining PIR and normal motion detection?
Replies: 7
Views: 711

Combining PIR and normal motion detection?

Hi, I have a python script that includes code for PIR detection in a home security system, but I get too many false alerts, probably moreso on very warm sunny days. The sensor is in the open air. Is there a way l could add in a normal motion detection trigger that detects only movement? The idea bei...
by Dubman
Tue Jul 09, 2019 12:55 pm
Forum: General discussion
Topic: Adding second camera to Rpi 3?
Replies: 14
Views: 1169

Re: Adding second camera to Rpi 3?

Thanks for the suggestions. I'm hoping to find the simplest possible solution.
by Dubman
Fri Jul 05, 2019 5:59 am
Forum: General discussion
Topic: Adding second camera to Rpi 3?
Replies: 14
Views: 1169

Re: Adding second camera to Rpi 3?

I do have a second Rpi 3, but would it be complicated to get it working with the current system, which is a Rpi 3 plus PIR sensor that triggers email alerts on detection of intruders? I mean, would the one PIR sensor be sufficient? I assume I would need to connect the second Rpi and its camera modul...
by Dubman
Thu Jul 04, 2019 10:11 am
Forum: General discussion
Topic: Adding second camera to Rpi 3?
Replies: 14
Views: 1169

Adding second camera to Rpi 3?

Hi, I have a python script working with the pi camera module (with Rpi 3 board) and a PIR sensor that triggers email alerts when an intruder is detected. But how would I go about adding a second camera to the same Rpi, in such a way that every time the (one) sensor triggers an alert, both cameras wo...
by Dubman
Mon May 06, 2019 7:50 am
Forum: General discussion
Topic: Out of resources error
Replies: 0
Views: 204

Out of resources error

Hi, I have my home security script up and running, and even though I was getting the error below, the python script continued to work normally. I was using a service script to start on boot up for 24/7 running, and then, thinking that the out of resources error below may be caused by 2 processes try...
by Dubman
Wed May 01, 2019 2:12 pm
Forum: General discussion
Topic: How can I add live streamimg to home security system?
Replies: 4
Views: 523

Re: How can I add live streamimg to home security system?

Thanks, I'll try Motioneyeos. But would this be the correct way to install it?
Install on the Rpi by means of sd card which is then inserted in the pi.
So does this means that I don't need, and can erase my current Raspbian os from the pi?
by Dubman
Wed May 01, 2019 12:59 pm
Forum: General discussion
Topic: How can I add live streamimg to home security system?
Replies: 4
Views: 523

How can I add live streamimg to home security system?

Hi, with the help of this forum, the python script below seems to be working very well for home.security using a pir sensor and email alerts, but now I would like to add live video streaming to my setup, so that I could also keep an eye on the house via live streaming. How would I go about that whil...
by Dubman
Sat Apr 20, 2019 7:37 am
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 721

Re: How to add images to this email alert script?

Great, thank you for being so helpful!
by Dubman
Fri Apr 19, 2019 9:37 pm
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 721

Re: How to add images to this email alert script?

That's great, it's working now when I place the lines here: server.quit() os.remove('%s.jpg'%data) print("File Removed!") exit() I think I had tried it here: print ("intruder") capture_image() os.remove('%s.jpg'%data) print("File Removed!") But now: pi@raspberrypi:~ $ sudo python alarm.py intruder F...
by Dubman
Fri Apr 19, 2019 8:05 pm
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 721

Re: How to add images to this email alert script?

oh yes, I see I no longer have the "moveto" line. I tried the os.remove('%s.jpg'%data) But I get this error : pi@raspberrypi:~ $ sudo python alarm.py intruder Traceback (most recent call last): File "alarm.py", line 74, in <module> os.remove('%s.jpg'%data) OSError: [Errno 2] No such file or director...
by Dubman
Fri Apr 19, 2019 7:13 pm
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 721

Re: How to add images to this email alert script?

ok, I see that using Ctrl&C is a cleaner way to close. One doubt about this part of the code: path = "/home/pi/" moveto = "/home/pi/Pictures/"` How can I edit the "moveto" line so that the image gets deleted after sending, instead of being sent to the sd card? Or perhaps another option is to add the...
by Dubman
Fri Apr 19, 2019 6:13 pm
Forum: General discussion
Topic: How to add images to this email alert script?
Replies: 13
Views: 721

Re: How to add images to this email alert script?

That's progress! Thanks Gordon, that last script you posted is sending me alerts with images, although when I do keyboard interrupt, I get the following errors: pi@raspberrypi:~ $ sudo python alarm.py intruder intruder intruder intruder intruder intruder intruder intruder intruder intruder ^CTraceba...

Go to advanced search