Tobi DH1TW has designed the remoteSwitch program with which you can control any of our RemoteBox or StackMain models:
- RemoteBox 1×6
- RemoteBox 2×6
- RemoteBox 1×8
- RemoteBox 2×8
- RemoteBox 2×12
- RemoteBox 1×4
- StackMain (controlador StackMatchs 1×3)
Provided with a simple web interface, so that from any device (PC, Tablet or Mobile Phone) we can operate the antenna switch, Stacks or Phased vertical antennas, both locally and remotely over the internet. Through this web interface we can manage multiple devices simultaneously.
If we also want to connect one or more RBM client programs, then we will also use the ser2net+ service. This version of the ser2net that we are going to use has been compiled starting from the original ser2net service but that allows multiple simultaneous connections to be accepted.
The remoteSwitch program is available in source code in the Tobi DH1TW Github repository, but we have made some changes to adapt it to the RemoteBox and StackMain then you can download the latest version from the download area as well as the new ser2net as described in this guide.
This picture shows the diagram of the complete solution. It consists of at least 4 services and they are:
- remoteSwitch Web Server: module of the remoteSwitch that provides the web interface. It communicates with the rest of the remoteSwitch modules through the Nats server
- remoteSwitch: module that supports each RemoteBox or StackMain device. One is used for each device, in this example only one.
- Nats Server: The Nats is a simple, secure and high-performance messaging system that is used for the different remoteSwitch modules to communicate with each other.
- Ser2Net+: module that converts the serial connections of each device (RemoteBox or StackMain) into TCP/IP and multi-concurrent. The remoteSwich module agrees to communicate with each RemoteBox/StackMain via TCP/IP through this module.
The ideal platform to manage the RemoteBox and StackMain is undoubtedly the Raspberry Pi, due to its reliability, low consumption – with which we take care to leave it on 24 hours – and at its interesting price.
In this tutorial we will explain step by step the start-up of the remoteSwitch as well as the ser2net and Nats service using an RsPi (it does not matter the RsPi model that is Raspberry Pi Model B, Pi 2 or Pi 3).
In 4 simple steps, we will implement this solution, it will not be necessary to have great computer knowledge although you can always request a Raspberry with everything already installed in our store.
1.- Installation of the Operating System in the microSD
In a first step, we will explain how from scratch, we will finally have our RsPi running the Raspbian (V9 stretch) operating system for the first time.
For this we will need the computer to have a microSD card reader and a 4Gb card although 8Gb would be preferable.
If you already have an RsPi with the operating system running, you can skip this step.
2.- Preparing the Raspberry Pi
In this second step, we will change parameters that come by default from the Raspbian distribution, customizing certain features (language, SSH, …)
We will explain how to change the IP that by default is assigned by DHCP to a static IP and that will be necessary to be able to access the equipment at any time.
We will also add some utility, to make life easier for us in the Linux world, especially when we are not regular users of this S.O.
3.- Installation and adjustment of Nats and Ser2net
Here we explain how to install the Nats and Ser2net server. The configuration of the ser2net module is explained and where it is located.
The Nats does not require configuration parameters.
4.- Installation and adjustment of the remoteSwitch
Finally we explain how to install the remoteSwitch program, how it is configured and the options.
- Remember that at least you will have 2 instances running:
- One running as a web server
- As many additional instances as RemoteBox and StackMain devices have to be supported
Once you have followed these 4 steps, you will have been able to connect locally with a browser to the Raspberry Pi and control the RemoteBox and / or StackMain that you have defined.
Besides using the RBM program, you will also have been able to connect. If the access is going to be remote, that is to say that you want to access a Remote point where you have a RemoteBox + RsPi, then you will have to open ports of the remote router so that when accessing your IP (public area IP or WAN) the router route traffic to the IP of the Raspberry Pi.
If you want to limit web access to prevent unauthorized access, you can use Caddy (https://caddyserver.com). Caddy is a web server that mounted in front of the remoteSwitch web service, allows user authentication and allows access to the engine control. You have a Tobi tutorial explaining the launch of the Caddy program at: