What is the problem?
When trying to set settings for my plugin they somehow aren't properly saved & don't appear in the settings (
localhost/api/settings). Upon checking for the settings-values I just set, it returns
What did you already try to solve it?
I've tried replicating the code from a working plugin I use "DeleteAfterPrint" - upon installing, the settings are created as they should.
The code in my plugin;
# coding=utf-8 from __future__ import absolute_import import octoprint.plugin import octoprint.settings import os class PrinterHubTestPlugin(octoprint.plugin.SettingsPlugin, octoprint.plugin.StartupPlugin, octoprint.plugin.EventHandlerPlugin, octoprint.filemanager.storage.StorageInterface): # #~~ StartupPlugin mixin def on_after_startup(self): self._settings.set_boolean(["test1"], True) self._settings.set_boolean(["test2"], False) self._settings.set(["test3"], "test_string") self._settings.save()
Additional information about your setup
- Octoprint version: 1.3.12 running on OctoPi 0.15.1