LE 18 on Pi 4 and Apple Timecapsule

  • Hello Everybody !

    I'm using LE on Pi for a long time now since I started with Pi 1 !

    All my contents and especially movies are on an Apple Timecapsule via SMB (Most likely v1).

    On old LE versions, only adding a source using the full path smb://user:pass@timecapsuleIP/movies was doing the trick !

    Using a Pi 3b+ this was no longer working, timeout error, but "chewitt" had given a great solution consisting of creating mounts directly on unix by creating a mount file, enabling it and rebooting...

    SMB with Libreelec 8.2 and TimeCapsule not working

    This solution was brilliant and very efficient, I never had a single problem since I enabled it more than 1 year ago ! <3

    I'm now using a Pi 4 and as I was building my new setup, I was confident in having the same result with the same trick but no luck... I now have an unix error message about the "systemctl" command saying it's not done properly.... ;(

    Anybody has an idea how to get around this because I'm now stuck not being able to access my share from kodi !

    Thanks !

  • The file is named= storage-data.mount

    Its content =

    Then in SSH I run= systemctl enable /storage/.config/system.d/storage-data.mount

    And I get=

    And then nothing more happens....

    • Official Post

    ^ You are missing the [install] section .. so a copy/paste error as predicted :)

  • It worked.................

    Sorry for wasting your time with such lame error !

    I must say that I've search for a long time before hitting the post I refered to that finaly made it worked, thanks again for this workaround.

  • Hi everyone,

    I am using chewitt's solution below on a RPI 3 with an old Apple Timecapsule. It works well when i first turn on the Timecapsule and wait until it is visible (pingable) on my LAN and then turn on the PI. But when I turn on everything at the same time, the Timecapsule does not get mounted, because Libreelect boots so fast. Is there a way to include a check for network availability of the Timecapsule in the mounting scrit below?

    Thanks,

    Thomas

    ^ You are missing the [install] section .. so a copy/paste error as predicted :)

  • I tried the following, but it failed.

    The path for the file below is: ~/.config/system.d/storage-media_storage_1.mount

    After turning on the Raspberry Pi and the Timecapsule I ran systemctl status storage-media_storage_1.mount

    and got the following output:

    Any idea, what to try next?

    Thanks,

    Thomas

  • Both Timecapsules are online, but Kodi boots so fast, the TCs are not ready when the mounting script runs.

    Is there a possibility to delay the mounting process until the TCs have been successfully pinged?

  • Add "TimeoutSec=30" to the [mount] section and see if that works? .. i'm not sure what the defaults are.

    If that doesn't work, the alternative would be to create a bash script with a working sequence of mount commands, then execute the script from a systemd .service file with right before/after dependencies for Kodi use.

  • Now I got it, it is a race between devices. Create

    Code: wait-for-server.service
    [Unit]
    Description=Wait for server
    After=time-sync.target
    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c "until ping -c 1 -W 3 192.168.50.12;do sleep 1;done"
    ExecStart=/bin/sh -c "until ping -c 1 -W 3 192.168.50.13;do sleep 1;done"
    StandardOutput=null
    #StandardError=null
    RemainAfterExit=yes

    and add

    Code
    Requires=wait-for-server.service
    After=wait-for-server.service

    to your mount units.

    Untested, expect some rough edges.

  • Thanks for your suggestions, but it did not work, the timecapsule was not mounted.

    Here is a link to my pastekodi: http://ix.io/3y67

    Output of arp -a

    Code
    kodipi:~ # arp -a
    media-storage-1.B47Homenet (192.168.50.12) at 00:24:36:a4:31:9a [ether]  on eth0
    ? (192.168.50.213) at 04:d9:f5:29:b0:b0 [ether]  on eth0
    Thomass-iMac.B47Homenet (192.168.50.3) at 3c:07:54:34:2a:6b [ether]  on eth0
    RT-AX92U-ADE0.B47Homenet (192.168.50.1) at 04:d9:f5:29:ad:e0 [ether]  on eth0
    kodipi:~ # 

    These are the two system.d files according to your instructions:

    storage-media_storage_1.mount

    wait-for-server.service

    Code
    [Unit]
    Description=Wait for server
    After=time-sync.target
    
    [Service]
    Type=oneshot
    ExecStart=/bin/sh -c "until ping -c 1 -W 3 192.168.50.12;do sleep 1;done"
    StandardOutput=null
    #StandardError=null
    RemainAfterExit=yes

    When I reboot just the pi, leaving the Timecapsule on, it works.

    So, somehow, system.d is not waiting for the TC to be available before running the mount scirpt.

    (BTW, I removed the second TC to simplify for the time being.)

  • It is much better: waiting 38 sec until the server is up and failing with "Connection refused" :)

    You have to wait until the CIFS server is up, not only the device.:

    Code
    ExecStart=/bin/sh -c "until nc -z 192.168.50.12 139;do sleep 1;done"
  • It did not work.

    I think, I identified the problem, I lack sufficient understanding how system.d works.

    Below is the same info as in my last post.

    But never mind, I will try to figure it out from here and may come back when I really get stuck.

    Thanks again mglae and chewitt,

    Thomas

    http://ix.io/3ydI