v2.41x - Rotary encoder plugin not working

Hi,

Also the rotary encoder plugin doesn’t work with v2.411 and 2.413.
I tried all different installation methods. Plugin store, Easy install and zip install.

https://volumio.org/forum/#p49951

Please, please Saiyato and Tomatpasser get in contact with Michelangelo to find a solution.
Your plugins are greatly appreciated and i use them in all my projects, but now i’m stopped being able to update and i’m pretty sure there are many more users that share this “fate”.

Thank you so much.

Josef

Hi,
I tried connect an rotary encoder but without success. I have last version of Volumio. Reason can be this descripted bug or my fault. Can you give me any tip how to connect rotary encoder? I have some questions:

  • What type of Rotary encoder do you use? KY-040 circuit or simple part?
  • What pins are you use?
  • What DAC are you use? USB, raspberry pi hat, …?
  • How many rotary encoders are you use? I see, the plugin is up to two rotary encoders.
  • How to enabled debug log in plugin? I see switch in GUI, but I don’t know how to view debug log. Must I run some command in SSH?
  • Is some fault in your debug log?

How did you install exactly? Because the “Lazy installation of unsanctioned versions from a forked repo” should be working, I’m unable to test right now, so can only confirm this tonight.

I’ve just updated the plugin, it’s working now. You can install it from the plugin menu and it will just work

Hi Michelangelo,
:smiley: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley:

Thank you so much - now the GPIO plugin as well as the Rotary Encoder plugin are starting without error message and i get the config pages as well.
Also the Ampswitch plugin is suddenly starting fine…

I will have to solder some connection pins onto the DAC of my 2.41x test device to be able to confirm full functionality with connected buttons, encoders and relay. Will do so immediately and report tomorrow.

I wonder why the update date of the ampswitch and the GPIO plugin still shows 20.6. in the plugin store, while the date of the rotary switch plugin changed to 25.6. but this looks like a minor important cosmetic thing…

