Rotary encoder stops working after restart

I’m using the rotary encoder plugin, installed through the plugins menu. When I set everything up, the encoder works perfectly, but after I restart volumio, it stops working. If I open the rotary encoder plugin menu and just hit the save button it will start working again.

I’m using Volumio version 2.834 and Rotary Plugin version 1.2.2, on a Raspberry Pi 3 Model B.

I’m using GPIO 27 for CLK and GPIO 22 for DT on the rotary encoder.
I’m also using the Official 7" Raspberry Pi touchscreen display and a pHAT DAC.
The pHAT DAC uses GPIO 18,19 and 21, so I don’t think it’s an I/O conflict.

The encoder is a Spectrol DE2-0-1-32 ( )
I have the input (Vs) pin connected to 3V3 (pin 1) and the common pin connected to GND (pin 9). The output signals are clean and the encoder has built-in CMOS debouncing.

Any suggestions as to why the encoder stops working after a restart?

Thanks in advance!

Did you sort this? I too lose control after a reset.

Nope, never figured it out. I want to revisit this soon though and have another try. I tried with a KY-040 encoder as well and got the same problem.

Have PM’d you some bits…


I’ve somehow got this working, but I don’t actually know how.
Here’s basically what I can remember doing…

I took a copy of the rotaryencoder plugin from

and placed that in ~/ so I have

I added an extra debug line somewhere in the index.js file of the plugin to check that any changes I made were rippling through
Then I cd into the plugin folder and did:
volumio plugin refresh
volumio vrestart

After this, the rotary encoder continued to work after a restart, although the changes I made should have made no functional difference.
So then I undid the changes and refreshed and restarted again.
So now I effectively have undone all changes, so the files are back to how they originally were, but now the rotary encoder works after restarting!

I honestly wish I knew why this has “fixed” it, but I’m afraid that’s all I’ve got!

Hopefully it works for you as well

Hi. Do you have any further details on what you did to get this rotary encoder working? I too have the same problem. When I first start Volumio the encoder does not work. If I open the plug-in settings and without changing any settings I hit the ‘save’ then it works fine until next time I shut down and re-start.
I am also using Volumio version 2.834 and plugin version 1.2.2
My rotary encoder is a KY040


As far as I can tell, I literally only did what I outlined above. I’m not particularly savvy with Linux stuff, so I used Filezilla to copy the plugin folder from /data/plugins/user_interface/ to ~/ and then ran those two commands and it seemed to work. I feel like I must have done something else, but I don’t know what, if anything. It’s still working now, weeks later.

Thanks for the help so far. The problem for me is that I have absolutely no experience in using python and don’t know where to start.
Al I have done with my Volumio installation is to add a couple of lines to the config file using notebook. This was to enable me to use a shut down button and indicator lamp. Other than that I have been using Volumio ‘out of the box’ except for installing a couple of plugins.
I don’t know how to sort this. Any ideas?

Further info.
I have now managed to get to my Volumio from my Win10 PC by enabling SSH.
I opened in putty and now am beginning to feel my way around. If you could clarify what you mean by ~/ rotary encoder - the location that you pasted the copied file into, I could give it a try.


I have tried going into Linux files and making changes. I seemed to have only caused more problems so I reinstalled everything.
Is there no other way to get over the problem with the rotary encoder not working after a restart?
Has it never worked with the plugin or is there maybe an earlier version I can use that works? Apart from this problem, my rotary encoder works perfectly as a volume control.

Hi. I had the same problem. I used the script from here

I had to get it to work at boot using systemd. This option has worked for me.

Hi and thanks for your reply. I just had a look at the link you gave but it looks a bit beyond my knowledge and abilities.
Could you possibly explain to me (a complete beginer) how to do what you did - to get it to boot using systemd.


I’ll have to look back to make sure. Will let you know a.s.a.p.

Many thanks

I’ve messaged you some bits.

Ok. Many thanks for that. I have had a look through the coding. I will change a couple of things to match my setup. My gpio pins will be different so I’ll change those to suit. Also, I am not using the push button through the plugin at the moment but have set it in another plugin. I am thinking that I can just delete any lines that you have in there for the push-button.
As I am a beginer, it may take me some time to get this working but I will report back when I get there.

I don’t use the button and left the lines in.