Volumio 3 Plugins store issues and discussion

and now it worked…probably as you said it was spotify’s end

2 Likes

@crieke @mervinio
Please have a look at the category where the RemotePi plugin appears in the plugin store.

Currently the plugin is filed under “User Interface” but the actual plugin type is “system_hardware”. Would be nice if the plugin could be moved accordingly.

1 Like

Hi,
17 days ago I submitted a new plugin called “Minosse DSP”, and since then I also submitted two updated versions. I also created the required pull requests to volumio-plugin-sources repo on GitHub for each submission.

Up to now, I haven’t received any feedback and my plugin doesn’t appear among the " Plugins Test Mode" ones.

So, I would like to know how long a developer has to wait before having some acknowledgement from the Volumio team. Thanks.

Thing is, we have a huge backlog of plugins to test, this is why it takes time for us to look at plugins now.
So, just some patience and you wil receive feedbacks

Ok, thanks for your prompt reply.

Cross posting from github PR: Lastfm major update by @Saiyato so we don’t loose concerns.

Ok just did a quick test, it requires way more steps to rework plugins for me, because I typically treat my test lab as expendable (I sometimes just break stuff), I tend to re-image a few times a night just to be on the safe side and test fresh installs.

Maybe I’m doing something wrong, but I need to follow the below steps to submit plugins:

  1. clone the repo (note: as the repo grows, this might take longer)

  2. volumio plugin init → creates the directory, I think you can do this manually as well

  3. Stage the changes (if you try to submit, the message will tell you this) → git add * (which stages everything in the current directory)

  4. Now you must commit the changes, this requires a username and email address

    >volumio@volumiotest:~/volumio-plugins-sources/lastfm$ git commit
    
    *** 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@volumiotest.(none)')
    

    You can just use bogus info there.

  5. Staging + committing however is not enough, you need to push them to origin “Your repository contains changes that are not pushed to origin. Please push your changes. Use ‘git push’ to push all changes.” This requires your credentials:

    volumio@volumiotest:~/volumio-plugins-sources/lastfm$ git push
    Username for 'https://github.com':
    

To be honest, this is kind of a thing for me; so here I stopped. But I presume I can submit afterwards.

1 Like

Just thinking out loud, as I’m not too fond of logging into GH on my test Volumio instance (just broke another one). Can we maybe overload the plugin submit function with the PR reference instead?

That way you can skip the whole local GH administration on a Volumio instance and still leverage the protected (compiled C) binaries to publish BETA versions to the store.

Hmm, not sure I follow what compiled C binaries you’re talking about?

My bad, thought that it would be done by the myVolumio module. While in fact it’s just a push with your bearer token. (see: volumio3-backend/pluginhelper.js at 359b2717b79cfc72b7d1c918d0fc2885a93bca70 · volumio/volumio3-backend · GitHub)

Reading this confirms my assumption, if git status doesn’t return anything of the likes that your changes are not staged, committed or pushed; your plugin is packaged and pushed to the upload endpoint (see L708).

Also, this means that if I login to my GH account, submitting would push the changes on my Volumio instance upstream… thinking out loud now… if I just clone my own branch on my Volumio instance, instead of cloning from the source-repo. The changes are already in the cloned directory and I should be able to submit; nothing is staged or needs to be committed/pushed.

Let me sit on this for a while… I think I found a solution, just need to define the correct steps and order thereof.

like :wink:

