Videohub create macro7/27/2023 ![]() I now have the panel polling the VideoHub using a Listener and callback function so that it dynamically pulls a list of all of the VideoHub inputs and puts them into a dropdown list. One of my goals is to create a "director's dashboard" where he/she can quickly invoke some changes during a service/show. I've been continuing to modify my panel as I increase functionality. ![]() ndMessage(ogscript.getPrivateString('hosts', 'VideoHub.address'),ogscript.getPrivateString('hosts', 'VideoHub.port'),telnetScript,callback) įunction callback(success, sentData, resultString, exception) TelnetScript = telnetScript i ' ' params.getValue(0x3,i) "\r\n" Var telnetScript = "VIDEO OUTPUT ROUTING:\r\n" I monitored it in telnet to figure that out but it should have been obvious. The key was to add a final CRLF at the end (an extra one). Ok, it's working great now with ndMessage. I already had it working great using AppleScript so I didn't press further, but if ndMessage would work, that seems like it would be a lot more elegant! I tried even just typing in a manual, non-parameter based line of code like my example above and the router still didn't change state, so I couldn't tell what was going on. That essentially boils down to something like this: ndMessage(ogscript.getPrivateString('hosts', 'VideoHub.address'),ogscript.getPrivateString('hosts', 'VideoHub.port'),telnetScript) I couldn't tell if it was failing out, but the router didn't change state. ![]() I saw on this thread where it was recommended to use ndmessage, but in my tests, it did nothing. It launches a Terminal instance, types "telnet 192.168.11.128 9990" (the ip address and port) and then the router automatically responds with the current state of settings and waits for your response. That is essentially what I am doing with AppleScript. I can telnet to the VideoHub in terminal on a specific port, and then send paste in that text string. The number on the left is a destination, the number on the right, a source. Ogscript.putPrivateString('hosts', 'VideoHub.port', params.getValue(0x2,0)) Įssentially, this panel builds a text string that looks like this: Ogscript.putPrivateString('hosts', 'VideoHub.address', params.getValue(0x1,0)) tValue(0x2, 0, ogscript.getPrivateString('hosts', 'VideoHub.port')) tValue(0x1, 0, ogscript.getPrivateString('hosts', 'VideoHub.address')) Var appleScriptCommand = "set telnet to \"" telnetCommand "\n" telnetScript "\n" "exit" "\"\n" Var telnetCommand = "telnet " ogscript.getPrivateString('hosts', 'VideoHub.address') " " ogscript.getPrivateString('hosts', 'VideoHub.port') TelnetScript = telnetScript i ' ' params.getValue(0x3,i) "\n" Var telnetScript = "VIDEO OUTPUT ROUTING:\n" everything is zero based including the array so we just go ahead and drop it down ![]() Var args = įunction tellVideoHub(destination, source) If anyone has experience with the telnet side and wants to jump in, let me know!įunction runAppleScript(applescriptCommand) I couldn't get telnet to work without calling it via AppleScript, but it works fine doing that. It's still a work in progress but it is functioning fine at this point. I needed something simple for volunteers where they could click a clear, distinct, labeled button and have it do the macro. I wrote a panel today to send telnet commands to our VideoHub router to make simple routing changes. ![]()
0 Comments
Leave a Reply. |