# Config info for custom wiring

**URL:** <https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654>\
**Category:** Building Zynthian\
**Created:** [December 25, 2025, 4:21pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654 "2025-12-25T16:21:38Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [December 28, 2025, 11:58am UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/21 "2025-12-28T11:58:04Z")

</div>

Thank you.  
I will check that also.  
Maybe on top of the configuration problems there is some strange behavior of the MCP23017.  
But I’ll check that in detail, maybe by disconnecting this unit and checking it separately with a small Program on a Raspi Pico (so I don’t mess up with Zynthian)

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [December 28, 2025, 11:58am UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/22 "2025-12-28T11:58:30Z")

</div>

What does webconf display for the current wiring selection?  
A screen shot helps.

Stick -1 in for the two failing pins on Wiring Switches

> export ZYNTHIAN\_WIRING\_SWITCHES=“-1, -1, 100, 103”

I find this sort of stuff easier from webconf but stick with the method that works for you.

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [December 28, 2025, 12:00pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/23 "2025-12-28T12:00:04Z")

</div>

I think that GPA presents as pins 100..107 and GPB presents as pins 108..115.

You have missed out pin 111.

You have not marked up on your drawing where the interupt pins are wired.

There are spaces in the lists, try removing them.

---

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [December 28, 2025, 12:04pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/24 "2025-12-28T12:04:02Z")

</div>

Normally I document my things on my very old fashioned and incomplete homepage

> **[Home JCF](https://staff.ltam.lu/feljc/home.html)**

or on Github

> **[jean-claudeF - Overview](https://github.com/jean-claudeF)**
>
> jean-claudeF has 23 repositories available. Follow their code on GitHub.

But this time I struggled so much to get a start that I have a lot of notes spreaded on my table that are not ready. I hope they will get better with the time.

---

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [December 28, 2025, 12:09pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/25 "2025-12-28T12:09:09Z")

</div>

> [@wyleu](#):
>
> -1, -1, 100, 103

I did it (from the web config, normally I do but I thought text would be a bit more compact to post)  
and the result is this now:  
`Dec 28 12:07:06 zynthian startx[2389]: ZynCore->setup_behaviour_zyncoder(2, ...): Invalid index! `  
`Dec 28 12:07:06 zynthian startx[2389]: ZynCore->setup_behaviour_zyncoder(3, ...): Invalid index! `  
`Dec 28 12:07:06 zynthian startx[2389]: ZynCore->setup_behaviour_zyncoder(0, ...): Invalid index! `  
`Dec 28 12:07:06 zynthian startx[2389]: ZynCore->setup_behaviour_zyncoder(1, ...): Invalid index! `  
`Dec 28 12:07:06 zynthian startx[2389]: ZynCore->setup_behaviour_zyncoder(2, ...): Invalid index!`

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [December 28, 2025, 12:09pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/26 "2025-12-28T12:09:12Z")

</div>

If I manually enter your config at the command line it fails because of the spaces in the lists:

```auto

(venv) root@zynthian-rpi5:/zynthian/zynthian-ui# export ZYNTHIAN_WIRING_ENCODER_A=“110, 114, 102, 105”
bash: export: `114,': not a valid identifier
bash: export: `102,': not a valid identifier
bash: export: `105”': not a valid identifier

```

---

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [December 28, 2025, 12:10pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/27 "2025-12-28T12:10:39Z")

</div>

Oh no, you are right!  
With all this messing around, I cannot count anymore!  
I have corrected the schematic I posted.

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [December 28, 2025, 12:11pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/28 "2025-12-28T12:11:46Z")

</div>

Also, entering at the command line, you must omit the quote marks, e.g.

```auto

export ZYNTHIAN_WIRING_ENCODER_A=110,114,102,105

```

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [December 28, 2025, 12:22pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/30 "2025-12-28T12:22:05Z")

</div>



---

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [December 29, 2025, 5:36pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/31 "2025-12-29T17:36:09Z")

</div>

I have started to document my experiments:

> **[GitHub - jean-claudeF/synthesizer: Synthesizer experiments](https://github.com/jean-claudeF/synthesizer)**
>
> Synthesizer experiments

There is a description of

- my first try without any decoders or buttons (success!)
- a test I did using a Raspi Pico connected to my encoder board via I2C.  
This test revealed that the hardware is functional.

The Zynthian configuration problem is still the same.

---

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [December 30, 2025, 9:29am UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/32 "2025-12-30T09:29:28Z")

</div>

Oops, I just noticed another error in my schematic. I switched Port A and port B addresses as I instinctively thought A is on top and B on the bottom.  
One should really doublecheck everything.  
But this cannot be the source of the errors at it would just switch the encoders.

Should I edit my post above and post a corrected schematic?

Here is a screenshot of my actual configuration:

 ![image](https://discourse.zynthian.org/uploads/default/original/2X/e/e924808b123d53566c3c1f04bc6080ee984f792c.png)

Question: is there anything else to do at the bottom of this config screen (customizng the switches for intended action)? I did not do anything else as I thought the 4 encoders had a standard function.

---

<div class="post-metadata">

**Author:** ![HansR](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/hansr/32/15102_2.png) [@HansR](https://discourse.zynthian.org/u/HansR)\
**Post date:** [December 30, 2025, 1:50pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/33 "2025-12-30T13:50:58Z")

</div>

Hi @Jean-Claude_Feltes

If I were you, I’d simply build it according to the official schematic (see PDF below).  
I just finished a diy zynthian, and the encoders worked out of the box. No config changes necessary.

Please look at the MCP23017 left bottom. It has I2C number 0x21, not 0x20 as you describe.  
Also the switches are on ports A0 - A3, not scattered all over the place.

If you use the correct rotary encoders (as already emphasized by @wyleu) and you connect them as in the schematic it simply works. Please do yourself a favour and stop messing with the config.

Kind regards,  
Hans.  
[V5 control.pdf](https://discourse.zynthian.org/uploads/short-url/q6iQEEdaoZQZnR8P71rip45wCYS.pdf) (78.4 KB)

---

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [December 30, 2025, 4:14pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/34 "2025-12-30T16:14:14Z")

</div>

@HansR

Thank you for your reaction.  
I sort of expected that someone would tell me: “Why don’t you buy the kit and everything will work fine.”  
Well, I’m used to developing things by starting small and adding features on the way forward.

I will however come back to your proposal, maybe.

Concerning the encoders: I cannot imagine that they are the problem. I have used them in other circuits, if Vcc and GND are connected there should be no problem. And how should the software know if they work fine or not while not being activated. The error must come from bad configuration, and I would really like to know what’s wrong.

”Also the switches are on ports A0 - A3, not scattered all over the place.”  
Yes, I would have arranged them also in a more ordered way, but I started from the schematic of Zynthian mini, not knowing if it was allowed to put them in a different way.

At the beginning there were too many confusing things, like the use of Wiring Pi numbers. It took me some time for example to check out where the interrupts were connected, as the pin numbers did not match the GPIOs on my Raspi.

Anyway, Zynthian is a super project and I would like to go on with it!

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [December 30, 2025, 4:37pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/35 "2025-12-30T16:37:08Z")

</div>

Hi @Jean-Claude_Feltes !

Do you know there is a command line tool to test encoders and switches?  
It’s in the zyncoder’s library build dir:

`/zynthian/zyncoder/build/zyncoder_test`

To use it, you must be sure that zynthian service is stopped:

`systemctl stop zynthian`

You will find this tool very useful to test your wiring config and trace the issues.

Also, i would recommend you to edit & test the wiring config from command line. It’s a lot faster!

* * *

**0. Stop zynthian service and work from zyncoder’s library dir:**

```auto
systemctl stop zynthian
cd /zynthian/zyncoder

```

**1. Edit the configuration in _/zynthian/config/zynthian\_envars.sh_. For instance:**

`joe /zynthian/config/zynthian_envars.sh`

**2. Load the new config with:**

`source /zynthian/config/zynthian_envars.sh`

Probably this step is not needed, but it won’t harm 😉

**3. Rebuild the library:**

```auto
rm -rf build
./build.sh

```

**4. Test the configuration with the command line tool:**

`./build/zyncoder_test`

**Iterate from 1 …**

* * *

All the best,

---

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [December 30, 2025, 5:02pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/36 "2025-12-30T17:02:16Z")

</div>

Thank you Joe,  
that seems a very interesting method to test my hardware.  
I will try it.

But what I still miss is an information on the rules that are valid for the config.  
Is there no place where this info can be read. For example it was not evident for me to know that the ports of the MCP23017 have addresses 100, 101, … and not 0, 1, 2 …

Concerning the command line: yes, I like it, and I have used one or the other method to enter my config.  
It is very good that files can be edited with the web config.

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [December 30, 2025, 5:23pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/37 "2025-12-30T17:23:16Z")

</div>

> [@Jean-Claude\_Feltes](#):
>
> But what I still miss is an information on the rules that are valid for the config.  
> Is there no place where this info can be read. For example it was not evident for me to know that the ports of the MCP23017 have addresses 100, 101, … and not 0, 1, 2 …

There are no general fixed rules for wiring config, as they depend of the zyncontrol file used to build zyncoder. In your case, it’s the “zyncontrol\_vx.c” file and the rules are hardcoded on it. It’s not too difficult to read and understand:

> <https://github.com/zynthian/zyncoder/blob/oram/zyncontrol_vx.c>

Regards,

---

<div class="post-metadata">

**Author:** ![jofemodo](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jofemodo/32/2_2.png) [@jofemodo](https://discourse.zynthian.org/u/jofemodo)\
**Post date:** [December 30, 2025, 5:25pm UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/38 "2025-12-30T17:25:53Z")

</div>

BTW, after refreshing my mind with the code, i see you could simplify the testing procedure:

* * *

**0. Stop zynthian service and work from zyncoder’s library dir:**

```auto
systemctl stop zynthian
cd /zynthian/zyncoder

```

**1. Edit the configuration in _/zynthian/config/zynthian\_envars.sh_. For instance:**

`joe /zynthian/config/zynthian_envars.sh`

**2. Load the new config with:**

`source /zynthian/config/zynthian_envars.sh`

**3. Test the configuration with the command line tool:**

`./build/zyncoder_test`

**Iterate from 1 …**

---

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [December 31, 2025, 7:50am UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/39 "2025-12-31T07:50:50Z")

</div>

Ah! That should help me a lot! Thank you!  
I will study the code and experiment further…

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [December 31, 2025, 9:23am UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/40 "2025-12-31T09:23:20Z")

</div>

> [@Jean-Claude\_Feltes](#):
>
> it was allowed to put them in a different way.

Other than sending the boys round, I’m not sure how we would enforce this, and if we did I would expect it to end up as a jam session . . .

> [@Jean-Claude\_Feltes](#):
>
> Thank you Joe,

[![](https://img.youtube.com/vi/rXwMrBb2x1Q/maxresdefault.jpg "The Jimi Hendrix Experience - Hey Joe (Official Audio)") ](https://www.youtube.com/watch?v=rXwMrBb2x1Q&t=15)

---

<div class="post-metadata">

**Author:** ![Jean-Claude\_Feltes](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/jean-claude_feltes/32/16856_2.png) [@Jean-Claude\_Feltes](https://discourse.zynthian.org/u/Jean-Claude_Feltes)\
**Post date:** [January 1, 2026, 11:25am UTC](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654/42 "2026-01-01T11:25:23Z")

</div>

When I do the test I get this:

```auto
root@zynthian://zynthian/zynthian-ui/zyncoder# systemctl stop zynthian          
root@zynthian://zynthian/zynthian-ui/zyncoder# cd /zynthian/zyncoder            
root@zynthian:/zynthian/zyncoder# source /zynthian/config/zynthian_envars.sh    
root@zynthian:/zynthian/zyncoder# ./build/zyncoder_test                         
Starting ZynCore...                                                             
ZynCore: Configured 0 x Logical Zynswitches...                                  
ZynCore: Setting-up 0 x Physical Zynswitches...                                 
ZynCore: Setting-up zyncoder in pins (102, 101)...                              
ZynCore: Setting-up zyncoder in pins (105, 104)...                              
ZynCore: Setting-up zyncoder in pins (110, 109)...                              
ZynCore: Setting-up zyncoder in pins (113, 112)...                              
ZynCore: Setting-up 4 x Zynpots (zyncoders)...                                  
ZynCore->init_poll_zynswitches(): Zynswitches poll thread created successfully  
ZynCore->setup_behaviour_zyncoder(0, ...): Invalid index!                       
ZynCore->setup_behaviour_zyncoder(1, ...): Invalid index!                       
ZynCore->setup_behaviour_zyncoder(2, ...): Invalid index!                       
ZynCore->setup_behaviour_zyncoder(3, ...): Invalid index!                       
Testing switches & rotaries...            

```

```
(I left away the encoder switches for the test)

```

It seems that the proble does not lie in the piece of code that you gave me, as there is no such text to be found.  
Could you give me an idea where to lokk further?

[Previous page](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654.md?page=1)

[Next page](https://discourse.zynthian.org/t/config-info-for-custom-wiring/12654.md?page=3)
