yes, the code above solves the problem. instead of numbering the EEPROM channels based on the EEM channel number (which could overlap for urukuls in different crates), this code numbers the used EEPROM channels based on the index of the urukul, which is sequential over multiple crates and therefore unique. you will run into trouble though if you have more urukuls than there are EEPROM chips.
let me know if you get this to work, or if things are still unclear.
on our system, we have actually changed to a hard-coded mapping from urukul to EEPROM chip because two EEPROM chips appear to be broken. that EEPROM function looks like this
def eeprom_remap(key, value):
if value.get("class") == "KasliEEPROM":
value["arguments"]["port"] = {
"eeprom_urukul0": "EEM0",
"eeprom_urukul1": "EEM10", # EEM1 is defect
"eeprom_urukul2": "EEM11", # EEM2 is defect
"eeprom_urukul3": "EEM3",
"eeprom_urukul4": "EEM4",
"eeprom_urukul5": "EEM5",
"eeprom_urukul6": "EEM6",
"eeprom_urukul7": "EEM7",
"eeprom_urukul8": "EEM8",
}[key]