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

1 Like

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.