Is there a way to trigger a refresh command from ssh that would trigger the same action as the "refresh file list" button in the webui?
so you want to refresh the gui from your terminal window?
correct, im settings up git to manage my model and slice versions. I have setup a script that runs after pushing a commit that rsyncs the latest gcode file to the appropriate directory inside of ~/.octoprint/uploads and I would like that same script to force a refresh.
I am going to go out on a limb and guess the answer is no, not from the server side.
If you think about it, the data is queried by the browser from the server not pushed from the server side.
But I am just applying what knowledge I have about how things work, which is not much on the PC applications side of things.. But Octoprint is a print Server.. and the browser is the client.. There may be a power shell commend to run something on the PC side.. but that is out of my area completely.
Good luck, sounds like you are have automated you work space really well !
For some browsers you can get auto refresh plugins.
...with two exceptions.
- If the page you just loaded wants to manage this, then it has the rights to do so. (If the page you loaded is the one which reached out and did a
git pullor ran the shell script which includes that command then in theory it also has the rights to push a button on its own interface programmatically.) So this might be code which runs server-side on the Raspi by being triggered somehow.
- A browser plugin could run client-side executable logic and probably do this. They're usually too difficult to write, though.
It feels a bit too complicated, to be honest. An auto-refresh in the header information at the top of the page would put too much work on the Raspberry and possibly hurt your print quality. I'd advise that you should just click the Refresh button as part of your roll-out strategy.
Fair enough, the git repo works great and was not that hard to configure and I wish I had set it up a long time ago. The "auto refresh" would just be more icing on the cake.