BATC ATV Repeater - Network Control of Video Switches
Triggers as an alternative to GPIO
Is this possible or easy to do:
When a valid signal (locked) or stream is received by a Ryde that a http or OSC trigger could be defined/sent as an alternative, or as well as to a GPIO pin?
I'm thinking just modify the playback.py to send a command when the locked and unlocked condition is detected.
Basically the "Bitfocus Companion" software does what we need and can drive multiple devices including the BlackMagic ATEM. It also has a web page that emulates the display on a Elgato Streamdeck for manual input from users.
Guy M0GUY suggested this approach, he's developed a media player for the ATEM called PiDeck (as an alternative to the BlackMagic HyperDeck), that would not only provide the media server solution, but also animated graphics for the lower-thirds
Most of the repeater control would be via ATEM macros
Justin.
When a valid signal (locked) or stream is received by a Ryde that a http or OSC trigger could be defined/sent as an alternative, or as well as to a GPIO pin?
I'm thinking just modify the playback.py to send a command when the locked and unlocked condition is detected.
Basically the "Bitfocus Companion" software does what we need and can drive multiple devices including the BlackMagic ATEM. It also has a web page that emulates the display on a Elgato Streamdeck for manual input from users.
Guy M0GUY suggested this approach, he's developed a media player for the ATEM called PiDeck (as an alternative to the BlackMagic HyperDeck), that would not only provide the media server solution, but also animated graphics for the lower-thirds
Most of the repeater control would be via ATEM macros
Justin.
Re: Triggers as an alternative to GPIO
Hi Justin
I suggest that you find a Python expert and, with them, develop the code modifications that you require. Tim and I can then integrate these modifications into the main Python build.
My initial suggestion (although I am not a Python expert by any means) is that the best place to insert the code that you are talking about (or at least to trigger it) is within the function gpioMan.setRXgood(self, newState) which is here in the code: https://github.com/BritishAmateurTelevi ... io.py#L233
One-off modifications to large projects such as the Ryde are not a good use of developers' time, although experience on the Portsdown project has demonstrated that third-party code contributions can be very valuable and add features while not diverting from the main development effort.
I do still wonder how the ATEM will manage the prioritisation of inputs, display of idents and repeater keeper functions in your proposed design if you are not going to have a separate "controlling" processor.
Dave, G8GKQ
I suggest that you find a Python expert and, with them, develop the code modifications that you require. Tim and I can then integrate these modifications into the main Python build.
My initial suggestion (although I am not a Python expert by any means) is that the best place to insert the code that you are talking about (or at least to trigger it) is within the function gpioMan.setRXgood(self, newState) which is here in the code: https://github.com/BritishAmateurTelevi ... io.py#L233
One-off modifications to large projects such as the Ryde are not a good use of developers' time, although experience on the Portsdown project has demonstrated that third-party code contributions can be very valuable and add features while not diverting from the main development effort.
I do still wonder how the ATEM will manage the prioritisation of inputs, display of idents and repeater keeper functions in your proposed design if you are not going to have a separate "controlling" processor.
Dave, G8GKQ
Re: Triggers as an alternative to GPIO
Dave,
many thanks, that's really helpful. What I like the most is that it is virtually all out of the box.
The Bitfocus Companion software looks after all the communications to ATEM, but it can also talk to OBS, BlackMagic Multiview, ATEN Matrix and interfaces to many other devices, making it more-or-less hardware independent. Programming it is very easy indeed, really just configuration. The number of hardware devices that the software can interface with is mind-boggling. The software also runs on Linux/Windows and Mac and there is a Pi port too and new integrations being developed all the time. Using M0GUY's PiDeck brings a very capable media server too that already integrates with the ATEM.
The "trigger" from each receiver would be the "locked" state and the all important "un-trigger" (basically calls the ATEM standing media MACRO) the "unlocked" state I have the POC working now with an http command, for example:
http://192.168.0.176:8888/press/bank/1/13 selects (the reference is just the virtual Elgato StreamDeck button as in the picture) In my picture the first row is switch commands, the second row transition MACROS.
Using the timer function in Companion would bring up graphics images and lower-thirds (.png transparencies from the media player) etc, so that part is easy, the call would be to an ATEM MACRO that can perform the function of the media rotation etc. Remember the ATEM also has the option of a streamer output (and input) and has analogue microphone/line inputs and a built-in still media player that holds 20 pictures or transparencies. It also supports PiP, so if a second input comes up then that can be a PiP.
I had thought of priority management and for that it might be easier with a single server, in fact it had crossed my mind to use your repeater controller for this, but then I thought you can just prioritize on a last-in first out basis to begin with. I doubt it will be a major issue in practice. The back-up would be manual input selection on the web site or by using the PIP function or by sending the web request to the site Atom PC and brokering the priorities there, but there are so many built-in possibilities with the Companion.
One thing for sure, using OBS or ATEM as the switcher has many more future opportunities for creative transitions and inserts than an HDMI switch and that's my main driver as its more future development proof and offers the opportunity for some very creative interfaces, even "super chats" that pop up like an iPhone SMS when someone chats via the BATC web site.
many thanks, that's really helpful. What I like the most is that it is virtually all out of the box.
The Bitfocus Companion software looks after all the communications to ATEM, but it can also talk to OBS, BlackMagic Multiview, ATEN Matrix and interfaces to many other devices, making it more-or-less hardware independent. Programming it is very easy indeed, really just configuration. The number of hardware devices that the software can interface with is mind-boggling. The software also runs on Linux/Windows and Mac and there is a Pi port too and new integrations being developed all the time. Using M0GUY's PiDeck brings a very capable media server too that already integrates with the ATEM.
The "trigger" from each receiver would be the "locked" state and the all important "un-trigger" (basically calls the ATEM standing media MACRO) the "unlocked" state I have the POC working now with an http command, for example:
http://192.168.0.176:8888/press/bank/1/13 selects (the reference is just the virtual Elgato StreamDeck button as in the picture) In my picture the first row is switch commands, the second row transition MACROS.
Using the timer function in Companion would bring up graphics images and lower-thirds (.png transparencies from the media player) etc, so that part is easy, the call would be to an ATEM MACRO that can perform the function of the media rotation etc. Remember the ATEM also has the option of a streamer output (and input) and has analogue microphone/line inputs and a built-in still media player that holds 20 pictures or transparencies. It also supports PiP, so if a second input comes up then that can be a PiP.
I had thought of priority management and for that it might be easier with a single server, in fact it had crossed my mind to use your repeater controller for this, but then I thought you can just prioritize on a last-in first out basis to begin with. I doubt it will be a major issue in practice. The back-up would be manual input selection on the web site or by using the PIP function or by sending the web request to the site Atom PC and brokering the priorities there, but there are so many built-in possibilities with the Companion.
One thing for sure, using OBS or ATEM as the switcher has many more future opportunities for creative transitions and inserts than an HDMI switch and that's my main driver as its more future development proof and offers the opportunity for some very creative interfaces, even "super chats" that pop up like an iPhone SMS when someone chats via the BATC web site.
- Attachments
-
- Companion.png (63.95 KiB) Viewed 6843 times
Re: Triggers as an alternative to GPIO
Dave,
another thought.
Can your new repeater controller easily request a web URL instead of an infrared command on reception and completion of a Ryde locked condition?
That would leverage both solutions very neatly.
Justin.
another thought.
Can your new repeater controller easily request a web URL instead of an infrared command on reception and completion of a Ryde locked condition?
That would leverage both solutions very neatly.
Justin.
Re: Triggers as an alternative to GPIO
Justin
Web commands from the repeater controller are a possibility. The initial implementation might take a while, but it would then be easy to add it as a switching option.
Can you refer me to some authoritative technical reference on the format of the commands?
Dave
Web commands from the repeater controller are a possibility. The initial implementation might take a while, but it would then be easy to add it as a switching option.
Can you refer me to some authoritative technical reference on the format of the commands?
Dave
Re: Triggers as an alternative to GPIO
Dave,
The web commands are really easy:
http://192.168.0.176:8888/press/bank/1/9 will select button 1.9 as per the image. In this case it's a MACRO that makes a wipe transition to Input 1 on the ATEM
http://192.168.0.176:8888/press/bank/1/1/6 will select button 1.13 and select a "cut" to color bars in my example image
The actual button function is a configuration in the "Companion" app which is here: https://bitfocus.io/companion/
The basic config is easy:
Install the software on your desired platform (Linux, Windows, Mac)
There is a web server interface on port 8888 or you can use the host machine
You then add your device or "instances" in otherwords the platform
Under "presets" there are actions that you drag to the appropriate button on the "virtual" Elgato StreamDeck (you don't actually need a Streamdeck, but you can add one). You can customize presets and make your own, but for the ATEM world I use ATEM macros, might be a slideshow or the brief display of a lower third graphic.
Of course you could add an "OBS" if you wanted or a presentation switch, Cisco conference bridge, about 240 integrations. I coudl even add my KNX Smart Home as an instance through Home Assistant (I run GB3JV telemetry repeater via ModBus and I built the dashboard in Home Assistant)
I've also added OBS, You need to install the OBS Websocket plug-in, when you connect Companion to OBS it automatically copies your OBS set-up to Companion, so you have per-configured buttons that you can drag and drop onto the virtual StreamDeck instance.
Here is a video showing it: https://youtu.be/57OAIE600G0
If you buy a StreamDeck, you get physical buttons with mini TFT screens that you can put your own Icons onto. In my picture the third row is the OBS instance.
So all I need to implement a repeater controller is the ability to send a web command to the REST API
I've tested with Telnet and Web.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Other alternatives:
TCP/UDP Remote control
Remote triggering can be done by sending TCP (port 51234) or UDP (port 51235) commands.
Commands:
PAGE-SET <page number> <surface id>
Make device go to a specific page
PAGE-UP <surface id>
Page up on a specific device
PAGE-DOWN <surface id>
Page down on a specific surface
BANK-PRESS <page> <bank>
Press and release a button (run both down and up actions)
BANK-DOWN <page> <bank>
Press the button (run down actions)
BANK-UP <page> <bank>
Release the button (run up actions)
Examples
Set the emulator surface to page 23
PAGE-SET 23 emulator
Press page 1 bank 2
BANK-PRESS 1 2
OSC Remote control
Remote triggering can be done by sending OSC commands to port 12321.
Commands:
/press/bank/<page> <bank>
Press and release a button (run both down and up actions)
/press/bank/ <page> <bank> <1>
Press the button (run down actions and hold)
/press/bank/ <page> <bank> <0>
Release the button (run up actions)
/style/bgcolor/ <page> <bank> <red 0-255> <green 0-255> <blue 0-255>
Change background color of button
/style/color/ <page> <bank> <red 0-255> <green 0-255> <blue 0-255>
Change color of text on button
/style/text/ <page> <bank> <text>
Change text on a button
Examples
Press button 5 on page 1 down and hold
/press/bank/1/5 1
Change button background color of button 5 on page 1 to red
/style/bgcolor/1/5 255 0 0
Change the text of button 5 on page 1 to ONLINE
/style/text/1/5 ONLINE
RossTalk
Remote triggering can be done by sending RossTalk commands to port 7788.
Commands:
CC <page>:<button>
Press and release button
Examples
Press and release button 5 on page 2
CC 2:5
Log
Presets
Import / Export
Preset categories for Blackmagic Design:ATEM (atem)
The web commands are really easy:
http://192.168.0.176:8888/press/bank/1/9 will select button 1.9 as per the image. In this case it's a MACRO that makes a wipe transition to Input 1 on the ATEM
http://192.168.0.176:8888/press/bank/1/1/6 will select button 1.13 and select a "cut" to color bars in my example image
The actual button function is a configuration in the "Companion" app which is here: https://bitfocus.io/companion/
The basic config is easy:
Install the software on your desired platform (Linux, Windows, Mac)
There is a web server interface on port 8888 or you can use the host machine
You then add your device or "instances" in otherwords the platform
Under "presets" there are actions that you drag to the appropriate button on the "virtual" Elgato StreamDeck (you don't actually need a Streamdeck, but you can add one). You can customize presets and make your own, but for the ATEM world I use ATEM macros, might be a slideshow or the brief display of a lower third graphic.
Of course you could add an "OBS" if you wanted or a presentation switch, Cisco conference bridge, about 240 integrations. I coudl even add my KNX Smart Home as an instance through Home Assistant (I run GB3JV telemetry repeater via ModBus and I built the dashboard in Home Assistant)
I've also added OBS, You need to install the OBS Websocket plug-in, when you connect Companion to OBS it automatically copies your OBS set-up to Companion, so you have per-configured buttons that you can drag and drop onto the virtual StreamDeck instance.
Here is a video showing it: https://youtu.be/57OAIE600G0
If you buy a StreamDeck, you get physical buttons with mini TFT screens that you can put your own Icons onto. In my picture the third row is the OBS instance.
So all I need to implement a repeater controller is the ability to send a web command to the REST API
I've tested with Telnet and Web.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Other alternatives:
TCP/UDP Remote control
Remote triggering can be done by sending TCP (port 51234) or UDP (port 51235) commands.
Commands:
PAGE-SET <page number> <surface id>
Make device go to a specific page
PAGE-UP <surface id>
Page up on a specific device
PAGE-DOWN <surface id>
Page down on a specific surface
BANK-PRESS <page> <bank>
Press and release a button (run both down and up actions)
BANK-DOWN <page> <bank>
Press the button (run down actions)
BANK-UP <page> <bank>
Release the button (run up actions)
Examples
Set the emulator surface to page 23
PAGE-SET 23 emulator
Press page 1 bank 2
BANK-PRESS 1 2
OSC Remote control
Remote triggering can be done by sending OSC commands to port 12321.
Commands:
/press/bank/<page> <bank>
Press and release a button (run both down and up actions)
/press/bank/ <page> <bank> <1>
Press the button (run down actions and hold)
/press/bank/ <page> <bank> <0>
Release the button (run up actions)
/style/bgcolor/ <page> <bank> <red 0-255> <green 0-255> <blue 0-255>
Change background color of button
/style/color/ <page> <bank> <red 0-255> <green 0-255> <blue 0-255>
Change color of text on button
/style/text/ <page> <bank> <text>
Change text on a button
Examples
Press button 5 on page 1 down and hold
/press/bank/1/5 1
Change button background color of button 5 on page 1 to red
/style/bgcolor/1/5 255 0 0
Change the text of button 5 on page 1 to ONLINE
/style/text/1/5 ONLINE
RossTalk
Remote triggering can be done by sending RossTalk commands to port 7788.
Commands:
CC <page>:<button>
Press and release button
Examples
Press and release button 5 on page 2
CC 2:5
Log
Presets
Import / Export
Preset categories for Blackmagic Design:ATEM (atem)
- Attachments
-
- Companion 1.png (110.94 KiB) Viewed 6741 times
-
- Companion3.png (165.66 KiB) Viewed 6741 times
-
- Companion4.png (151.78 KiB) Viewed 6741 times
Re: Triggers as an alternative to GPIO
You can also add Slack Channels, so we could have tight integration on the BATC website at a later date.
Re: Triggers as an alternative to GPIO
Another thing you can do with this software is begin streaming to another repeater using the dashboard or on certain input transmission parameters.
Re: Triggers as an alternative to GPIO
Hi Justin
I've started to look at this and I think that it will be practical.
There will be one entry in the config file to set the device address and port, so something like:
and then an entry to select each input like these 2:
I'll need you to build a basic repeater controller first, and test some commands for me. Then I'll be able to add them to the main build.
I do not have any triggers for specific inputs dropping, when an input drops it just goes back to the controller image (except for quad which is more complex).
73
Dave
I've started to look at this and I think that it will be practical.
There will be one entry in the config file to set the device address and port, so something like:
Code: Select all
networkctrlurl=http://192.0.1.176:8888
Code: Select all
output1netcommand=press/bank/1/9
output2netcommand=press/bank/1/1/6
I do not have any triggers for specific inputs dropping, when an input drops it just goes back to the controller image (except for quad which is more complex).
73
Dave
Re: Triggers as an alternative to GPIO
Dave,
Controller working in its basic form
two questions:
Is the position of networkctrlurl=http://192.0.1.176:8888 in the config file critical? Should it be at the top?
Should the switching commands (output1netcommand=press/bank/1/9) replace the IR commands or can they be added as well?
Justin.
Controller working in its basic form
two questions:
Is the position of networkctrlurl=http://192.0.1.176:8888 in the config file critical? Should it be at the top?
Should the switching commands (output1netcommand=press/bank/1/9) replace the IR commands or can they be added as well?
Justin.