Regex and Nexia PM mixer

183 views
Skip to first unread message

Klaus

unread,
Aug 4, 2014, 1:18:47 PM8/4/14
to comman...@googlegroups.com
I have a level fader at a Nexia PM mixer and want to display its level in a serial join.

Command value: 
GET 1 FDRLVL 127 1<LF>

Received data in Hercules:
GET 1 FDRLVL 127 1 
-12.000000

Which means: Fader with Instance ID 127 has a level of -12 dB.

With Regex I try to extract the red marked part:
GET 1 FDRLVL 127 1 
-12.000000

I want to get: -12.0 but struggle with the LF CR.
Regex: (127.*\r\n\-?\d?\d\.0) seems to be wrong. Help!

Klaus

Jarrod Bell

unread,
Aug 4, 2014, 7:51:20 PM8/4/14
to comman...@googlegroups.com
Try this:
GET 1 FDRLVL 127 1\x0A([-\.\d]+)

This will capture just the level value. Add more brackets around other data if you need to capture it as well.

[-\.\d]+ means capture "one or more hyphens, dots or digits until the next character that doesn't match, or end of the data"

Add \x0D after or before the \x0A if it is still not working.

Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


--
You received this message because you are subscribed to the Google Groups "CommandFusion Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commandfusio...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Klaus

unread,
Aug 5, 2014, 4:31:28 PM8/5/14
to comman...@googlegroups.com
Oh my dear, the received data seems to be "wrong".
   When I catch all received data using Regex: (.*) then I just receive -12.000000
That means Nexia does not send back the information to which fader the data belongs to.

Maybe I should first set a virtual join to "high", fire the GET level command, and extract the received level with Regex.
   I add a new group in the feedback processing and give it the name "vol".
      I add an OnMatch command that sends $vol$ to my serial (fader 127 display) join if the virtual join is high.

Does this make sense?

Klaus

Jarrod Bell

unread,
Aug 5, 2014, 5:48:50 PM8/5/14
to comman...@googlegroups.com
Yes that makes sense, and in the onmatch you would use a value like:
{{if([@d1]==1, $vol$, [@s127])}}

This will result in the value of the capture if digital join 1 is high, or use the value of serial join 127 (basically reassigning the old value) if the digital join was low.


Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


Adrian Davis

unread,
May 11, 2015, 1:51:48 AM5/11/15
to comman...@googlegroups.com, jar...@commandfusion.com
Hi Jarron / Klaus,

I have recently been introduced to CommandFusion and iViewer when work was handed a CF Mini to play with to look at moving away from AMX and Crestron as the core logic drivers for our smaller installations.

Absolutely loving iViewer so far, however, have hit a bit of a snag on my test bed with a Biamp Audiaflex.
I have Sliders talking to volume controls via telnet (with simulation switched on), however, I can't for the life of my work out feedback to set the faders to their respective level when connecting (read from the audiaflex) - is there somewhere you can point me to look at this?

Kindest Regards,
Adrian Davis.

Jarrod Bell

unread,
May 11, 2015, 1:55:15 AM5/11/15
to comman...@googlegroups.com
Feedback processing is based on regular expressions.
See more about feedback processing in our wiki:
http://commandfusion.com/wiki2/software/gui-designer/system-manager/feedback-parsing

If you give me a sample of the incoming data, I can help you craft a regex to process it and assign it to a slider level.


Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


Adrian Davis

unread,
May 11, 2015, 2:17:38 AM5/11/15
to comman...@googlegroups.com, jar...@commandfusion.com

Damn that was fast!
Ok, so I am a complete newbie to CommandFusion.
And I think I may have just worked out part of what I was missing - I was not getting a verbose response from the Biamp Audiaflex,
I have changed the SET to SETD and now get a response.

I set the level by sending the following syntax string:
<ACTION> <SYSTEM NUMBER> <COMMAND> <CONTROL ID> <CONTROL INDEX> <VALUE>
telnet e.g. SETD 1 FDRLVL 115 1 -5 <LF>

