[PLUGIN] RotaryEncoder II

Hi Darmur,

the logs look perfectly normal. Beside the different IO pins, they are the same as for my setup, where everything works perfectly.

I currently have limited time, but there are some things not clear for me. Maybe you can check them in the meantime:

  1. are you on Volumio 2 or 3 now? As mentioned, I did no testing on Buster so far and can only give limted support (but I can announce, that I found the time to setup a test-system with Buster in the meantime - only need time to play with it)
  2. If I get your point correctly, the push-buttons are working but the rotation is only working for one rotary at a time and not both simultaneously. This might be related to some issue with the dtoverlay or to the handles to the devices for the rotary. You could check the following:
  • ssh into volumio
  • issue dtoverlay -l
  • the response in your case should be
0:  rotary-encoder  pin_a=5 pin_b=6 relative_axis=true steps-per-period=1
1:  rotary-encoder  pin_a=8 pin_b=9 relative_axis=true steps-per-period=1

If this is the case, the overlays are properly installed. The next test could be, to check if the dtoverlays are working.
Step by step:

  1. disable the plugin
  2. ssh into volumio
  3. Install both overlays by issuing:
    sudo /usr/bin/dtoverlay rotary-encoder pin_a=5 pin_b=6 relative_axis=true steps-per-period=1
    sudo /usr/bin/dtoverlay rotary-encoder pin_a=8 pin_b=9 relative_axis=true steps-per-period=1
    (response for both commands should be pre post)
  4. Open two terminal windows and ssh into Volumio
  5. Issue one cat command into each of them:
    cat /dev/input/by-path/platform-rotary\@5-event
    cat /dev/input/by-path/platform-rotary\@8-event
    (attention, the number is the pin A number in hex, so 10 would become A, 18→12 and so on)
  6. Now, when you turn the rotaries, there should be some gibberish output on the two terminals
  7. after the test, remove the overlays with sudo dtoverlay -r (2x)

If everything works fine up to 6), then the dtoverlay configuration is working and the problem is the handle in the plugin. In that case, I will prepare a version with more log info so we can find the root cause.
In my setup the thing is working with 3 rotaries on Volumio 2 with Debian Jessie. I expect that we get it working… maybe some issue, that is somehow not visible in my setup.

Best regards,
Thomas

2 Likes