New Plugin. Specific questions

I was referring to all the files you have inside the zip. Should they not be pushed to the master branch as well? Or am I mistaken about the publish function?

What I would do is manually push those files to master using git add . , git commit ... , git push (after making sure that you are on the master branch)

I’m using Version 2.873.

Do I need to specify where the push sends the files? How do I make sure that I’m on the master branch?

// Check that your git remote is correct - in your case: 
// https://github.com/Redlawd/volumio-plugins.git
$ git remote -v

// Stage changes
$ git add .

// Verify staged changes
$ git diff --cached

// Commit changes
$ git commit -m '<some message here describing changes you've made>'

// Push to remote master branch
$ git push origin master

I suggest you check out tutorials on how to use git. I’m starting to forget these commands since I use VSCode which basically handles the above through point-and-clicks.

1 Like

Thanks to one and all. I’m not able to try this until the morning but hope is re-kindled!

Many thanks to all helpers. I have deleted my GitHub account and started again. Things seem better.

The files are now at
Redlawd/volumio-plugins/plugins/miscellanea/randomizer

I’ve no doubt this will have an obvious answer but …
How do I find the file path to wget the .zip file to try it out?

Yes but I was hoping to download the .zip file to miniunzip it and try to install it into Volumio.

Sorry to be such a nuisance.

So, I’ve once again deleted my GitHub account. Rejoined GitHub and re published the plugin, apparently successfully.

Does what I’ve done look correct?

What can I do to test the plugin?

Sorry if it’s becoming a pain, it’s twice as bad at this end!

ask @patrickkfkan before you do he knows…
he says before you could get it oke that you had to fork it … so ask before change

I can see the randomizer plugin files in your master branch, so I think you are following the steps correctly.

I’ve taken the plunge and put in a pull request to the Volumio Team. (Not even sure if I’ve done that correctly). So regardless of the outcome, I’d like to thank all those who tried to help me, I think it’s been too steep a learning curve for me!
Whatever happens I’ve got it working on my machine which is what I set out to do in the first place!

Is there anyone out there who can help?

I am trying to add a user input to my plugin on the settings page. Everything is working, I can enter a value on the settings page, save the value and the value is returned after a re-start. However, when re-visiting the settings page, it only displays the ‘placeholder’ value from UIConfig.json rather than the saved value.

I have this line in my ‘saveSettings’ function;

self.config.set(‘tracks’, parseInt(data[‘tracks’]),10);

and this line in the ‘getUIConfig’ function;

uiconf.sections[0].content[0].value = self.config.get(‘tracks’);

In case it helps… this is the entry in UIConfig.json;{

        "id": "tracks",
        "type":"text",
        "element": "input",
        "doc": "TRANSLATE.TRACKS_DOC",
        "label": "TRANSLATE.TRACKS_LBL",
        "attributes": [ {"placeholder": "25"} ],
        "value": ""
      }

I’m obviously missing something…
How can I get the value to be displayed on the settings page?

try to add

 "value": {
            "value": "",
            "label": ""
          },

instead of

"value":""

Thanks for the rapid response.
I’ve added your suggestion to UIConfig.json as below;

    {
        "id": "tracks",
        "type":"text",
        "element": "input",
        "doc": "TRANSLATE.TRACKS_DOC",
        //"label": "TRANSLATE.TRACKS_LBL",
        "attributes": [ {"placeholder": "25"} ],
        "value": {
                  "value": "0,0,0",
                  "label": "0,0,0"
                 },
      }

both with, and without, the original ‘label’ line but ‘lose’ the settings page altogether.

and then, very strangely, next time I looked at your post the 0’s had vanished!
So re-tried with;
> {

        "id": "tracks",
        "type":"text",
        "element": "input",
        "doc": "TRANSLATE.TRACKS_DOC",
        "label": "TRANSLATE.TRACKS_LBL",
        "attributes": [ {"placeholder": "25"} ],
        "value": {
                  "value": "",
                  "label": ""
                 },
      }

both with, and without, the original ‘label’ line but still ‘lose’ the settings page altogether.

in your case remove last “,”

 "value": {
                  "value": "",
                  "label": ""
                 }
}
edit: I never used placeholder...
edit2 : you can just reload the page when changing UIconfig.json

thanks… but I now get [object Object] in the box instead of the placeholder…

I have also removed the attributes line,

{
“id”: “tracks”,
“type”:“text”,
“element”: “input”,
“doc”: “TRANSLATE.TRACKS_DOC”,
“label”: “TRANSLATE.TRACKS_LBL”,
“value”: {
“value”: “”,
“label”: “”
}
}

object

Why don’t you not save self.config.set(‘track’,data[‘track’]
I think the problem is the type of data saved.

Many thanks, will have to wait until tomorrow, jobs to get done!

Problem solved! It was in UIConfig.json
I was trying to put the user defined input after the three action buttons, it would seem that it needs to come before!
Many thanks for your help.