Hi there!
After my first plugin RotaryEncoder II was merged into Master a week ago. I wanted to try out if I can install it via the plugin store.
Some questions popped up during this:
I cannot see the plugin in the store yet. Is there anything else I have to do after the merge has been done?
I did another manual install to see, if the user can install the plugin manually already:
The plugin installs completely up to the 100% message, but after it issues the FINALIZING_INSTALLATION message twice, the command line hangs. On the GUI I get a dialog asking whether I want to activate the plugin, but after I say yes, the command line still hangs. Is this normal?
After I activate the plugin, I cannot access the settings yet. I first have to issue a volumio vrestart before I can configure the settings. Is this normal behavior or is there still a bug in my plugin?
It was in the same folder in Github first, but I moved it to the docs repo - Iāll create a README.md pointing to the docs, once they have been merged.
Regarding v3, I did not try it yet, since my time is very limited and I did not have the time to install v3 on my hardware yet. Not sure if there are many changes in the way the plugin-system works?
Thank you, didnāt see it, itās a very detailed documentation.
I will give it a try asap with the standard KT40 based china Rotary Encoder described in Saiyatoās docu and hardware debouncing.
This worked for me too, but your approach seems to be more native to me.
Hello
You just have to send a PR to master branch.
It must contains only sources, no node_moddules, no zip file.
No need to add vrestart in install. Type ctrl+c when you see finalising install.
It may not work on buster if node dependencies are compatible.
Please indicate supported arch (arm, x86).
Last point, I often meet PR with no functional plugin because not carefully tested. Iām not saying it is the case for yours, but please, author of plugin, check and recheck your work, from install, use and uninstall.
Thanks
thanks for the reply. I just tried to install the plugin again from my fork and that works instantaneously (including direct access to the settings). Maybe I messed something up in the PR, will generate new one after solving below issue:
I still have to do a volumio vrestart before it fully works. It seems, that socket.emit is only working after I do vrestart.
I tested this with a fresh very simple plugin that only connects a socket and emits messages every 10s. There it works. I assume there is a problem with an unresolved promise somewhere. Will try to find it and create a new PR when fixed⦠Sorry.
as you can read below, the plugin is not yet starting without a volumio vrestart, but feel free to try version 1.0.3, if you are ok to use the workaround.
Would be happy to hear if it works with the KT40, too.
Will try to fix the remaining issue asap.
br
Thomas
Found the root-cause of the problem thanks to the hint from @balbuze, that a volumio vrestart is not required. I had accidentally put some variable initializations into onVolumioRestart instead of onStart.
I published version 1.0.4 with a fix and created a new PR.
Thanks to all and sorry for the inconvenience (I am still on a steep learning curve)
Sorry, that it still does not work and I need to bother you again.
On my test-system it works like it should + I fortunately found another RPi with Volumio which I can use.
I was lucky and could reproduce the issue on the second RPi at first. But then, at a certain point during search it changed behavior and is also always working now.
Maybe somebody has an idea what to check - I am currently at a loss:
Both Systems:
RPi 3
Volumio 2.882
What I tried on the new RPi:
Downloaded several versions of the plugin from my Repo, unzipped, installed
Installation worked but after activation I could not access the Settings. Deinstalling did not work (same as described in the comment by @balbuze in my PR)
This behavior was stable
I tried several things but nothing helped, it was always failing
To check, what was happening internally, with nano I edited the config.json file in my tmp folder that I used for unzipping and changed the logging setting from false to true.
When I ran volumio plugin install and activated now, it started correctly and worked No errors in the log, settings accessible, uninstall works
So I uninstalled from the web interface, downloaded a fresh zip and repeated the process - now it is always working, like on my other system, with all versions that failed before.
The only ideas I came up with were a wrong encoding of config.json, but that seems not to be the problem, because then it should fail again, when I repeat download and install again.
My problem now, is that I cannot reproduce the error on any of my RPi systems anymore
Next I will try to setup a fresh system on another SD card. If anybody has any hints what to look at, I am happy for sugestions. Otherwise I am afraid that this is going to be a hard oneā¦
Btw: This looks similar to the behavior I observed on the other RPi before, as described in Post 9
After some busy weeks, I found the time to come back here and search and fix it. PR created.
If anybody is interested, here is what happened (tl;dr):
Problem was related to a bug with loading of international strings for the GUI.
During test, I always used the sequence of volumio plugin refresh + volumio vrestart (like described in the āHowToā), which properly loaded the i18n strings via CommandRouter when Volumio restarts.
When I uninstalled and reinstalled the plugin on my test-systems via uninstall and install, I never issued a volumio vrestart between the two actions, thus the strings probably stay in memory and were accessible when I called the Settings after install. Everything looked good back then, so I issued my first PR in June.
On a freshly installed system however, the strings were not in memory and calling the GUI for the Settings caused a fail, because they were not properly accessible via CommandRouter without issuing a volumio vrestart.
I could finally reproduce it on every system, by issuing a volumio vrestart between uninstall and install. I recommend doing that to everybody who tests a plugin.
Being able to reproduce it, it became easy to fix - just added a routine that handles the loads the i18n file internally and does not use the CommandRouter.
Hi Josef,
if you are still interested in trying it, the plugin is now officially published on the Plugin Collection under āUser Interfaceā.
Iād be interested to hear if it works with other rotaries as wellā¦
Question to the experts: How can I update the Plugin Details on the Plugin store?
Durin volumio plugin publish there is a request for ādetailsā, but I do not see the text I entered at the prompt occur anywhere later on. I also could not find the info in any of the plugins that actually have āDetailsā.