Rotary Encoder For Volume Control

Hi all.
I have installed the plug in for rotary encoder and set it up as a volume control. I am only using the rotary bit and not the push button. It works perfectly - BUT - each time I restart after a shutdown I have to reset it for it to work. From what I understand, this is a known problem. Several members of the forum have been very helpful in sending me alternative scripts to replace the plugin. I have tried to install these but run into various problems. Any idea if a fix for the plugin problem is coming up?

1 Like

Hi there,

What version of the plugin are you using?
It should be shown in the overview page. I did manage to patch some issues here and there last year, but not everything is synced upstream to the Volumio plugin store :wink:

Hi and thanks for replying.
I am using the latest version - v1.22 of the plugin and the info. shows last update as 23rd March 2019.
I am running the latest release of Volumio - v2.861
If I can just overcome this problem the plugin is perfect.
Thanks

Hi,

The latest version is 1.2.4; this contains the fix for losing configs every reboot (patched in april 2020).
You can upgrade the plugin, but you need to do this manually.

  1. SSH into your machine
  2. run git clone https://github.com/Saiyato/volumio-rotary-encoder-plugin
  3. cd volumio-rotary-encoder-plugin/
  4. volumio plugin refresh

That updates your version with the one from Github (my repo), this will bump it to version 1.2.4 and your configs will persist.

Hi.
Many thanks for that. It has been annoying me up until now. I will get onto it tomorrow
morning. It’s bedtime here in Europe now.
Thanks again.

Update - All done. Working perfectly.Thanks for that.

Hi!
On Volumio 3 (beta Debian Buste), the plugin does not correctly install dependencies and does not work.
Сurrent beta Volumio 3 use the new nodejs v14.x engine.
Can you help?

Hi,

Not sure if I can solve it, but when I have the time I will rig up a buster version for testing purposes and see if it’s an easy fix or not :slight_smile:

Ok.

Just replied on the GitHub issue, @VyacheslavS ou mentioned Node v14 in the Buster BETA, but as of August 2020 they reverted back to v8 (in which the plugin installs without errors from the plugin store).

Currently in use Node14.

@VyacheslavS Well, it is a bit more complicated than that – the (x86/Raspberry Pi) versions published in the forums are all node v8.
However, the newer images that are built directly from the Build scripts are all node v14. These images haven’t been published yet…

For things to work, you will need to rebuild native node modules (such as epoll) for node v14.
you can try with going into the plugin’s folder and running npm install

But looking at this plugin’s package.json it might need some attention…
@Saiyato are you sure you need all these dependencies?
Node should resolve the dependency tree without explicitly having to add them in here.
For example if you just need onoff, you shouldn’t have to manually add bindings.
There seem to be some dependencies that are a bit strange - imurmurhash?

		"balanced-match": "^1.0.0",
		"bindings": "^1.3.0",
		"brace-expansion": "^1.1.11",
		"concat-map": "^0.0.1",
		"epoll": "^1.0.2",
		"fs-extra": "^0.28.0",
		"fs.realpath": "^1.0.0",
		"glob": "^7.1.2",
		"graceful-fs": "^4.1.11",
		"imurmurhash": "^0.1.4",
		"inflight": "^1.0.6",
		"inherits": "^2.0.3",
		"jsonfile": "^2.4.0",
		"kew": "^0.7.0",
		"klaw": "^1.3.1",
		"minimatch": "^3.0.4",
		"multimap": "^1.0.2",
		"nan": "^2.8.0",
		"net": "^1.0.2",
		"once": "^1.4.0",
		"onoff": "^1.2.0",
		"onoff-rotary": "https://github.com/Saiyato/onoff-rotary/tarball/2336ea47d95ab57ab1091e429db9dd4930abbfaf",
		"path-is-absolute": "^1.0.1",
		"rimraf": "^2.6.2",
		"slide": "^1.1.6",
		"v-conf": "^1.4.2",
		"wrappy": "^1.0.2",
		"write-file-atomic": "^1.3.4",
		"socket.io-client": "^1.4.5"

Hi @ashthespy,

Now that you mention epoll, I’m triggered, I believe I had to address this issue before (at some point).
As for the dependencies, I wrote a function to list them all and use that to populate package.json. In theory it will need all of them, because of dependencies of packages used for the plugin. I will check again just to be sure, it’ll take me some time, as I need to rebuild the rotary test rig (I rarely use the encoder; just for volume in the garden, and it’s winter in NL now :wink: )

Indeed, Volumio moved from node v6 to node v8 breaking a lot of plugins back in 2018 :wink:

Ah, that is what npm when you ask it to install dependencies - it resolves the dependency tree and installs the correct versions. You should include only the direct dependencies, and let npm work out the tree else things get tricky when updating packages…

Check, I will slim down the deps in my package.json :wink:
It needs testing though, my previous PR (v1.2.4) had some issues, so I’ll just create a new one for the slimmed down deps.