Tablet Photo Frame with FTP Sync and Automated Start&Stop

I was searching for a Photo Frame to be placed at the grandparents of my little daughter with the following features:

  • Synchronisation with a FTP server to allow remote update of photos
  • Automated stop in the evening and start in the morning to prevent the photo frame from illuminating the room

As I could not find a turnkey solution I deceided to build it on my own based on an old Samsung Galaxy Tab 3 8.0 (T310). Note: The tablet needs to be rooted to allow automated stopping of the photo frame in the evening.

Step 1: FTP Synchronisation

  • Create FTP server login (I used my hosted webspace to create a ftp subaccount)
  • Create local folder for pictures on tablet (e.g. /sdcard/fotos_bilderrahmen)
  • Install FolderSync lite app (Play Store)
  • In FolderSync create “Account” using your FTP login data
  • In FolderSync create “Folderpair”. Select the FTP-Account and the local folder. Define scheduling e.g. hourly, activate deleting files on local side if deleted on server.

Step 2: Photo Frame app

  • Install Photo Frame app Premium (Play Store)
  • Start app and configure (e.g. refresh folder content e.g. 15min, orientation, transition between photos, …)
  • Select local photo folder (SD) and create startpage shortcut to start photoshow directly from this folder (use button top right)

Step 3: Automate start and stop of photo frame app

  • Install Automate app (Play Store)
  • Start app and activate app start after boot (in app properties)
  • Create new flow (see screenshots, take care on values for app start block)

    Step 4: Integrate in wooden photo frame

    • Fix tablet with double sided mirror tape (e.g. Tesa)
    • Glue additional wooden spacers to stabilize
    • Optional: Order (or DIY) taylored passepartout (e.g. art&more)


    Calling a HTTP url from FHEM to trigger action

    I need to call HTTP urls from FHEM for several things, like firing IR signals to my TV (see my post: ).
    As far as I know, FHEM currently does not have a way to do this easily (HTTPMOD seems to be a bit too complicated for that).

    My solution is based on a simple PERL script which is called directly from FHEM:

    Script /home/pi/

    #!/usr/bin/perl -w

    use warnings;
    use strict;
    use Time::HiRes qw/time usleep/;
    use Socket qw(:all);
    use POSIX ":sys_wait_h";

    use LWP::Simple;

    #print $ARGV[0];
    #print "\n";

    my $url = '';
    $url .= $ARGV[0];

    my $content = get($url);
    die "Can't GET $url" if (! defined $content);

    Then make it executable: sudo chmod +x /home/pi/

    Now you can call it from FHEM e.g. from a DOIF like this:

    define DOIF_Dummy_WohnzimmerTVMode DOIF ([Dummy_WohnzimmerTVMode]) ({system ("/home/pi/ 50153655 &")})

    Note: Here I pass the a argument to the Perl script which is attached to the URL.

    Wifi Infrared IR Remote Extension using ESP8266

    In the last months we integrated a rising count of IoT devices into our FHEM based homeautomation system (Wifi switches, LED lights, door and window sensors etc.). Nevertheless, most of my entertainment devices (TV, Sounddeck) were not integrated and required their own infrared remote to be turned on, switch channel, etc. A infrared adapter needed to get in place to integrate these devices into my tablet based FHEM interface.

    As I had a lot of success using ESP8266 modules for 24×7 running devices in the past, I deceided again to use a ESP8266 (Wemos D1 mini module, cheap available at Aliexpress). My aim was to let the ESP fire two IR leds which are installed directly in front of at TV and Sounddeck. A HTTP server running on the ESP receives the IR request in form of decimal IR code (which I identified before using a IR receiver on a ESP).

    – ESP8266 (e.g. Wemos D1 mini or NodeMCU)
    – 2x IR transmitting LED (any 950nm IR led will work), ~20Ohm 0.5W resistor, NPN transistor (any NPN like BC547, BC548 or PN2222 will work) , 330Ohm 0.125-0.25W resistor
    – optional to identify IR codes using your devices IR remote: IR-receiver 38kHz (e.g. TSOP 4838)

    My code is based on this nice library and its examples:

    Using the TSOP4838 wired to 5V of Wemos board, GND and D2 (aka GPIO 4) and the example from the libary ( I identified the following IR codes for my device (library will print out HEX but DEC required for HTTP call lateron):







    The hardware of the IR transmitting server is set up as follows. I use the 5V of Wemos board which is hardwired to the 5V rail of the USB power supply:

    The IR leds are consuming about 100mA of current. I deceided to run 2 in series with a 20Ohms 0.5W resistor burning about 2Volts (3Volts burned by two led and transistor collector-emitter). The NPN transistor is driven by D2 (aka GPIO 4) via a 330Ohms resistor.

    My Arduino sketch for the ESP bases on this example from the library:

    A few pictures of the hardware:

    Finally now I am able to put my old IR remotes away and send out IR commands via simple HTTP request to the ESP (e.g.

    The examples of the library are using GPIO 2. So the PIN needs to be updated in the Arduino sketches to GPIO 4.
    I configured my DSL router, to assign the same IP for the ESP all the time.

    Hint: See my next post how to call the IR server from FHEM: