Hello,
is there a possibility that octoprint automatically uploads files from a nas?
I already tried automatically copying the files with a program from the nas to the watched folder, but octoprint doesn't recognized the files in the watched folder.
So my current setup is:
PC(Windows) <-> NAS with Samba(always running; linux) <->octoprint(linux)
so the goal is, to safe files from the pc on the nas which should than automatically be uploaded to octoprint when the laptop with octoprint installed on it ist running.
Nope. OctoPrint won't do this. There is a watch folder in octoprint that you can drop files into which will cause autoprint to "import" them. You can sync a Windows pc's folder with a linux pc's folder using a tool called WinScp.
I do the same. I share the upload folder with my windows pc (cifs samba share). I store the gcode file with the windows PC and the only thing what i have to do is: Press the Refesh File List Button.
In your case it should work if you create a share "upload" on your nas... and share it with both. The octoprint server... and with your home pc.
I really do not recommend sharing the upload folder since there's some bookkeeping done on the files therein which you bypass if you modify it outside of the control of OctoPrint.
It should mostly no longer cause issues since I've done a ton of workarounds to make sure this scenario doesn't break people's setup, but still, it's not officially recommended.
@foosel
What is from your view the recommended solution to sync files? If i use cura there is no problem. But S3D doesnt provide any API Interface to Octoprint.
For me i see a controlled folder... watched via script and upload the folder content over the api interface if a file is created or changed..
This is precisely what the watched folder is supposed to do. Put stuff in there, it will get uploaded through the right internal APIs and all necessary house keeping will be taken care of.
The problem with sharing the watched folder is, that the ocotprint server is not always running, so I would always need to start the octoprint server and than go back to the pc to put the files in the shared folder, wich i would like to avoid.
Unfortunately this is not working. I tried different tool that copied the files from the nas to the watched folder automatically when the octoprint server is running. But Octoprint didn't uploaded them. Octoprint only uploaded them when I manually copied them to the watched folder. Is there a possible fix?
Sorry for my bad english, I hope everything is understandable.
Then please file a bug report with full reproduction steps so I can look into it. Otherwise the likelihood of it getting lost is sadly very high as I have a ton of stuff on my plate all the time
You could change your workflow and use the GitFiles plugin, using a github repository as the master and doing change control as you might with software.
It's been a while since I've messed with this, but isn't it possible to just make the folder on your NAS be your watches folder by directing OctoPrint to use that folder as the watched folder?
The watched folder does not have to be on your SD card, does it?
Sure. But i need more time to analyse. The current state is: I perform a server restart and it looks that now from both systems file are accepted. I dont now why.
You could change your workflow and use the GitFiles plugin, using a github repository as the master and doing change control as you might with software.
The owner of the folder is root, but everyone can read an write the folder. The gcode files in the folder have the same permisson as the folder.
In my opinion there shouldn't be any problems with the permissions, but I'm not that familiar with linux file structure.