This application allows you to simply switch between different Livewire Sources (Inputs) and send them to a single Livewire Destination (Output). It's designed to be used as a simple studio delegation switcher. It also supports GPI as inputs (either to switch, or change the button indications), and GPIO Trigger outputs. It runs on Microsoft Windows and the Raspberry Pi (Raspbian).
You could use the PathfinderPC software. However, most small radio station's don't have the budget to buy this. If all you need to do is switch between a couple of different sources, Pathfinder may seem a little excessive.
This application relies on the Livewire Routing Protocol, so most Axia Livewire devices are supported. To support LWRP, we make use of the following libraries:
- Download the latest version from the "Releases" page
- Unzip the files someplace on your computer
- Rename 'config-sample.json' to 'config.json'
- Edit config.json to meet your needs
- You'll need to include the IP Address of your Output Node, the physical output number on your Node, and Livewire Channel Numbers for each source
- Run LW-Delegation-Switcher.exe
If all has gone well, you'll now be able to switch the source to your destination. The source highlighted in "Red" is the currently active source.
There are two ways you can use Livewire GPIO within this app:
- GPI Inputs
- GPIO Output Triggers
You can use these two features together, or separately.
You can configure this switcher to be controlled via the GPI pins on a single Livewire device. It's an input - essentially a way of controlling the switcher from external hardware. There's a 1:1 relationship between GPI pins and Switcher Buttons in this app. Whenever a pin is pulled low, the configured button in the lwSDS app is selected, changing the destination audio.
To configure this, configure global options 'GPI_DeviceIP' and 'GPI_DevicePassword', and source options 'GPI_SwitchPort' and 'GPI_SwitchPin'.
If you don't need this option, delete the lines with 'GPI_DeviceIP' and 'GPI_DevicePassword' from the config file.
You can also specify the GPI on a button to only be used as an 'indication' (rather than performing a switch). To do this, set option "GPI_IndicationOnly" to true.
GPIO Output Triggers
Output Triggers are used to send GPIO changes when a button is selected. Think of it as an output from this app, which is only sent whenever you press a button.
For configuration options, see the file 'config-sample-gpiotriggers.json'.
Under some circumstances, you may also like to set option "DisableRouteChange" to true to stop button presses from changing actually a route - with this mode enabled, button presses will only trigger the GPIO action (not a route change).
- Download and install Raspbian Desktop on your Raspberry Pi
- Connect to an Ethernet network
- Open Terminal and run the following commands:
sudo apt-get install python2 git git clone https://github.com/anthonyeden/Livewire-Simple-Delegation-Switcher/ chmod +x Livewire-Simple-Delegation-Switcher/start.sh echo "@/home/pi/Livewire-Simple-Delegation-Switcher/start.sh" >> .config/lxsession/LXDE-pi/autostart cp Livewire-Simple-Delegation-Switcher/config-sample.json Livewire-Simple-Delegation-Switcher/config.json
- To edit the configuration, run this command:
Press Ctrl + X to close the Nano text editor.
- The Livewire Simple Delegation Switcher should now load automatically whenever you login to your Raspberry Pi (there is a 10 second delay to give the Pi a chance to connect to the network). To start it manually, run the following commands from the terminal:
cd /home/pi/Livewire-Simple-Delegation-Switcher/ python2 LW-Delegation-Switcher.py
Upgrading - Raspberry Pi
- Open Terminal and run the following commands:
cd ~/Livewire-Simple-Delegation-Switcher git pull
Disabling the Screensaver on a Raspberry Pi
If you run this application on a Raspberry Pi, you're going to need to disable the screensaver. There's a couple of ways to do this, depending on your version of Raspbian:
- Install XScreensaver, by using the following terminal command:
sudo apt-get install xscreensaver
- Open the menu in the top-left corner of your desktop.
- Go to Preference > Screensaver.
- Select "Disable Screensaver"
- Reboot your Pi for the changes to work
sudo nano /etc/lightdm/lightdm.conf
Find (Ctrl + W):
Change it to:
xserver-command=X -s 0 dpms
Add these lines to .config/lxsession/LXDE-pi/autostart:
@xset s noblank @xset s off @xset -dpms
This software has been released as open source software. You're free to use and modify this software, but no liability can be accepted by the developer.
Please read the license agreement.
Contributions are welcomed. Feel free to submit a pull request to fix bugs or add additional functionality to this application.