GithubHelp home page GithubHelp logo

sleemanj / flashairsync Goto Github PK

View Code? Open in Web Editor NEW
29.0 14.0 18.0 19 KB

A simple automatic file synchronisation script for Toshiba FlashAir devices.

License: GNU Lesser General Public License v2.1

PHP 100.00%

flashairsync's Introduction

FlashAirSync

A simple automatic file synchronisation script for Toshiba FlashAir devices.

FlashAir Auto Sync, copies all images from flash air card when it is available and drops them in a local folder.

Requires PHP 5.4 CLI

Pass Configuration variables by command line e.g.

php FlashAirSync.php --flashairip=192.168.0.2

Details

If the camera isn't online, it quits. If the camera goes offline during the processing, the next time it will do a full update.

It only copies a file once.

Deletions on the camera will NOT propogate to the target - camera space is tight so you are free to delete files there without losing the off-camera copy.

If you delete a file from the target directory, that deletion WILL propogate to the camera because the assumption is, it's a junk image you don't want, so no need for it on camera either.

Modifications on the camera will NOT propogate to the target - you're not modifying images on the camera in any meaningfull way.

Modifications in the target will NOT propogate to the camera - the camera will always have the "original".

For more info: https://flashair-developers.com/en/documents/ https://flashair-developers.com/en/documents/api/ http://www.extrud3d.com/flashair

FlashAir Operating Mode

FlashAir cards normally operate in host mode, that is, they appear as a Wifi Network to which you connect.

However they can also operate in Client mode (aka Station mode), that is they connect to your existing network and you can access them by IP address if you have your existing wifi router/api assign a fixed IP to them.

See the extrud3d link, and https://flashair-developers.com/en/documents/api/config/ for details.

In order to delete files on the card (when they are deleted on the destination directory), UPLOAD must be enabled in the FlashAir config file also to turn on the upload.cgi API.

Sample config which puts card in wifi client mode (so it connects to your existing wifi router/access point), with upload enabled the config file is SD_WLAN/CONFIG on the sdcard, just edit then turn off and on the card to reload.

[Vendor]
CIPATH=/DCIM/100__TSB/FA000001.JPG
APPMODE=5
APPNETWORKKEY=YOUR_NETWORK_KEY_HERE
APPSSID=YOUR_SSID_HERE
VERSION=F24A6W3AW1.00.03
CID=02544d5357303847075000c0bf00c801
PRODUCT=FlashAir
VENDOR=TOSHIBA
MASTERCODE=00216b97d78a
LOCK=1
APPNAME=flashair
UPLOAD=1  

flashairsync's People

Contributors

sleemanj avatar sudsy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flashairsync's Issues

Pass parameters as arguments rather than hardcoded into script

Hi There,

I have started using this script for synchronising files. Thanks for your work on this.

I wondered if you would be interested in some contributions? I have noticed some issues that I would like to fix. I can work independently, but it might be better if I could add the improvements to your script.

The first part of making this work would be to change the script so that the arguments are passed into the script rather than hardcoded. Would you be open to a pull request that addresses this issue?

Compile-Error

Hi,
using your script on MacOS I get an compile error located in line 190:
// Else normal file
$Day = ($r[4] & 0b0000000000011111);
$Month = ($r[4] & 0b0000000111100000) >> 5;
$Year = (($r[4] & 0b1111111000000000) >> 9)+1980;

  $Seconds = ($r[5] & 0b0000000000011111) * 2;
  $Minutes = ($r[5] & 0b0000011111100000) >> 5;
  $Hours   = ($r[5] & 0b1111100000000000) >> 11;

Seems that something is different on Mac dealing with the date arithmetic. Any idea what I've to change?

I've to admit that I've no experience with php - so it might be quite obvious…

Best regards,
Ingo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.