Wifi Camera Upload Alerts to Google Drive

Google drive loader for xiaomi smart ip photographic camera

Google drive loader for xiaomi smart ip camera (12CN). xiaomi_gdrive let you automatically upload your videos from xiaomi smart ip camera to your google drive account. Also it tin automatically remove one-time files from your google bulldoze account to prevent space exhaustion.

ants_smart_webcam_ xiaomi

Step-by-step education for installing xiaomi_gdrive

  1. Turn off your camera and get microSD
  2. Download xiaomi_gdrive and unzip it (https://github.com/porunov/xiaomi_gdrive/releases/download/0.0.5/xiaomi_gdrive.nothing)
  3. Re-create next folders into your microSD:
  1. If y'all want to set the time when your GDrive tin can interact with the Internet (i.e. ship or remove files to Google Drive) you can change change the time in GDriveAutoremover and GDriveUploader files. If you desire to let the photographic camera interact with the Internet 24 hour/twenty-four hours (immediately send a video after information technology is recorded) and so skip this footstep. If you even so want to change the time then open your GDriveUploader script and change start_time and finish_time variables to whatever yous want in the next format: HH:MM:SS. To practise information technology notice the adjacent line:

and modify the fourth dimension in this line to whatever you lot desire. Example 7:35:00 pm will be:

Then find the adjacent line:

and change information technology to whatever you want. Case 01:00:05 am volition exist:

Your photographic camera volition exist able to interact with the Internet from start_time to finish_time.

  1. Put microSD into your camera
  2. Plough on camera
  3. Afterward turnung on a camera use telnet to connect to your photographic camera (login: root, countersign: 1234qwer):
              telnet {YOUR_CAMERA_IP_ADDRESS} Case: telnet 192.168.0.70                          
  1. Go to the browser

  2. Create your Google Drive application and OAuth keys for Google Drive API (example tutorial: http://www.iperiusbackup.net/en/how-to-enable-google-drive-api-and-get-client-credentials/)

    Example:

    1. Become to Google Api Console (https://console.developers.google.com/?hl=RU)
    2. Click "Bulldoze API"
    3. Clieck "Create project" and create it (if don't have one)
    4. Click "Enable"
    5. Get to Credentials and add credentials to your project
      1. Where volition you be calling the API from? : Other UI (e.m. Windows, CLI tool)
      2. What data will you exist accessing? : User data
      3. Click "What credentials do I need?"
      4. Name your credentials as you want
      5. Product proper noun shown to users - employ any name
      6. Click "Done"
    6. Click on your credentials
    7. Save your client id and client surreptitious
  3. Go to your panel back

  4. Run GDriveConf to configure your Google Drive access:

              sh /home/hd1/gdrive/GDriveConf                          
  1. Paste your client id and printing enter
  2. Paste your client clandestine and press enter
  3. Copy link which you see and paste into your browser
  4. Click "Have"
  5. Copy lawmaking which you come across
  6. Go to your console dorsum
  7. Paste your code and press enter
  8. You will be suggested to see the folders. Press Enter if you want to meet all folders. If y'all want to run across merely root folders type root and press Enter.
    //Folders showing isn't fast. Expect for 5-10 seconds to run across your directories.
  9. You will see your folders (number of folder is on the left side)
  10. Blazon the number of a folder and printing Enter. (If you desire to salvage videos in the root dir then just press Enter)
  11. You lot will exist asked if you desire to turn on automated remove. Printing 1 and type Enter if you want. Press 0 and type Enter if yous do non desire. GDriveAutoremover itself will delete sometime files in instance if your disk infinite overflows.
  12. Reboot your camera:
  1. Done

How it works: The script in the loop will create the same folders as in the tape folder and upload videos into Google Bulldoze. After the reboot, or failure of the Internet script continues unremarkably send files. If you have enabled automated remove, GDriveAutoremover will bank check your gratis space every 45 minutes. In case when deejay space is not enough, the script will erase erstwhile videos (IMPORTANT: practice not put anything extra in the folder which is designed for video because GDriveAutoremover tin remove it if it considers that the disk space is not enough).

This scripts were tested under 1.8.5.1L firmware

Troubleshooting:

  1. Your camera starts reboot from time to time. Your RAM is likely not enough. Turn off additional features which you have installed.

    1. Turn off ftp server:

    2. Plow off HTTP server

                            rm /habitation/web/server rm /home/web/tape                                          
    3. Turn off RTSP server

                            rm /domicile/rtspsvr mv /dwelling house/recv_X.726 /domicile/recv.726                                          
    4. Reboot your camera

  2. Check if camera tin can send requests to the Internet.

                      ping -q -c2 8.8.8.8 ping -q -c2 google.com                                  

    if information technology isn't pingable then check your route table:

    1. If your gateway isn't correct then add together your gateway (Where 192.168.0.1 is your router IP accost):

                            my_router_ip="192.168.0.1" route add together default gw ${my_router_ip} ra0                                          
    2. To have normal gateway afterwards reboot run all next commands:

                            echo "#!/bin/sh" > /etc/init.d/S65route echo "change_def_route(){" >> /etc/init.d/S65route echo "route add together default gw ${my_router_ip} ra0" >> /etc/init.d/S65route repeat "}" >> /etc/init.d/S65route echo "change_def_route &" >> /etc/init.d/S65route echo "exit 0" >> /etc/init.d/S65route chmod +x half dozen /etc/init.d/S65route echo "${my_router_ip}" > /tmp/gw1                                          
    3. Add public DNS

                            echo "nameserver 8.eight.viii.8" > /var/run/dhcpcd/resolv.conf/resolv.conf echo "nameserver viii.8.8.viii" > /etc/resolv.conf                                          
    4. Reboot your camera

carreonhielturry.blogspot.com

Source: https://github.com/porunov/xiaomi_gdrive

0 Response to "Wifi Camera Upload Alerts to Google Drive"

Postar um comentário

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel