URL options for gcode viewer

I would like to be able to open an url and instantly display the gcode viewer synced, centered and zoomed in.
(Problem: I'm opening the viwer directly in OBS-studio where I cannot use the html ui)

So far all I know is that I can call http://myOctoPrintUrl/#gcode which displays the viewer directly.

Is this somehow already possible with an URL, or would it require a plugin?

Selecting the checkboxes at the bottom of that tab seems to remember their settings, even after a restart. I would guess that they're then persisted in the ~/.octoprint/config.yaml file. So set them once and forget about them.

You've already noted the URL to select that tab.

1 Like

Just selecting the checkboxes didn't do it for me:
In chrome it does remember the settings, but the web view in OBS does still show the default settings

cannot re-test it now, tomorrow when i'm back in the office i wil check out if ican find anything in the config.yaml

These settings are stored in the browsers LocalStorage. So they are present and remembered in the used browser, but not from "outside".

2 Likes

Ah. In theory, though, if the user continues to use the same browser and refers to octopi.local each time, then the LocalStorage will persist. If the user refers to it by an IP address (and the OctoPrint server later gets a different IP address), then the LocalStorage persistence will be lost.

Not only in theory, but also in practice.
Already octopi.local and the corresponding IP address are two different things and thus there are two different entries in the LocalStorage.

2 Likes

To solve @IARI's original problem, changing the "default" settings for those buttons might make sense. I'm sure someone can figure out how to do that.

1 Like