I had time in between to test the proposed solution with Node-Red. After some trial and error, I came up with a workable solution. The crucial code looks like this:
- Code: Select all
msg.payload = "VIDEO OUTPUT ROUTING:"; //calling the videohub to change the routing
node.send(msg); //sending the command
msg.payload = '\r\n'; //generating a return command
node.send(msg); //sending
msg.payload = '8 0'; //routing input 9 (which is in the code 8) to output 1 (which is 0)
node.send(msg); //sending
msg.payload = '\r\n \r\n'; //double return
node.send(msg); //sending
This code is integrated into a
function node that can be called using a
button, and then passes its content to a
tcp request node that addresses the videohub.
Overall, a very clever solution - thanks a lot for that!