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 michelangelo » Sat Jun 03 2017 00:01

Hi Folks! We've just published an handy tool to create plugins, mantain and update them in an easy way.

Basically, all you need to do is connect to Volumio via SSH and type:
Code: Select all
volumio plugin


Those are the features:


Code: Select all
init      creates a new plugin
refresh   copies the plugin in the system
package   compresses the plugin
publish   publishes the plugin on git


This feature is available starting from version 2.185 .
You can find all the related documentation here: https://volumio.github.io/docs/Plugin_S ... lugin.html
User avatar
michelangelo
Founder
 
Posts: 4236
Joined: Sun Dec 15 2013 23:18

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 danielfelix » Sat Jun 03 2017 01:12

Good job!
Daniel
RaspberryPi3 + Allo Boos DAC + Amp. Kenwood KA-400 + Focal Chorus 726 + Turntable Dual 504 + Cartdrige Shure M91E + Linear Power Unit DIY
User avatar
danielfelix
Golden Ear
Golden Ear
 
Posts: 500
Joined: Wed Feb 08 2017 16:24


How to create a Volumio plugin, the easy way

Postby chsims1 » Sat Jun 03 2017 06:12

That's interesting ... it might even tempt me have a go ;)
New to Volumio? Please read the Quick Start Guide to get your system up and running :). FAQs? Docs?
User avatar
chsims1
Moderator
 
Posts: 1839
Joined: Sat Aug 02 2014 10:44
Location: East Yorkshire, UK


How to create a Volumio plugin, the easy way

Postby kiefer35 » Wed Jun 07 2017 20:39

Hi Michelangelo,

I'm trying
Code: Select all
volumio plugin init

and I get this error
Code: Select all
module.js:471
    throw err;
    ^

Error: Cannot find module 'inquirer'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/volumio/pluginhelper.js:4:16)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)


How can I fixe this ?
Random avatar
kiefer35
Fresh off the boat
Fresh off the boat
 
Posts: 4
Joined: Wed Jun 07 2017 20:34


How to create a Volumio plugin, the easy way

Postby michelangelo » Wed Jun 07 2017 22:02

On which version are you on?
User avatar
michelangelo
Founder
 
Posts: 4236
Joined: Sun Dec 15 2013 23:18


How to create a Volumio plugin, the easy way

Postby kiefer35 » Thu Jun 08 2017 08:20

I'm on the last version, uploaded tuesday.
On the UI of Volumio, I can see : 2.185
Random avatar
kiefer35
Fresh off the boat
Fresh off the boat
 
Posts: 4
Joined: Wed Jun 07 2017 20:34


How to create a Volumio plugin, the easy way

Postby michelangelo » Thu Jun 08 2017 09:36

I think you must have manually edited some files, and those were not updated... For example, did you do a
volumio pull

or installed node modules manually?

In any case, to solve this: system-> delete user data
User avatar
michelangelo
Founder
 
Posts: 4236
Joined: Sun Dec 15 2013 23:18


How to create a Volumio plugin, the easy way

Postby kiefer35 » Thu Jun 08 2017 16:37

The only file, I've edited is "config.txt" for overclocking.

I'll try this evening and tell you if "system-> delete user data" solves my problem.

Thanks
Random avatar
kiefer35
Fresh off the boat
Fresh off the boat
 
Posts: 4
Joined: Wed Jun 07 2017 20:34


How to create a Volumio plugin, the easy way

Postby michelangelo » Thu Jun 08 2017 17:20

Sorry, my bad, I forgot to include the module on the RAM build.
Don't do what I asked previously. You can use the dev updater to update to the new image which I am building now

or flash it:
http://updates.volumio.org/pi/volumio/2 ... pi.img.zip
User avatar
michelangelo
Founder
 
Posts: 4236
Joined: Sun Dec 15 2013 23:18


How to create a Volumio plugin, the easy way

Postby kiefer35 » Fri Jun 09 2017 07:46

Michangelo,

Before I see your last post, I've made a new installation.
After I see your post, I install the last version : 2.191.

My previous error dessappears but I have 2 new errors :

1. Volumio Plugin
Code: Select all
root@volumio:/home/volumio# volumio plugin refresh

This command will copy all your plugin's file in the correspondent folder in data

Updating the plugin in Data
Error, impossible to copy the plugin: Error: ENOENT: no such file or directory, open 'package.json'

2. Installation of plugins
Previouly, I've installed spotify, Youtube playback and IR Rmote controller plugins.
Now, I succeed to install Spootify but for the others I've the following error :
Code: Select all
Installing Plugin

The following error occurred when installing the plugin: TypeError: Cannot read property 'name' of undefined
0%
- Cacher les détails

Downloading plugin at http://127.0.0.1:3000/plugin-serve/571683cd-b41d-4939-8dc2-b3ec77718bf1.zip
END DOWNLOAD: http://127.0.0.1:3000/plugin-serve/571683cd-b41d-4939-8dc2-b3ec77718bf1.zip
Creating folder on disk
Unpacking plugin
The following error occurred when installing the plugin: TypeError: Cannot read property 'name' of undefined

In fact, there are installed and seems to work correctly.

I've also installed the Qobuz plugin found on your github repository with no error message.
I've configured with my credentials, I can see all the folders of Qobuz but nothing is operational.
Can you tell me if this plugin is working ?

Thanks for your answers.
Random avatar
kiefer35
Fresh off the boat
Fresh off the boat
 
Posts: 4
Joined: Wed Jun 07 2017 20:34

Next

Return to Development talks

Who is online

Users browsing this forum: No registered users and 1 guest