How to create a Volumio plugin, the easy way

Discuss, contribute and orient Volumio development!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

How to create a Volumio plugin, the easy way

Postby pintea » Sat Jun 17 2017 19:10

Hi kiefer,

Error number 1: you need to run the volumio plugin refresh command in the plugin's directory. If then it still doesn't work, try as root.

Error number 2: I'm not sure what the problem is, but try running this on the volumio: sudo chown -R volumio:volumio /data
Cris Pintea http://pintea.net

If you appreciate my work buy me a coffee!

That's very appreciated!
User avatar
pintea
Moderator
 
Posts: 47
Joined: Fri Apr 14 2017 22:54
Location: Turin, Italy

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


How to create a Volumio plugin, the easy way

Postby exetico » Sat Nov 25 2017 21:10

Could anyone provide some knowledge about my problem with .sh-scriots :)?
running-with-onstart-and-onstop-t8152.html
User avatar
exetico
Fresh off the boat
Fresh off the boat
 
Posts: 7
Joined: Tue Jun 17 2014 14:13


How to create a Volumio plugin, the easy way

Postby Saiyato » Wed Jan 17 2018 10:51

I can't seem to publish the new plugin using "volumio plugin publish", am I trying too soon? Using version 2.348 on a Raspberry Pi 3.

Code: Select all
volumio@volumiolcd:~/volumio-plugins/plugins/user_interface/rotaryencoder$ volumio plugin publish

This command will publish the plugin on volumio plugins store

Publishing the plugin
? do you want to change your version? (leave blank for default) 1.0.2

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'volumio@volumiolcd.(none)')
Nothing to commit
Compressing the plugin
Plugin succesfully compressed
Switched to a new branch 'gh-pages'
? Insert some details about your plugin (e.g. features, requirements, notes, etc... max 1000 chars) Installs basic rotary encoder functionality using only Node JS modules.

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'volumio@volumiolcd.(none)')
(node:14845) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Command failed: /usr/bin/git commit -am "updating plugin rotaryencoder 1.0.2"

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'volumio@volumiolcd.(none)')
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 575
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands


How to create a Volumio plugin, the easy way

Postby Saiyato » Mon Jan 29 2018 12:01

Another issue I've encountered is that when you init (create) a plugin the template is missing the following function:

Code: Select all
pluginname.prototype.getConfigurationFiles = function()
{
   return ['config.json'];
};


Which results in the problem that no default config is placed, the following will not happen:

Code: Select all
Error reading configuration. Defaulting to empty configuration


Also earlier the getConf function was used, but now the config is loaded in the onVolumioStart, are the following functions obsolete?
Code: Select all
pluginname.prototype.setUIConfig = function(data) {
   var self = this;
   //Perform your installation tasks here
};

pluginname.prototype.getConf = function(varName) {
   var self = this;
   //Perform your installation tasks here
};

pluginname.prototype.setConf = function(varName, varValue) {
   var self = this;
   //Perform your installation tasks here
};
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 575
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands

Previous

Return to Development talks

Who is online

Users browsing this forum: No registered users and 4 guests