(a bit off topic - but the nanosound plugin currently shows up in the plugin store under the “Miscellanea” section with update date 23.6. and still under the “Accessories” section with update date 22.1. - i think this may be also cosmetic and one has to simply choose the newer one in the “Miscellanea” section ?
The IR plugin won’t stop showing me an available update even after updating it again and again and again… ??? is it really v1.2.0 now ? - the information inside the installed files still shows v1.1.0 - i never got it working (even with an original Vishay receiver, but that easily could be a result of my low experience with it - i will have to find more time to test :slight_smile:)

Again, thank you so much.

Josef

If I add some pleases, please, please, can the Radio Paradise submission be accepted so I can finally update from within Volumio so I’m able to scrobble to LastFM?

Pretty please?

Hi Michelangelo,

I have to correct.
There is still something odd with the ampswitch plugin. It is starting but if i try to switch it off it is keeps showing the green active point and after a restart it is enabled again…
After having a second look at it now it shows enabled (at the switch position - but the active/inactive indicator graphic is red (inactive now).
Enabling it after this shows both - switch and indicator green + config page available.
Then again disabling it - switch is off (red) - but the indicator keeps green showing active.
After a reboot the plugin is still active.
It seems - everthing is good with activating it - but disabling it isn’t possible.

I will report more after the hardware function test.

@Saiyato:
I don’t want to miss also to thank you a lot for you’re great work.
Yes - i first tried the “lazy action installation” for getting the updated plugin - with no success on v2.41x last week.
I preferred the descriptions on the config page of your updated versions “default” and “4xSpeed” (even if i don’t understand what is meant with 4x Speed and i’m happy with the “default” setting) over the descriptions “Gray encoding” and “KY040 custum encoding” that come from your earlier versions because it is easier to understand. I think it would be supercool if you and Michelangelo merge the plugin updates to a “final” one. Also the extended list of “detent” actions in the list would be very fine to have it in the official version.

2nd - i use your fabulous - i know - not any longer supported - HD44780 plugin in all of my test projects in conjunction of a level shifter to make my VFD displays glow in that wonderful green that one can read even 10 meters away :slight_smile: This fantastic plugin also has stopped working on v2,41x unfortunately.
I know you released the promising PYDpiper plugin as the follower - but as the documentation isn’t really widespreaded yet and i am not a programmer (nor have too much time) - i didn’t get it working the way i want it to, by now.
Do you think you can give it a go again - with changing just a little bit in the code to make it work on v2.41x ?

Josef

Hi community,

Just soldered the test pins onto my DAC and connected the buttons, KT040 rotary encoder (with 100nF caps) and the Relay (buffered with a BC547 transistor).

Rotary encoder is working. Choose “KT040 custom encoding” which seems to be the same as “Default” at Saiyato’s newer versions. Thanks Rachid :smiley:
Don’t miss to add the 100nF caps as recommended !!!

GPIO plugin is working as usual again :smiley:

Ampswitch plugin still has issues i don’t know how to solve

— and the, unfortunately not longer supported, HD44780 plugin still doesn’t work any longer. Anyone out there who is able to help me with PYDpiper ? Rachid ?

Thank you all.

Josef

Hi Josef,

Haven’t had the time to look at the rotary plugin, but the easiest fix would be to remove the incorporated node_modules form the zip file. I did this for the HD44780 plugin, which does install on 2.389 and 2.413, but takes longer as npm install has to be performed.

As for pydPiper, this plugin will show the same problem I presume, so for that one I will remove the node_modules from the zipfile as well.

Cheers

Update: removed the node_modules from the standard zip for the rotary encoder, it will install properly now.

Hi Rachid,

Thank you for taking care.
The rotary encoder (lazy installation) now is working again.

But the HD44780 doesn’t install (though there is shown “Plugin installed successfully!”).

Here is what i get:

[code]volumio@pi3e24:~$ sh volumio_install_from_zip.sh Saiyato volumio-hd44780-plugin Downloading and extracting zip file…
converted ‘https://github.com/Saiyato/volumio-hd44780-plugin/raw/master/volumio-hd44780-plugin.zip’ (ANSI_X3.4-1968) -> ‘https://github.com/Saiyato/volumio-hd44780-plugin/raw/master/volumio-hd44780-plugin.zip’ (UTF-8)
–2018-06-26 12:23:21-- https://github.com/Saiyato/volumio-hd44780-plugin/raw/master/volumio-hd44780-plugin.zip
Resolving github.com (github.com)… 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://raw.githubusercontent.com/Saiyato/volumio-hd44780-plugin/master/volumio-hd44780-plugin.zip [following]
converted ‘https://raw.githubusercontent.com/Saiyato/volumio-hd44780-plugin/master/volumio-hd44780-plugin.zip’ (ANSI_X3.4-1968) -> ‘https://raw.githubusercontent.com/Saiyato/volumio-hd44780-plugin/master/volumio-hd44780-plugin.zip’ (UTF-8)
–2018-06-26 12:23:22-- https://raw.githubusercontent.com/Saiyato/volumio-hd44780-plugin/master/volumio-hd44780-plugin.zip
Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.112.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 8846 (8.6K) [application/zip]
Saving to: ‘volumio-hd44780-plugin.zip’

volumio-hd44780-plu 100%[=====================>] 8.64K --.-KB/s in 0.001s

2018-06-26 12:23:22 (8.61 MB/s) - ‘volumio-hd44780-plugin.zip’ saved [8846/8846]

MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant
more info at http://www.winimage.com/zLibDll/unzip.html

volumio-hd44780-plugin.zip opened
extracting: package.json
extracting: UIConfig.json
extracting: uninstall.sh
creating directory: i18n/
extracting: i18n/strings_en.json
creating directory: options/
extracting: options/character_mappings.json
extracting: options/connection_types.json
extracting: options/scroll_speeds.json
extracting: config.json
extracting: index.js
extracting: install.sh
Installing plugin…

This command will install the plugin on your device

Compressing the plugin
No modules found, running “npm install”
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack at /lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.14.42-v7+
gyp ERR! command “/bin/node” “/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /home/volumio/volumio-hd44780-plugin/node_modules/lcdi2c/node_modules/i2c-bus
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN HD44780@1.0.10 No repository field.
npm WARN HD44780@1.0.10 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! i2c-bus@1.2.5 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the i2c-bus@1.2.5 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/volumio/.npm/_logs/2018-06-26T12_23_36_830Z-debug.log
Error installing node modules: Error: Command failed: /usr/local/bin/npm install
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack at /lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.14.42-v7+
gyp ERR! command “/bin/node” “/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /home/volumio/volumio-hd44780-plugin/node_modules/lcdi2c/node_modules/i2c-bus
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN HD44780@1.0.10 No repository field.
npm WARN HD44780@1.0.10 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! i2c-bus@1.2.5 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the i2c-bus@1.2.5 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/volumio/.npm/_logs/2018-06-26T12_23_36_830Z-debug.log

/bin/mv: cannot stat ‘*.zip’: No such file or directory
child_process.js:644
throw err;
^

Error: Command failed: /bin/mv .zip /tmp/plugins/HD44780.zip
/bin/mv: cannot stat '
.zip’: No such file or directory

at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at install (/volumio/pluginhelper.js:727:9)
at Object.<anonymous> (/volumio/pluginhelper.js:788:9)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)

Plugin installed successfully!
volumio@pi3e24:~$
[/code]

the tail of the log is:

943 silly saveTree +-- fs-extra@0.23.1 943 silly saveTree `-- multimap@1.0.1 944 warn HD44780@1.0.10 No repository field. 945 warn HD44780@1.0.10 No license field. 946 verbose stack Error: i2c-bus@1.2.5 install: `node-gyp rebuild` 946 verbose stack Exit status 1 946 verbose stack at EventEmitter.<anonymous> (/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16) 946 verbose stack at emitTwo (events.js:126:13) 946 verbose stack at EventEmitter.emit (events.js:214:7) 946 verbose stack at ChildProcess.<anonymous> (/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 946 verbose stack at emitTwo (events.js:126:13) 946 verbose stack at ChildProcess.emit (events.js:214:7) 946 verbose stack at maybeClose (internal/child_process.js:925:16) 946 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 947 verbose pkgid i2c-bus@1.2.5 948 verbose cwd /home/volumio/volumio-hd44780-plugin 949 verbose Linux 4.14.42-v7+ 950 verbose argv "/bin/node" "/usr/local/bin/npm" "install" 951 verbose node v8.11.1 952 verbose npm v5.6.0 953 error code ELIFECYCLE 954 error errno 1 955 error i2c-bus@1.2.5 install: `node-gyp rebuild` 955 error Exit status 1 956 error Failed at the i2c-bus@1.2.5 install script. 956 error This is probably not a problem with npm. There is likely additional logging output above. 957 verbose exit [ 1, true ]

What could go wrong here ?

btw. i was able to install the unmodified pydpiper plugin and enable it without error. Unfortunately i don’t know how to deal with it, yet.

Josef

Guys, I am forced to repeat myself here: let’s forget about manual installation method (Sayato can you please remove the sh file that installs it?)
Sayato I kindly ask you to not suggest this installation method anymore. If there are reasons that you think are good to do it, let’s discuss about it and let’s improve the volumio plugin management system to allow what you need.

The reason is:
By going with manual install we’re wasting precious resources that can be used to make the volumio plugin repository better and more resistant to failures, improving the user experience of everybody. And not only tinkererers.

If we spend some minutes to do a proper PR for a plugin, and have the patience to wait for the review, then this plugin will be available for everybody in an easy way.

@Josh the install is failing because the modules need to be compiled so you miss the compiler on your system (build-essential). If you can submit a PR for this plugin I will do it for you guys.

Hope you understand my points.

Hi Michelangelo,

This sounds great, thank you.
Unfortunately i don’t know how to create such a “PR”. Is it to find somewhere in the help section ?
Can you direct me to instructions on how to do this the right way.
Do i need a github account ?

Josef

Hi Michelangelo,

It’s perfectly clear, the problem I’m facing now is that my PR is too big and testing all pushed changes is costly.
I’m not too familiar with GitHub, in that regard I can use some guidance in how to separate the different plugins and how to maintain those.

For example is it possible to branch per plugin, or do I need to clone the repo for each plugin? Or do I wait for each PR to be approved before pushing new changes?

Right now I have changes for:

  • audiophonicsonoff
  • hd44780
  • kodi
  • lastfm
  • lms
  • rotary encoder
  • squeezelite
  • snapcast

But I have no clue how to separate those into different PR’s, maybe someone else can provide some guidance. :slight_smile:
At this point my PR includes all those changes and patches on previous pushes, so it’s becoming quite a big PR now. Please note that I have minimal experience with GitHub (especially the CLI is unknown territory).

Apologies for not abiding by the rules :wink: I’ve removed the lazy install references from the readme’s.

The plug in for Rotary encoders is still not working. I have tried every rendition and pin combination I can think of; I have uninstalled and reinstalled; the encoders do not work. Can you folks check the plugin and ensure it is operational? Thanks.

Hi there,

Care to provide a little more info than ‘still not working’? What have you tried exactly? Which platform are you using, on which Volumio version and which version of the plugin? Do you mean that the action configured doesn’t reflect in Volumio, or is it crashing? As there have been problems with erratic scrolling and some missing node_modules, these problems have been addressed.

Please advise.