bitfocus / companion-module-biamp-tesira

MIT License
0 stars 3 forks source link

Feature request: functionality to get variable value from 'get' command response #5

Open nriebesehl-pega opened 1 year ago

nriebesehl-pega commented 1 year ago

Some values aren't accessible with subscriptions. It would be useful to be able to manually poll for information with "get" commands and have the responses stored as custom variables as well.

AV-Phil commented 1 year ago

I would love to be able to get the status of Tesira block components such as mixers, meters, matrices, delays etc. for the purpose of robust reporting of

AV-Phil commented 11 months ago

the syntax for doing this via custom command appears to be now described in the help doc for the module in v3

however I still cannot seem to "get" or "subscribe" for the values of units that I am able adjust by name using a custom command, eg. I am able to set the mute status of a channel, Speakers set mute 9 true

but I cannot "Get" the bypass state Speakers subscribe mute 9 seminarSpkrsMute 250

both are entered exactly as produced by the Tesira string calc, I've triplechecked my variable & even tried adding the "custom_" header

alextannenbaum commented 11 months ago

are you able to get subscriptions working at all? It works for me via telnet on my laptop but not through companion. I execute the custom command "Level1 subscribe level 1 myLevel1 250" via a button and the variable does not get created in the Tesira module. I tried creating my own custom variable and that did not work either.

AV-Phil commented 10 months ago

I am able to subscribe via telnet, eg. below, subscribing to one of my input level blocks : "Microphones" to read the level of channel 10, giving an alias of Mic10

Microphones subscribe level 10 Mic10 50

returns as below: ! "publishToken":"Mic10" "value":-20.000000

could this returned value be stored in a custom variable based on the alias?? eg. $(internal:custom_Mic10)

Oldman-Winter commented 10 months ago

I also am having trouble figuring out how this is supposed to work. It seems that the Tesira variables should show up under variables but they don't.

The help says "you can use a custom command to subscribe to status updates from the tesira..." How you create the custom command isn't hard. There is even a link to the Biamp site with a tool to help create them.

The help guide says. "all responses are captured into a variable that can be used in button text in the format $(instanceName:CustomLabel)"

The first question is, where do you put these custom commands to subscribe? I can see 2 places where you can put the custom command, in a button press action or a trigger.

The second part is, how do you access the data? The help says all responses are captured into a variable in the format $(instanceName:CustomLabel) Do I need to create a custom variable or is this automatic? What is the instanceName? I don't see this variable listed anywhere in the variable list. It seems that the Tesira variables should show up under variables but they don't.

For example I made a custom command for a device called "Tesira1" in a button. Level01 subscribe level 1 MicLevel01

I tried accessing these but no luck. $(internal:custom_MicLevel01) $(Tesira1:MicLevel01)

AV-Phil commented 10 months ago

That's what I've been experiencing in my tests Oldman-Winter, I only jut thought to check the logs;

it appears the "variable" is stored in my custom label, but I am not able to retrieve it anywhere as yet...

oddly, i have an error of EHOSTUNREACH - yet I am able to send fader adjustments and presets, log below

Network error Error: connect EHOSTUNREACH 10.7.43.7:23 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) { errno: -4073, code: 'EHOSTUNREACH', syscall: 'connect', address: '10.7.43.7', port: 23 } error: Network error: connect EHOSTUNREACH 10.7.43.7:23 Socket Connected

Welcome to the Tesira Text Protocol Server...

Tesira Command Sent: Sent Command: Microphones subscribe level 10 Sim1Mic1Lvl 50 Microphones subscribe level 10 Sim1Mic1Lvl 50

! "publishToken":"Sim1Mic1Lvl" "value":-20.000000 +OK

variable set - Sim1Mic1Lvl = -20 Tesira Command Sent: Sent Command: Microphones subscribe level 10 Sim1Mic1Lvl 50 Microphones subscribe level 10 Sim1Mic1Lvl 50 -ERR ALREADY_SUBSCRIBED

Tesira Command Sent: Sent Command: Microphones subscribe level 10 Sim1Mic1Lvl 50 Microphones subscribe level 10 Sim1Mic1Lvl 50

Oldman-Winter commented 10 months ago

Aha I see it in the connection log now. I thought I checked there already.

I can see the log is showing the telnet responses from the Tesira.

But I don't know if this module is parsing and storing the data returned in a variable that we can access.

According to the Companion help, a module can make variables accessible to the user. There should be a button to access them under "Buttons" click a button and then select the variables tab. It only lists Custom Variables and Internal. No Tesira variables. And searching or scrolling or filtering through those doesn't show my variable I am looking for.

timt-111 commented 7 months ago

apologies for the late response. Based on the discussion above, I think you may be looking for the variable to appear in the custom list (which it will not), or you may be missing the instance name part...

when you create your connection to Tesira, there is a text box where you enter a label / name for that connection -- this is what I'm calling the 'instance name' (not to be confused with tesira's 'instance tag')

when you send a custom command to subscribe to something in tesira, you use this format: (InstanceTag) subscribe (attribute) (index) (CustomLabel) (delay)

CustomLabel is important, it will be the name of the variable you can access later. you need to include all of these values for the subscription to succeed.

when later trying to access the variable, you can test by setting a button's text to this: $(instance name:CustomLabel) Note: before you send the subscribe command, the button text would show something like $(N/A) or so

example: assuming your connection to tesira has a label / name called 'tesira'

Send a custom command to subscribe: "Microphones subscribe level 10 Sim1Mic1Lvl 50"

this should create a variable within companion called "$(tesira:Sim1Mic1Lvl)" -- be sure to include the dollar sign and parenthesis

I plan to get into some work to rewrite this module to work with the new companion version, and can try to implement any newly requested items. There is no timeframe for this, but I'd expect to have something in the first couple months of next year.

LukeSCC commented 4 months ago

I am also having issues with this. I am using the command "Level2 subscribe level 1 test" on a button. Looking at the logs this is successful as whenever I change the value I get "variable set - test = -66 ! "publishToken":"test" "value":-66.300003" dependant on the level. However, when i use "$(tesira:test)" this does not produce a value instead I get "$NA". I am on the latest stable companion and the connection is called "tesira". Perhaps this broke when 3.0 hit? Following this thought I downloaded a old version of companion (2.4.2 to be exact) and tried the exact same commands and this worked perfectly. I think the subscribe variable functionality has broken with 3.0 upwards.

timt-111 commented 4 months ago

I believe you are right that the feedbacks in general are no longer working in V3.0+. It's possible to download and use the older versions if necessary. I hope to gather the brainpower and time to update this module to work with v3 eventually.

AV-Phil commented 3 months ago

Thanks Tim, I was missing the "instance name", but am now using 3.2 for other device connections and may not be able to roll back at this point..

for clarity in the update, can I suggest distinguishing that from the instance tags by perhaps referring to it as "connection label" / "module label" ? either way it would be great to include the nomenclature and your detail above in the connection help page

thanks again - I appreciate your work in developing this to the point is at!