[SOLVED] Problem with storing settings

Hello,

I am developing an plugin and have trouble with storing some simple settings.

This is my save method:

ControllerAmp.prototype.saveGeneralSettings = function(data) {
	var self = this;
	
	self.logger.info(data['amazon_domain_extension'].value + " " + data['max_bitrate'].value);

       //store the settings in config
	self.config.set('amazon_domain_extension', data['amazon_domain_extension'].value);
	self.config.set('max_bitrate', data['max_bitrate'].value);

	self.logger.info(self.config.get('amazon_domain_extension') + " " + self.config.get('max_bitrate'));

	self.commandRouter.pushToastMessage('success', "Configuration update", 'The configuration has been successfully saved.');

	return libQ.resolve();
};

This line

self.logger.info(data['amazon_domain_extension'].value + " " + data['max_bitrate'].value);

shows has the following output:

Mar 05 14:53:52 volumio volumio[3053]: info: .co.uk 1

And this line

self.logger.info(self.config.get('amazon_domain_extension') + " " + self.config.get('max_bitrate'));

shows has the following output:

Mar 05 14:53:52 volumio volumio[3053]: info: undefined undefined

Here the config.json

{ "enabled": { "type": "boolean", "value": false }, "username": { "type": "string", "value": "" }, "password": { "type": "string", "value": "" }, "amazon_domain_extension": { "type": "string", "value": ".de" }, "max_bitrate": { "type": "number", "value": 1 } }

Does anybody has an idea whats going on here?

The configuration is correctly loaded. It is working for username and password already.

The data variable contains the selection from two selection/dropdown elements.

Any help is welcome.

Is there a way how I can debug this?

I have some problems setting up the remote debugging with webstorm. I followed this instruction (https://volumio.github.io/docs/Development_How_To/Debugging.html). But when I start debugging it breaks in so many other files like v-conf\index.js and so on.

Thank you.
Stefan

Hi,

I have solved the issue. I have figued out that the config.json in “/data/configuration/mycategory/myplugins” was outdated.

Greetings,
Stefan