Using a Slider in guiDesigner I can control the level with the following Command Value:
SETD 1 FDRLVL 115 1 [sliderval] \x0A


I now will receive the following:

#SETD 1 FDRLVL 115 1 -5.000000 +OK

This is where I'm stuck:

  • Do I assign a join number to the slider eg Join# 115?
  • Do I create a feedback action with Regex #SETD 1 FDRLVL 115 1 \x0A([-\.\d]+)
  • Do I add an "On Match" to set a value for Serial Join 115 to equal [sliderval]
  • How to I get iViewer to poll every say 1000ms for these values?

Sorry I know it must be fairly simple - however, I am loving this system so far, as it seems considerably quicker to program in.

Thanks in advance Jarrod! 

Regards,
Adro.

Jarrod Bell

unread,
May 11, 2015, 2:23:48 AM5/11/15
to comman...@googlegroups.com
With incoming data like:

#SETD 1 FDRLVL 115 1 -5.000000 +OK

A regex would be something like:
#SETD 1 FDRLVL 115 1 ([\-\d\.]+)

Very close to your regex, just without the line feed \x0A in there (which I didnt see mention of in the sample data).

Then add a "capture group" item to your feedback processing order (below the regex).
Set the data type and target type to analog, and set the min and max that you expect the data range to come in from.
The min/max setting will automatically scale the incoming data to the 0-65535 range that sliders need to be fed with.

If the system doesnt give you unsolicited notifications on volume changes, then you can poll for data using timers.
Right click a page (or subpage) to setup a timer that will poll whilst on that page.
http://commandfusion.com/wiki2/software/gui-designer/timers


Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


Adrian Davis

unread,
May 11, 2015, 2:48:57 AM5/11/15
to comman...@googlegroups.com, jar...@commandfusion.com
Getting so close - sorry to be a pain mate.
Slider is controlling level, but still not updating.

Here is the Slider settings:


Here is the Command to execute the volume change:


Here is my Feedback action:

Thanks again!

Adro.

Jarrod Bell

unread,
May 11, 2015, 3:04:11 AM5/11/15
to comman...@googlegroups.com
That looks fine.
I suspect the reply data is not actually as you describe.
Maybe all it is returning is "+OK", which is useless to you really.

Confirm the reply data using a tool like Hercules:
http://www.hw-group.com/products/hercules/index_en.html


Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


Adrian Davis

unread,
May 26, 2015, 12:52:02 AM5/26/15
to comman...@googlegroups.com, jar...@commandfusion.com

Hi Jarrod,

Back at it again, this is the reply data I got from Hercules when I send the command.
Seems like it is returning the correct data, will the +OK be affecting the parsing of the feedback regex?


Jarrod Bell

unread,
May 26, 2015, 1:07:00 AM5/26/15
to comman...@googlegroups.com
#SETD 1 FDRLVL 115 1 ([\-\.\d]+)

There is no "\x0A" in the middle of the reply data.


Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


Con Andrews

unread,
Feb 2, 2016, 1:16:04 AM2/2/16
to CommandFusion Software, jar...@commandfusion.com
Jarrod

I'm trying to accomplish the same thing on the same Biamp Audia processor and have absolutely no idea how to handle this either. I followed your responses to Adrian Davis' post/question but see there was no closure on that issue, or at least nothing that helped me. 

Is there anything further to what you have written that I could try?

Regards

Con Andrews

Jarrod Bell

unread,
Feb 2, 2016, 1:35:49 AM2/2/16
to comman...@googlegroups.com
Hi Con,

Can you confirm the exact data you are receiving that needs to be processed?
I need to see the exact data from Hercules logs or something similar so I can help you - maybe a screenshot from Hercules showing the command sent from Hercules and the response that is returned.
Make sure 'Special chars' > 'Hexadecimal' is enabled in the TCP Client log in Hercules so that hex bytes are shown as readable.


Regards,

Jarrod Bell
CommandFusion
www.commandfusion.com


Reply all
Reply to author
Forward
0 new messages