[SOLVED] Button Matrix not listening on address

Dude this is sick.
I have searched the forum quite a bit but couldnt find anybody having trouble with it.

My matrix changes its size based on stepped knobs, with each change, i send

/eos/ds/@{bank_id}/group/@{page_num}/@{button_amount}

and get back this or similar:

(DEBUG, OSC) In:  { address: '/eos/out/ds/1/1', args: [ 'Hauptfoyer [1]', '1' ] } From: 192.168.0.59:62774
(DEBUG, OSC) In:  { address: '/eos/out/ds/1/2', args: [ 'Treppe Eingang U [2]', '2' ] } From: 192.168.0.59:62774
(DEBUG, OSC) In:  { address: '/eos/out/ds/1/3', args: [ 'Oberes Foyer [3]', '3' ] } From: 192.168.0.59:62774
(DEBUG, OSC) In:  { address: '/eos/out/ds/1/4', args: [ 'Bar [4]', '4' ] } From: 192.168.0.59:62774
(DEBUG, OSC) In:  { address: '/eos/out/ds/1/5', args: [ '', '5' ] } From: 192.168.0.59:62774
(DEBUG, OSC) In:  { address: '/eos/out/ds/1', args: 'Gruppen [1]' } From: 192.168.0.59:62774

The matrix i created has this as script properties, with those stupid debug messages too at the moment.

JS{{
    var props = {};
    var s = []; var si = 0;
    s[si++] = "console.log('script from matrixitem:" + $ + "')";
    s[si++] = "console.log(Date.now())";
    s[si++] = "console.log('The value is:'+value)";
    s[si++] = "console.log('The getPropvalue is:'+getProp('this',\'value\'))";
    s[si++] = "console.log('address is:'+getProp('this',\'address\'))";
    props.script = s.toString();
    props.address = "/eos/out/ds/" +@{ bank_id }+"/" + ($ + 1);
    props.mode = "tap";
    props.on = null;
    props.bypass = true;
    return props;
}}

So, when tapping the button, i should get the received value via address and also check if address is correct, but i dont get a value but address is correct.

script from matrixitem:0 
1611612010641
The value is:null
The getPropvalue is:
address is:/eos/out/ds/1/1

Oh Damn, i changed the matrix content to text widget and values are received…
But i kinda need the address for filtering the data out, then regex match parameters out and use that for sending via script inside the button…
what would you recon.

damn i feel stupid =)

Kinda hijacking this thread again for a related problem, but read it through first as i discovered the solution myself by brute force… still posting for the chance of helping others

Trying to use the html property to use as a second label with this inside props tag of the matrix:

props.html="OSC{/ds/"+@{bank_id}+"/"+($+1)+"/num}";

using the same property outside of a matrix works fine like this:

OSC{/ds/@{bank_id}/1/num}

i can only assume the osc query is executed within the matrix script and the result of it is immediatly stored in the html property which then results as undefined and not stored as a literal string down to the matrix-button/item level where i am hoping to catch the incoming osc

and as im writing this here, i went back and tried escaping it like this

props.html="\O\S\C{/ds/"+@{bank_id}+"/"+($+1)+"/num}";

and it works nicely, also just went back to the documentation to see if its mention or not and i couldnt find anything. so im not sure if its intentioned behavior or just a lucky strike. maybe want to add it to documentation somewhere.

big love, the matrix button problem above still persist tho…

So it seems like talking to myself solves quite some problems
My solution is now this:

JS{{
var props = {};
props.address="/eos/cmd/Group/\O\S\C{/ds/"+@{bank_id}+"/"+($+1)+"/num}";
props.id="/ds/"+@{bank_id}+"/"+($+1);
props.label="\O\S\C{/ds/"+@{bank_id}+"/"+($+1)+"/label}";
props.mode = "tap";
props.html=$+"@{/ds/"+@{bank_id}+"/"+($+1)+"/num}";
props.html="<span class=group-no>\O\S\C{/ds/"+@{bank_id}+"/"+($+1)+"/num}</span>";
props.on = null;
props.bypass = false;
return props;
}}

I do some regex stuff in the module file to split up the strings in parts needed to be used in the buttons.
By using label with OSC{} i didnt rely on address property for incoming data (duh :face_with_hand_over_mouth:) So basicly escaping the OSC tags is the good stuff.

Thanks for reading whatsoever. Therapeutic writing is something new to me tho.

Cheers

2 Likes