Motion - Motion Notify

Motion Notify - Google Drive Uploader and Email Notifier with Network Detection

Motion Notify Version 1.0

Motion Notify 1.0 is a major release which is a significant rewrite from the previous 0.3 release. The latest version provides a platform which is more stable, more configurable and more extensible. Focus has been made on providing a platform that is easily extended by allowing developers to add new Actions and Detectors. See the section at the end of the readme if you want to know more about developing additional actions and detectors.

Github location

https://github.com/amdean/motion-notify/

Overview

Motion Notify is an event handling framework for Linux Motion providing upload to Google Drive and email notification when you're not home.

Take an event, carry out some detections to see if you're home and then carry out a series of actions.

This allows you to carry out the following:
  • Send an email when a motion is detected
  • Upload an image to Google Drive while an event is occuring
  • Upload a video to Google Drive when the event ends
  • Send an email when the event ends with a link to the video
  • Detect whether you're at home by looking for certain IP addresses on your local network and not send alerts if you're home
  • Allows you to specify hours when you want to receive alerts even if you're at home
  • Only receive alerts when you're not home
  • Specify what you want to happen when each type of event occurs

Upgrades

If you're upgrading from an older version note the following:
  • The arguments used by Motion Notify have changed so you will need to update the entries in /etc/motion/motion.conf
  • Additional Python libraries are required so check that you have all the libraries stated in the install / config section this page
  • The config file has changed a lot
  • Follow through the install guide to ensure that everything works correctly

Events, Detectors and Actions