diff --git a/pluginhelper.js b/pluginhelper.js
index e2a27f8..a433ac5 100644
--- a/pluginhelper.js
+++ b/pluginhelper.js
@@ -476,6 +476,8 @@ function submit() {
     }

     function validateGit(package) {
+       createPackage(package)
+       return
         exec("git config --get remote.origin.url", function (error, stdout, stderr) {
             if (error) {
                 console.log('Could not determine the plugin\'s remote. A plugin can only submitted from a fork of the volumio-plugins-sources repository' );

Hahaha that’s also an option, I was looking for a solution that doesn’t require code changes. Because, we either need to get them approved, or I need to patch every time I re-image (which happens a LOT) :wink:

That was quick… just tested and the plan I had is not going to work :frowning: But I did find another graceful solution :smile:

The pluginhelper will always write package.json, even if it’s not even necessary. So in the light of minimizing writes (to my SD-cards), I will propose wrapping the write action for the version in a conditional → if package.version != answer.version

Code can be found here: volumio3-backend/pluginhelper.js at 359b2717b79cfc72b7d1c918d0fc2885a93bca70 · volumio/volumio3-backend · GitHub

I have created a patch (just tested it) and it works perfectly.

Option A (the way described in the plugin documentation)

  • use the plugin helper to generate the plugin template
  • write your plugin
  • use you GH account to stage, commit and push the changes upstream
  • submit the plugin
  • create the PR for the upstream changes (probably in the main branch)

Option B (requires my patch)

  • create your plugin in any way you want, in any branch of the forked repo (volumio-plugins-source)
  • clone your branch
  • enter the plugin directory
  • submit your plugin
  • at any time you can create your PR from any machine (or the web UI) to push your code upstream

Oh before I forget, you need to define the architectures and correct version for your plugin, otherwise you will have an unstaged package.json and you’re back at square one.

Here’s the patch PR: Remove unnecessary write by Saiyato · Pull Request #62 · volumio/volumio3-backend · GitHub
Update: just got merged, just a little bit of patience is required :smile:

1 Like

Just realized that when following your suggested Option A, it is important to do the last two points in exact that order.

I did follow the wording of the Volumio documentation but interpreted that it needed a PR

volumio@volumio:~/volumio-plugins-sources/test$ volumio plugin submit
The command will check if the package.json is complete and if your code is staged, committed and pushed to your fork of the plugins-sources repo.

Then I realized that the submit command did change the package.json file, so i needed commit again and create another PR.

But thatnks for the explanation in your post. At least I got it submitted :wink:

I wanted to update my plugins to version 3. But it seems very complicated. My plugins worked in Volumio 2. I updated them to Volumio 3 and tested them in Volumio 3. Everything is fine. They work without problems. As always before, I made a pull request (# 72) from github (fork djack2017). And nothing happens. I understand that I am doing something wrong, but I don’t know what. Can someone give me some tips?

For Volumio 3 You have to follow Writing a plugin | Volumio Developers Documentation
Basically

  • update category if needed
  • update package.json
  • Submit
  • Pr in the correct repo.

I tried to update personal_radio plugin with a plugin writting guide and I pushed to my fork of the volumio-plugins-sources repo. After pushing my commited sources, I tried “volumio plugin submit” command and it said “package.json” file is modifed and I can’t submit my plugin. I added all sources with (git add *) and commited. How can I submit it?

volumio@volumiorp3:~/volumio-plugins-sources/personal_radio$ volumio plugin submit
This command will submit a plugin for publishing in the plugins store. Newly submitted plugins will be verified by the volumio team. After verification the plugin will be publically available on the beta channel. When the plugin is properly tested in the beta channel, it will be promoted to the stable channel, available to download by everyone. Every subsequent version of the plugin will alo be put in the beta channel, and will be promoted to the stable channel after testing.
? do you want to change your version? (leave blank for default) 1.3.0
Your repository contains unstaged changes. Please stage and commit your changes. Use 'git add *' to stage all changes.
For help please go to: https://developers.volumio.com/plugins/writing-a-plugin


volumio@volumiorp3:~/volumio-plugins-sources/personal_radio$ git status
On branch master
Your branch is up to date with 'origin/master'.

        modified:   package.json

I commit the package.json again and pushed it to my forked repo and submitting command is working…

$volumio plugin submit
.........
Your plugin is submitted to the volumio plugins store. Please create a pull request to submit your changes. This is mandatory for the plugin to be verified or accepted for the stable channel.