Extra switches now customizable from webconf

Hi @mheidt!

  • Regarding the “LV2 error” messages, i think they will be fixed in the next green build.

  • Regarding your problems with MIDI CustomActions, send the full log. Specially the “MIDI SWITCHES SETUP…”

Perhaps you could add some extra log message too :wink:

Regards,

I found the bug

self.zynswitches_midi_setup(curlayer_chan)

is only called in set_active_channel

But I boot up a zynthian without setting an active channel.
plain vanilla empty zynthian, no layers except MX. I press the button, to load the layers :slight_smile:

1 Like

Uhhhh! Nice!! Try now …

I got it working with one machine. But the second one doesn’t…i investigate…

The machine, that is not working has an old image (???).
I will create a new image for this machine tomorrow.
And it uses MCP23008
So maybe the wiring like this is the issue
INFO:zynthian_gui: SETUP ZYNSWITCH 0 => wpGPIO 0
Mar 12 14:21:32 zynthian startx[1215]: INFO:zynthian_gui: SETUP ZYNSWITCH 1 => wpGPIO 0
Mar 12 14:21:32 zynthian startx[1215]: INFO:zynthian_gui: SETUP ZYNSWITCH 2 => wpGPIO 0
Mar 12 14:21:32 zynthian startx[1215]: INFO:zynthian_gui: SETUP ZYNSWITCH 3 => wpGPIO 0
Mar 12 14:21:32 zynthian startx[1215]: INFO:zynthian_gui: SETUP ZYNSWITCH 4 => wpGPIO 100
Mar 12 14:21:32 zynthian startx[1215]: INFO:zynthian_gui: SETUP ZYNSWITCH 5 => wpGPIO 101
Mar 12 14:21:32 zynthian startx[1215]: INFO:zynthian_gui: SETUP ZYNSWITCH 6 => wpGPIO 102
Mar 12 14:21:32 zynthian startx[1215]: INFO:zynthian_gui: SETUP ZYNSWITCH 7 => wpGPIO 103
Mar 12 14:21:32 zynthian startx[1215]: INFO:zynthian_gui: MIDI SWITCHES SETUP…
INFO:zynthian_gui: MIDI ZYNSWITCH 7: 12 CH#15, 1

Maybe you stop at the first 0 GPIO somewhere…

startx[1215]: INFO:zynthian_gui_config: Wiring Layout CUSTOM
Mar 12 14:21:30 zynthian startx[1215]: DEBUG:zynthian_gui_config: ZYNCODER A: [0, 0, 0, 0]
Mar 12 14:21:30 zynthian startx[1215]: DEBUG:zynthian_gui_config: ZYNCODER B: [0, 0, 0, 0]
Mar 12 14:21:30 zynthian startx[1215]: DEBUG:zynthian_gui_config: SWITCHES layout: [0, 0, 0, 0, 100, 101, 102, 103]

@jofemodo
I installed 2020-03-11+update and still don’t get the snapshot loaded on the MCP23008 with no zyncoders but 3 custom switches.
If you can’t reproduce this scenario. Could you tell me, where I should add logs?

Send your wiring config

It seems good. If the switch works as CUIA, i don’t see any reason for not working as MIDI action. Look for the “MIDI SWITCHES SETUP…” in the UI log.

Regards,

Mar 13 22:45:36 zynthian startx[15321]: INFO:zynthian_gui: MIDI SWITCHES SETUP…
Mar 13 22:45:36 zynthian startx[15321]: INFO:zynthian_gui: MIDI ZYNSWITCH 7: 12 CH#15, 1

and when I press
Mar 13 22:47:29 zynthian startx[15321]: INFO:zynthian_gui: Short Switch 7

It looks fine! Try with a channel different from Master and disable the ZS3. You should see the MIDI event in the MIDI log …

Regards,

no midi messages (no blue m in ui neither)

And does it work with Note or CC messages?

no note either. I didn’t test CC

OK! I have it! MIDI send wasn’t implemented in the old zyncoder MCP23008 code (polling zynswitches).
I just created a branch in the zyncoder repository:

zynswitch_poll_midi

Please, test with this branch!

cd /zynthian/zyncoder
git fetch
git checkout zynswitch_poll_midi
git pull
./build.sh
systemctl restart zynthian

Regards,

Great…note works…testing pc now

1 Like

yes, pc as well. and 0 is the first one…like expected. although you could define 0 to load the default…

1 Like

It’s merged on master now :wink:

1 Like

Hi, I added an extra switch to the pin 16 (GPIO23/wPI4) of the RPi4 and I can detect it working from the commandline, but I cannot make zynthian detect it. I tried adding both 4 and 23 to the end of the list of switches in the webconf, but nothing works. Not a single message in the UI log either. Standard buttons on the MCP work well.

Am I missing something? I have to admit that I am not sure about the exact role of the “Wiring Layout” selector. So I have just selected the “Mcp23017 Zynscreen” option. Do I need to switch to another one?

1 Like

Sorry @wanthalf , the current zyncoder code has come limitations and doesn’t allow to mix switches on the RBPi GPIO and MCP2317.