Motion Notify works on the concept of Events, Detectors and Actions.
  • An Event is triggered when motion is detected
  • Detectors check whether the system is "active" (typically whether you're at home or not)
  • Actions are carried out as a result of an event (eg. when an event is triggered an email notification is sent and the image upload to Google Drive
The framework and configuration is designed to allow developers to easily develop and integrate their own Detectors and Actions

Event Action Rules

Each "Event Type" has a set of Event Action Rules allowing you to specify a different series of actions to be called at the start of an event than at the end of an event.
  • Motion Notify allows rules to be configured stating what Actions should occur when an Event is triggered, taking into account whether or not the detectors show that the system is "active"
  • Event Action Rules are specified in the config file in the format EVENT_TYPE = ACTION_CLASS:ALWAYS_OR_IF_ACTIVE,ANOTHER_ACTION_CLASS:ALWAYS_OR_IF_ACTIVE
  • An example rule would be "on_picture_save = GoogleDriveUploadAction:always,DeleteMediaFileAction:always"
  • This would mean that when a "on_picture_save" event occurs the file is upload to Google Drive and the local source file is deleted afterwards. Due to the "always" rule these actions will occur regardless of the system status
  • Another example would be on_event_start = SmtpEmailNotifyAction:if_active
  • This would mean that an email notification would be sent only if the detectors indicate that the system is active (see Detector Rules below)
Currently support Actions are: Currently support Event Types are passed to Motion Notify via the command which is trigger by Linux Motion (or any other event trigger)
  • on_event_start
  • on_picture_save
  • on_movie_end
Actions may be configured to trigger:
  • always (ignore any detector status)
  • if_active (only trigger if the detectors indicate that the system is active)

Detection Rules

  • Detection Rules state what detectors should be called in order
  • Currently supported detectors are:
  • ArpBasedDetector - carries out a network scan for a MAC address (the IpBasedDetector is recommended over this)
  • IpBasedDetector - Checks whether you're home by taking a list of IP addresses and pinging them to see if they are active
  • TimeBasedDetector - Allows times of the day to be specified stating times at which the system should be considered active
Detection rules can be specified in groups to indicate whether they all detectors should indicate that the system is active or whether an individual detector can determine that the system is active
  • Example 1: detector_rules = {TimeBasedDetector},{IpBasedDetector} would require that either TimeBasedDetector or IpBasedDetector indicate that the system is active
  • Example 2: detector_rules = {TimeBasedDetector,IpBasedDetector} would require that both TimeBasedDetector and IpBasedDetector indicate that the system is active
  • Example 3: detector_rules = {TimeBasedDetector,IpBasedDetector},{ArpBasedDetector} would require that both TimeBasedDetector and IpBasedDetector indicate that the system is active or ArpBasedDetector indicates that the system is active

IpBasedDetector

This detector checks whether you're at home by checking the network for the presence of certain devices by IP address.

It's highly recommended to use this rather than ArpBasedDetector which looks for MAC addresses. If you choose to use ArpBasedDetector you will need to run Motion Notify (and Motion) as root as it uses ARP - this isn't recommended.

IP detection uses ping so will run as a regular user.

Specify a comma separated list of IP addresses which will be checked - if any of those addresses are active then the system assumes that you're at home.

Note that mobile phones often don't retain a constant connection to the wireless network even though they show that they are connected. They tend to sleep and then just reconnect occasionally to reduce battery life. This means that you might get a lot of false alarms if you just use a mobile phone IP address.

Adding lots of devices that are only active when you're at home will reduce false alarms - try things like your Smart TV, desktop PC etc as well as any mobile phones. It's highly recommended to configure your devices to use static IP's to prevent the IP addresses from changing.

ArpBasedDetector

This detector checks the network for the presence of certain MAC addresses. It requires the script and Linux Motion to be run as root so it's use is only recommended when the IpBasedDetector can't be used (such as when static IP addresses are not possible).
  • presence_macs = XX:XX:XX:XX:XX,YY:YY:YY:YY:YY
  • Configuration is carried out using a comma separated list of MAC addresses.

TimeBasedDetector

This detector allows times of the day to be specified at which the system should always be considered active.
  • Example configuration - time_ranges = 01:00-07:00,12:00-13:00
  • This indicates that the system is always active between 01:00 and 07:00 and 12:00 and 13:00 so Actions will always be triggered during those hours

Installation

Install Python Libraries

sudo apt-get update
sudo apt-get install python-pip
sudo pip install PyDrive
sudo pip install enum34
sudo pip install oauth2client
sudo pip install google-api-python-client
sudo apt-get install python-openssl

Create a directory:

sudo mkdir /etc/motion-notify

Copy motion-notify.cfg, motion-notify.py and create-motion-conf-entries.txt to the directory you created

Create the log file and lock file and set the permissions

sudo touch /var/tmp/motion-notify.log
sudo chown motion.motion /var/tmp/motion-notify.log
sudo chmod 664 /var/tmp/motion-notify.log
sudo chmod 664 /var/tmp/motion-notify.lock.pid
sudo chown motion.motion /var/tmp/motion-notify.lock.pid

Update Configuration (see Configuration Section)

Change the File permissions

sudo chown motion.motion /etc/motion-notify/motion-notify.py
sudo chown motion.motion /etc/motion-notify/motion-notify.cfg
sudo chmod 744 motion.motion /etc/motion-notify/motion-notify.py
sudo chmod 600 motion.motion /etc/motion-notify/motion-notify.cfg

Create the entry in the Motion conf file to trigger the motion-notify script when there is an alert

sudo cat /etc/motion-notify/create-motion-conf-entries.txt >> /etc/motion/motion.conf
rm /etc/motion-notify/create-motion-conf-entries.txt

Motion will now send alerts to you when you're devices aren't present on the network

Configuration

SmtpEmailNotifyAction config

Enter the following configuration for emails:
  • Google account details into the GMail section of the config file
    (this is just to send emails so you could setup another Google account just for sending if you're worried about storing your account password in the clear).
  • Email address to send alerts to
  • The URL of the folder you created in your Google account (just copy and paste it from the browser). This will be sent in the alert emails so that you can click through to the folder

TimeBasedNotification Config

  • The hours that you always want to receive email alerts even when you're home

GoogleDriveUploadAction Config

Google drive authentication is done using a service account via key authentication. The service account is given access only to the folder you specify in Google Drive. Next you need to get some account credentials from the Google Developers console - this will allow motion-notify to upload files to Google Drive.
  • Go to https://console.developers.google.com/
  • From the "Select a project" dropdown at the top of the page choose "Create a project"
  • Enter "motion-notify" as the project name (or anything else that you want to call it)
Once the project is created you'll be take to the project dashboard for that project.
  • Go to APIs & auth > APIs > Drive API and click "Enable API"
  • Go to APIs & auth > Credentials and choose "Create new Client ID" and select "Service Account" as the application type.
You'll receive a download containing a JSON file.
  • Generate a new P12 key for the service account you just created using the button underneath the details of the service account.
  • Save this file in the /etc/motion-notify directory and rename it to cred.p12.
The service account has an email address associated with it which will @developer.gserviceaccount.com. Copy that email address and enter it into the "service_user_email" field in the config file.

You now need to allow the service account access to your Google Drive folder.
  • Go to the Google Drive folder where you want images and videos to be uploaded
  • Click on the share icon
  • Enter the email address of your service account and ensure that "Can edit" is selected.

Sub Folder Config

To Create Date Level Folders update the date format config. By Default this is set to roll each day. (See Permissions)

Permissions Config

Using the Service User OAuth (p12 file) means that the files are created and owned by the service user
When using folders that means we need to set the folder permission explicitly.
By Default the gmail/user from config is set as a writer. To add any other users set the read_users and write_usersvalues in config. These values should be the email addresses of the users you wish to permission.

Usage

Motion Notify is designed to work with Linux Motion but can be used to handle other applications.

To run Motion Notify call motion-notify.py and pass in the following arguments:
  • Full address of the Motion Notify config file - typically /etc/motion-notify/motion-notify.cfg
  • Full address of an image or video file relating to the event (this will be uploaded to Google Drive etc) - such as /tmp/motion/02-20151101111812-00.jpg
  • Event type - this must be one of on_event_start, on_picture_save, on_movie_end. Each Event Type has its' own set of Event Action Rules allowing you to specify what happens for each type of event.
  • Timestamp - the time of the event
  • Event ID - a unique String ID representing the event
If you're using Motion Notify with Linux Motion motion detection software you need the following lines at the end of your /etc/motion/motion.conf file:

on_picture_save /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg %f on_picture_save %s %v %n
on_movie_end /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg %f on_movie_end %s %v %n
on_event_start /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg None on_event_start %s %v None

Troubleshooting

The first three steps to troubleshooting are:
  • Check the log file: tail -fn 100 /var/tmp/motion-notify.log
  • Set the log level to DEBUG - in motion-notify.py change logger.setLevel(logging.INFO) to logger.setLevel(logging.DEBUG)
  • Call Motion Notify using one of the commands below
Trigger an "on_event_start" event

sudo /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg None on_event_start 123 456 None

Trigger an "on_picture_save" event

sudo /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg /home/pi/test.jpg on_picture_save 123 456 test.jpg

Developers

Motion Notify is designed to be extended. Create your own actions or detectors. Please contribute to the project by submitting any changes to https://github.com/amdean/motion-notify

Actions

Simply create a new Python module in the actions package, add the action to the EventActionRules section of the config file and that's it - no need to modify any code in the Motion Notify core.

Rules:
  • Module name and class name must be the same with the same case (this is due to the way that introspection is used to invoke Actions)
  • All actions must provide the following static methods:
  • def do_event_start_action(config, motion_event): (Invoked when a on_event_start action occurs)
  • def do_event_end_action(config, motion_event): (Invoked when a on_movie_end action occurs)
  • def do_action(config, motion_event): (Invoked when any other action occurs)
  • The DeleteMediaFileAction is a good example of very simple implementation
  • The GoogleDriveUploadAction is a good example of a more complex implementation

Detectors

Simply create a new Python module in the detectors package, add the detector to the detector_rules line of the config file and that's it - no need to modify any code in the Motion Notify core.
  • Module name and class name must be the same with the same case (this is due to the way that introspection is used to invoke Detectors)
  • All detectors must provide the following static method:
  • def detect_presence(config):
  • This method returns True if the system should be considered active
  • This may seem counter-intuitive as the IpBasedDetector detector returns True if it fails to detect any active IP addresses and False if it finds an active IP. An active IP indicates that someone is home so the system is not active and False is returned.

Comments and Bug Reports


This is an excellent script! You may want to add a few caveats to the tutorial....

The script failed initially because I didn't have gdata installed. Here are the commands I used to install and test: sudo wget https://gdata-python-client.googlecode.com/files/gdata-2.0.18.tar.gz tar zxvf gdata-2.0.18.tar.gz cd gdata-2.0.18 sudo chmod 777 setup.py sudo ./setup.py install ./tests/run_data_tests.py sudo rm -r gdata-2.0.18 sudo rm gdata-2.0.18.tar.gz

I used my dummy account to upload files, but still had a few issues with Google security: 1. Turn off 2-factor authentication 2. Enable the option "Access for less secure apps" at https://www.google.com/settings/security 3. Check https://security.google.com/settings/security/activity to see if Google marks the script as an intruder, and approve access if it does.

Finally, to get email working properly, I had to modify motion-notify.py line 137 from server = smtplib.SMTP('smtp.gmail.com:587') to server = smtplib.SMTP('smtp.gmail.com', 587)

I'm tempted to create a similar script for Microsoft's OneDrive using python-onedrive because it uses an OAuth token which doesn't require a login every time a file is uploaded.

-- JonSlabaugh - 27 Nov 2014

This is excellent. Thanks!

Minor error in the Change the permissions section:

sudo chmod 744 motion.motion /etc/motion-notify/motion-notify.py sudo chmod 600 motion.motion /etc/motion-notify/motion-notify.cfg

These should be (remove ownerships):

sudo chmod 744 /etc/motion-notify/motion-notify.py sudo chmod 600 /etc/motion-notify/motion-notify.cfg

One problem I am having is that Motion is generating an avi video in addition to the jpg picture files. However, your program isn't uploading the video file to Google Drive. Is there a configuration option I missed?

Thanks again.

-- FrederickGrayson - 26 Dec 2014

I was able to solve my problem about avi videos not uploading by editing line 161 to be (allon one line):

if media_file_path.endswith('swf') or media_file_path.endswith('avi') or media_file_path.endswith('flv') or media_file_path.endswith('mpg'):

-- FrederickGrayson - 27 Dec 2014

Hi, congratulations for the great work. I have problems with events. Test work fine(/etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg None 1) and I get the email . Motion start properly and the images are created and also the avi files but no mail are sent. The log is not reported anything..and no error. Can you help me?

-- RedLuca - 01 Jan 2015

@RedLuca

With motion make sure you set ffmpeg_cap_new on otherwise you won't generate a video file while recording. I had the same problem as you I think and this worked for me.

Also, follow frederick grayson's tip to edit line 161 in the .cfg file. My files are sent as a .swf file so it MAY not be necessary.

-- JeffC - 10 Jan 2015

FAIL: testRecordResponse (atom_tests.mock_http_test.MockHttpClientUnitTest)

Traceback (most recent call last): File "/root/gdata-2.0.18/gdata-2.0.18/tests/atom_tests/mock_http_test.py", line 49, in testRecordResponse self.assertEquals(live_response.status, 200) AssertionError: 404 = 200


Ran 3 tests in 1.262s

FAILED (failures=1)

Running all tests in module atom_tests.core_test ................. The error in the test. Please help?

-- SemenSemenwc - 11 Feb 2015

Might this be affected by the gdata Clientlogin deprecation? https://developers.google.com/gdata/docs/auth/clientlogin

-- BenajminMillar - 27 May 2015

As of today I am unable to log into Google Drive via the motion-notify.py script. When run from a shell it throws a 'Login Error" message. I think this is related to the announced ClientLogin deprecation. If so, and this will require some recoding.

-- FredGrayson - 30 May 2015

I agree, i have the same problem here since May, 27th

-- XavM - 01 Jun 2015

Hacked it and added OAuth2 support with service accounts, now just have to get it up where others can get at it smile

-- BenajminMillar - 04 Jun 2015

Try https://github.com/supersynthetik/motion-notify

-- BenajminMillar - 04 Jun 2015

Hello!

Thanks for your answer smile

i tried to implement it, but i get the following error message : Error: [No crypto library available] Any ideas what i need to install ?

-- XavM - 04 Jun 2015

Solved by installing apt-get install python-openssl

now i get the following error : Error: [invalid_grant]

Any ideas?

-- XavM - 04 Jun 2015

Got it working by changing the following entry : (email must be the one created by the API that ends with "developer.gserviceaccount.com") service_account_email = xxxxxxxxxxxxxxxxxxxxxx@developerPLEASENOSPAM.gserviceaccount.com

Thank you very much !!

-- XavM - 04 Jun 2015

Hrmmm I do recall some lib I had to install for crypto - can you let me know what it was and I'll add it to the readme

-- BenajminMillar - 04 Jun 2015

i have it sending email, but it will not upload anything even though the log file says it is. any ideas?

-- StupidAmurican - 05 Jun 2015

Does running the script manually work? (but not when called from motion) e.g. $ sudo /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg ~/motion/VidTest.avi 1 If so then theres probably some file permissions needed for motion, otherwise something with the account setup. Updated the readme recently with better intructions

-- BenajminMillar - 16 Jun 2015

The Authentication issues are now fixed in the new release.

-- AndrewDean - 18 Jul 2015

Hi, thanks for the script, working great.

I'm having a problem with uploading the file to my Google drive. When I use "/etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg /tmp/test.jpg 1 1234567890 123 jpg" with a file in that directory to test, it works flawlessly.

I have my motion.conf target_dir set to /tmp/motion

I get my email alert and the image files are saved to /tmp/motion, but nothing us uploaded to google drive, do I need to change my target_dir to a different directory or is there some other setting I need to adjust?

Thanks

-- TomThumb - 18 Aug 2015

Clearly not something to do with the Directory, I think I'm having some sort of permission issues, I tried running the lines with sudo in the script, but this didn't help.

Scratching my head on this.

-- TomThumb - 19 Aug 2015

@TomThumb

These are the file permissions you need:

ls -al /etc/motion-notify total 88 drwxr-xr-x 2 motion motion 4096 Aug 23 12:21 . drwxr-xr-x 110 root root 4096 Aug 23 12:12 .. -rw-r--r-- 1 motion motion 281 Jul 17 17:03 create-motion-conf-entries.txt -rw-r--r-- 1 motion motion 2572 Jul 18 11:45 creds.p12 -rw-r--r-- 1 motion motion 35121 Jul 17 17:03 LICENSE -rw-r--r-- 1 motion motion 1957 Aug 23 12:19 motion-notify.cfg -rw-r--r-- 1 motion motion 1242 Jul 18 14:46 motionnotifygoogledriveupload.py -rw-r--r-- 1 root root 1753 Aug 23 12:21 motionnotifygoogledriveupload.pyc -rwxr--r-- 1 motion motion 10163 Jul 19 16:10 motion-notify.py -rw-r--r-- 1 motion motion 5869 Jul 17 17:39 README.md

ls -al /etc/motion total 52 drwxr-xr-x 2 root root 4096 Aug 20 22:15 . drwxr-xr-x 110 root root 4096 Aug 23 12:12 .. -rw-r----- 1 root motion 25471 Jul 19 15:11 motion.conf -rw-r--r-- 1 root root 2107 Apr 1 2013 thread1.conf -rw-r--r-- 1 root root 2107 Apr 1 2013 thread2.conf -rw-r--r-- 1 root root 2110 Apr 1 2013 thread3.conf -rw-r--r-- 1 root root 2625 Apr 1 2013 thread4.conf

ls -al /var/tmp/motion-notify.log -rw-r--r-- 1 motion motion 176574 Aug 23 12:21 /var/tmp/motion-notify.log

Do you see anything in /var/tmp/motion-notify.log when you run this command? sudo /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg None 1

-- AndrewDean - 23 Aug 2015

@TomThumb

Some other things to check:

Make sure that you have the following lines in your /etc/motion/motion.conf file (the format of this changed in the last release)

on_picture_save /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg %f 0 %s %v %n on_movie_end /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg %f 1 %s %v %n on_event_start /etc/motion-notify/motion-notify.py /etc/motion-notify/motion-notify.cfg None 1 %s %v %n

Run pip freeze to check that you have the following packages installed:

PyDrive google-api-python-client oauth2client python-openssl

-- AndrewDean - 23 Aug 2015

Hi, Thank you for this wonderful tool!

Unfortunately I got the same problem as TomThumb. Only the email alert works. I can upload a file by starting the script manually in a terminal, even with 'sudo -u motion', no problem. This works fine. But Motion somehow does not trigger the upload. I changed the 3 motion.conf lines as instructed above. I checked all permissions like AndrewDean suggested. No error messages in the log files.

Thank you for your help. Pierre

-- PeteLumen - 21 Sep 2015

when calling motion-notify.py I get

Traceback (most recent call last): File "/etc/motion-notify/motion-notify.py", line 37, in <module> from objects import motion_event as motion_event_mod ImportError: No module named objects

I did not alter the script

-- ReNi - 11 Nov 2015

Edit: Somehow the Objects were messed up. Now I get

Traceback (most recent call last): File "/etc/motion-notify/motion-notify.py", line 35, in <module> from objects.enums import event_type as event_type_mod File "/etc/motion-notify/objects/enums/event_type.py", line 3, in <module> from enums import Enum ImportError: cannot import name 'Enum'

In case you didn't notice, I have no clue about Python

-- ReNi - 11 Nov 2015

@ReNi It sounds like you're missing the enum34 install. This should fix it:

sudo pip install enum34

-- AndrewDean - 12 Nov 2015

@AndrewDean thanks for your reply. I did a clean Motion Notify Setup and installed enum34.

I called the script again, not it says

Error: [No option 'mutex-enabled' in section: 'GoogleDriveUploadAction']

I double checked my inputs in that particular section, it all seems correct to me.

Sorry for the inconvinience

-- ReNi - 12 Nov 2015

@AndrewDean I added "mutex-enabled = 1 to the GoogleDriveUploadAction Section in motion-notify.cfg, just for fun. Now the output is

Error: [Could not find the motion folder 0BwKo0Hyq6cR9Rm5XNnJ6bTQ1b00]

I checked the link / the ID again, it is correct.

What is this mutex-enabled option for? When I search on google it suggests SQlite

-- ReNi - 12 Nov 2015

@ReNi Sorry - my last code merge must have gone wrong and the mutex option was missing. I've put a fix in place for that now. The mutex option prevents simultaneous uploads from happening so if you have several events at once it won't take up all of your bandwdith.

The new error message can be caused by two things - incorrect folder ID (which doesn't seem like the problem in your case) or a Google Drive permissions issue.

Can you check if your service user has edit permissions on that folder in Google Drive? If you login as the user specified as the "owner" go to the folder and then "share" you should see your xxxx@developerPLEASENOSPAM.gserviceaccount.com with edit permissions.

-- AndrewDean - 13 Nov 2015

@AndrewDean Thanks for the info!

I checked the permissions, xxxx@developerPLEASENOSPAMPLEASENOSPAM.gserviceaccount.com can edit. I also checked the motion-notify.log, it says

2015-11-13 04:20:19,255 DEBUG GoogleDriveUploadAction starting authentication 2015-11-13 04:20:19,258 DEBUG GoogleDriveUploadAction authentication complete 2015-11-13 04:20:19,599 ERROR Could not find the Motion folder 0BwKo0Hyq6cR9Rm5XNnJ6bTQ1b00

It seems like it authenticates just fine, but cannot see the folder for some reason. I'm tempted to generate a new p12 key and see if that changes things, but I'm too afraid this will mess things up completely.

-- ReNi - 13 Nov 2015

@ReNi @AndrewDean

I'm also getting the error:

Traceback (most recent call last): File "/etc/motion-notify/motion-notify.py", line 37, in <module> from objects import motion_event as motion_event_mod ImportError: No module named objects

How do I go about fixing it?

-- TomBurford - 09 Dec 2015

@TomBurford

I've not seen this exact issue before. It looks slightly different than the problem ReNi was having which was this missing enum34.

I tried to replicate the issue but wasn't able to.

Can you confirm what Python version you're using?

Do you have all of the required packages from the Installation section of this page installed?

It almost sounds like the objects directory is missing. Does your motion-notify directory look like this?
  • drwxr-xr-x 8 motion motion 4096 Dec 16 21:21 .
  • drwxr-xr-x 3 pi pi 4096 Dec 16 21:21 ..
  • drwxr-xr-x 2 motion motion 4096 Dec 16 21:21 actions
  • -rw-r--r-- 1 motion motion 346 Dec 16 21:21 create-motion-conf-entries.txt
  • drwxr-xr-x 2 motion motion 4096 Dec 16 21:21 detectors
  • drwxr-xr-x 8 motion motion 4096 Dec 16 21:21 .git
  • -rw-r--r-- 1 motion motion 0 Dec 16 21:21 init.py
  • -rw-r--r-- 1 motion motion 35121 Dec 16 21:21 LICENSE
  • -rw-r--r-- 1 motion motion 3446 Dec 16 21:22 motion-notify.cfg
  • -rwxr-xr-x 1 motion motion 4607 Dec 16 21:21 motion-notify.py
  • drwxr-xr-x 3 motion motion 4096 Dec 16 21:21 objects
  • -rw-r--r-- 1 motion motion 15576 Dec 16 21:21 README.md
  • drwxr-xr-x 2 motion motion 4096 Dec 16 21:21 tests
  • drwxr-xr-x 2 motion motion 4096 Dec 16 21:21 utils

-- AndrewDean - 17 Dec 2015

Hi there, am having trouble getting the google drive upload to work - was hoping for some advice. When the 'on_movie_end' event is triggered, the call to the GoogleDriveUploadAction.py returns an error when attempting to import SignedJwtAssertionCredentials from oauth2client.client.

"Error: [cannot import name SignedJwtAssertionCredentials ]"

Thanks in advance for any advice, smile

-- ChrisJ - 02 Jun 2016

ChrisJ - The issue you mentioned relating to SignedJwtAssertionCredentials is resolved now. More info here:

More info here: https://github.com/amdean/motion-notify/issues/11

-- AndrewDean - 24 Sep 2016

RelatedProjectsForm edit

ProjectSummary Google Drive Uploader and Notifier which detects if you're home. The event handler framework allows you to configure what actions are triggered based on different types of event. Network detection checks whether you're home and then images and videos can be uploaded to Google Drive. The framework is designed to be easily extended to support other types of Cloud storage, other actions in response to events or other methods of detecting whether you're home.
ProjectStatus Stable
ReleaseVersion 1.0.2
ProjectSubmitter AndrewDean
Topic revision: r31 - 24 Sep 2016, AndrewDean
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.