Octoprint timelapse folder on external volume

Hello everyone,

my timelapse folder is on an external drive. Now, when I boot the whole system, that external drive is apparently (at least sometimes) only mounted after the Octoprint server is started. In such cases, Octoprint will of course issue an error message stating that the folder is not available. The real problem, however, is that it not only displays this error message (like the warning that the camera itself is not available), but also resets the directory to the default value.

For example, is there a setting in config.yaml to suppress the “folder-check”? Or is there any other way to at least not automatically reset the folder to it´s default value? I realize that Octoprint does this for good reasons, of course, but such setting to set the folder-change off, would be really helpful. :slight_smile:

I mean, in the worst case, it simply can't save a timelapse video when printing, just as it simply can't record a video if the camera is not available...

But perhaps there is already a way to set this that I may have simply overlooked?

Thank you in advance!

Kay

I think there's a way to add a dependency to the OctoPrint service file to make sure the drive is mounted prior to OctoPrint starting up. Probably something with RequiresMountsFor in the systemd service file. I'm not a linux guru but I'm sure that may give you some pointers of what to look for.

Quick search here in the forum gave me this one post related to a NAS mount in the service file.

Thank you very much @jneilliii for you reply! :hearts:

Unfortunately, I have to get this right for macOS. Here so-called “LaunchDaemons” are defined as plist-files like this

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>EnvironmentVariables</key>
    <dict>
      <key>PATH</key>
      <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:</string>
    </dict>
    <key>Label</key>
    <string>it.YOURNAME.octoprint</string>
    <key>Program</key>
    <string>/Users/USER/OctoPrint/venv/bin/octoprint</string>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <false/>
    <key>LaunchOnlyOnce</key>        
    <true/>
    <key>StandardOutPath</key>
    <string>/tmp/startup-octoprint.stdout</string>
    <key>StandardErrorPath</key>
    <string>/tmp/startup-octoprint.stderr</string>
    <key>UserName</key>
    <string>USER</string>
    <key>GroupName</key>
    <string>staff</string>
    <key>InitGroups</key>
    <true/>
  </dict>
</plist>

and stored here

/Library/LaunchDaemons/it.YOURNAME.octoprint.plist

Following the documentation I found informations about an "Arbitration Framework":

Disk or Server Availability

If your daemon depends on the availability of a mounted volume (whether local or remote), you can determine the status of that volume using the Disk Arbitration framework. This is documented in Disk Arbitration Framework Reference.

... described here:

https://developer.apple.com/documentation/diskarbitration

Unfortunately, I am at least as little of an Apple guru, too. :see_no_evil: Does anyone have any idea how to implement this in such a plist file with the help of the linked documentation?

Any help would be highly appreciated!