# responseID always zero

**URL:** <https://forum.electra.one/t/responseid-always-zero/2542>\
**Category:** General discussion\
**Created:** [November 24, 2023, 2:00pm UTC](https://forum.electra.one/t/responseid-always-zero/2542 "2023-11-24T14:00:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rozz3r](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rozz3r](https://forum.electra.one/u/rozz3r)\
**Post date:** [November 24, 2023, 2:00pm UTC](https://forum.electra.one/t/responseid-always-zero/2542/1 "2023-11-24T14:00:01Z")

</div>

(disclaimer, I’m an amateur programmer, so fully expect this is pilot error)

So, my MKS-50 sends 3 different sysex dumps when you change a Patch on the unit. Annoyingly it doesn’t respond to any request sysex, so this is the only way you can get a dump.

The 3 dumps have different headers like this:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/electraone/original/2X/8/832676c82d50e44129b788e0fa4eca739578dbe4.png)

I’d like to be able to parse the patch names from two of the dumps using patch.onResponse, but I can’t seem to separate them because responseId always equals zero.

I did some simple code to test:

function patch.onResponse (device, responseId, sysexBlock)  
local blockLength = sysexBlock:getLength()  
print ("responseId = " … responseId)  
print (“sysex message " … blockLength … " bytes long.”)  
end

And the result is:

09:49:16.014 lua: responseId = 0.0  
09:49:16.021 lua: sysex message 31.0 bytes long.  
09:49:16.022 lua: responseId = 0.0  
09:49:16.022 lua: sysex message 14.0 bytes long.  
09:49:16.041 lua: responseId = 0.0  
09:49:16.052 lua: sysex message 54.0 bytes long.

It’s obviously receiving all three dumps and triggering patch.onResponse three times, but the responseId is always the same.

NOTE: I tried having all three Responses under one single Message in the Device Settings / Messages pane, but that generated an identical result.

Any help is much appreciated.

---

<div class="post-metadata">

**Author:** ![NewIgnis](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/newignis/32/767_2.png) [@NewIgnis](https://forum.electra.one/u/NewIgnis)\
**Post date:** [November 24, 2023, 5:40pm UTC](https://forum.electra.one/t/responseid-always-zero/2542/2 "2023-11-24T17:40:48Z")

</div>

why do you use patch.onResponse instead of the response you can add under the 3 different dump requests? Surely the headers of these 3 responses are also different from on another? And the parsing will be much easier. I mean , I expect the SysEx responses of an MKS-50 to be rather straightforward, not like an XV5080 or a TG77

---

<div class="post-metadata">

**Author:** ![rozz3r](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rozz3r](https://forum.electra.one/u/rozz3r)\
**Post date:** [November 24, 2023, 8:01pm UTC](https://forum.electra.one/t/responseid-always-zero/2542/3 "2023-11-24T20:01:29Z")

</div>

Sure I parse the patch names from the dumps the easy way but I want to display them on screen everytime a dump is received which I have to do in LUA, and I can’t tell the dumps apart there. Unless I’m missing something?

---

<div class="post-metadata">

**Author:** ![NewIgnis](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/newignis/32/767_2.png) [@NewIgnis](https://forum.electra.one/u/NewIgnis)\
**Post date:** [November 25, 2023, 7:17am UTC](https://forum.electra.one/t/responseid-always-zero/2542/4 "2023-11-25T07:17:45Z")

</div>

You mean you want to show the patch name on your screen?

---

<div class="post-metadata">

**Author:** ![rozz3r](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rozz3r](https://forum.electra.one/u/rozz3r)\
**Post date:** [November 25, 2023, 9:03am UTC](https://forum.electra.one/t/responseid-always-zero/2542/5 "2023-11-25T09:03:49Z")

</div>

Exactly yes. And have the name change everytime a dump is received. Hence using onResponse.

I suppose I could tell the dumps apart by their length. But my understanding was that responseId was supposed to be a unique ID.

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [November 25, 2023, 9:11am UTC](https://forum.electra.one/t/responseid-always-zero/2542/6 "2023-11-25T09:11:36Z")

</div>

I have been rather busy recently. I will take a look at it tonight. Yes, the response Id should returned and it should be a unique ID identifying the sysex response message.

---

<div class="post-metadata">

**Author:** ![rozz3r](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rozz3r](https://forum.electra.one/u/rozz3r)\
**Post date:** [November 25, 2023, 9:28am UTC](https://forum.electra.one/t/responseid-always-zero/2542/7 "2023-11-25T09:28:26Z")

</div>

Thanks Martin. No rush!

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [November 26, 2023, 3:48pm UTC](https://forum.electra.one/t/responseid-always-zero/2542/8 "2023-11-26T15:48:22Z")

</div>

ok, now I understand. The GUI editor does not have any input field for the response Id. So, currently, you can enter that manually to the JSON only:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/electraone/original/2X/d/d3a052e20f59016c73ebca3ead22c8502273aaf8.jpeg)

I will adjust the editor accordingly later.

---

<div class="post-metadata">

**Author:** ![rozz3r](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rozz3r](https://forum.electra.one/u/rozz3r)\
**Post date:** [November 27, 2023, 12:04am UTC](https://forum.electra.one/t/responseid-always-zero/2542/9 "2023-11-27T00:04:34Z")

</div>

Aha! Thank you so much, Martin. I had assumed that the IDs were automatically assigned. Everything is working now. Cheers!
