Domnev
Introduction
This article contains instructions on how to configure I/O Juggler between two RUT955 routers.
Configuration overview and prerequisites
Before we begin, let's overview the configuration that we are attempting to achieve and the prerequisites that make it possible. On a RUT1 an I/O Juggler action is created to execute a SMS and Script when Input 1 is being triggered to a state high to change Output state to high on a RUT2.
- RUT1 Input 1 state changes to a High;
- RUT1 sends command to RUT2;
- RUT2 Output(4) state changes to High;
Prerequisites:
- Two RUT955 routers (one of them with SIM card inserted);
- An end device (PC, Laptop, Tablet, Smartphone) for configuration;
If you're having trouble finding any page or some of the parameters described here on your device's WebUI, you should >turn on "Advanced WebUI" mode. . You can do that by clicking the "Basic" button under "Mode", which is located at the top-right corner of the WebUI.
Via SMS
This section contains a detailed guide on how to configure RUT1 and RUT2 devices. When RUT1 Input 1 state changes to a high, a command will send an SMS message to a RUT2 and change the device Output state to a high.
RUT 2
RUT2 device configuration section.
SMS Utilities configuration
The SMS Utilities section contains a list of rules that perform certain actions when they are activated by SMS messages. To create SMS rule:
- Log into Router 2 WebUI;
- Go to the Services → Mobile Utilities → SMS Utilities page and scroll down for Add new rule;
- Enter desired SMS text command (1) and select action (2);
- Add new instance (3);
After this you should redirected to configuration page for that rule:
- Open General tab;
- Check Enable;
- Action - Change I/O state;
- I/O - Output(4);
- State - High
- SMS text - Enter your desired SMS text;
- Save and apply changes;
Note: Not marked fields can be left as default.
RUT 1
RUT1 devices configuration section.
I/O Juggler configuration
The I/O Juggler is a feature that provides the possibility to create automated rules that perform certain actions based on Input state changes and other conditions.
Actions configuration
The Actions section is used to manage and create new Actions that can be executed by the I/O Juggler Rules. The figure below is an example of the Actions section, which is empty by default. To create a new action:
- Log into Router 1 WebUI and go to the Services → Input/Output → I/O Juggler → Actions (1) page;
- Enter the desired action instance name (2) and select desired action type (3);
- Click add (4);
This will open a new configuration page:
- Type - SMS;
- Text message - RUT2 password and the SMS rule that have been created on RUT2;
- Recipient's phone number - RUT2 SIM cards number;
- Save and apply changes;
Note: Not marked fields can be left as default.
General configuration
The General section is used to Input Trigger rules, which can perform a specified user-configured action when the Input state changes. After I/O Juggler Action tab is configured:
- Open General tab (1) and enable it (2);
- Add new instance role (3);
- Click Add (4);
After that, you will be prompted to edit an instance:
- Check Enable;
- Trigger - Raising;
- Add actions - Action name that was created previously;
Note: Not marked fields can be left as default.
Via Public IP using a script
For this configuration you will need a Static or Dynamic Public IP address. You can read up more on this in our article on Private and Public IP Addresses. When RUT1 Input 1 state changes to a high, action will execute a script that contains a curl -X command which will change RUT2 Output state to a high via RUT2 Public IP.
RUT 2
This section contain information on how to configure RUT2 device. A guide on how to configure SMS Utilities can be found above.
Remote access configuration
The Access Control page is used to manage remote and local access to device. To enable remote access:
- Navigate to System → Administration → Access Control
- Open General tab (1) and locate the WebUI section(2);
- Enable remote HTTP (3) and HTTPS access (4);
- Save and apply changes;
Post/Get configuration
Post/Get allows you to perform action requests by writing them in the URL after your device’s IP address. To set up Post/Get:
- Go to the Services → Mobile Utilities → SMS Gateway page → Post/Get (1);
- Enable Post/Get (2);
- Set a username (3) and password (4);
- Save and apply changes (5);
RUT 1
This section contain information on how to configure RUT1 device. A guide on how to configure I/O Juggler can be found above.
Actions configuration
Navigate to Services → Input/Output → I/O Juggler and create an Action instance.
- Type - Script;
- Specify path - you can choose between specifying the script path or uploading a script file directly;
- Script file - depending on what you have chosen in the field above, you will be asked to enter a script directory or upload a script file;
- Save and apply changes
Note: Not marked fields can be left as default.
Script
Script example can be seen below:
#!/bin/sh curl -X GET "http://84.25.189.15/cgi-bin/sms_send?username=name&password=password&number=0037066081843&text=admin01 outputon" exit 0
More information about curl -X command syntax can be found here.
Via RMS VPN using a script
For a more secure alternative, RMS VPN could be used to execute a curl -X script.
RMS VPN configuration
Go to rms.teltonika-networks.com, log into your RMS account and create a RMS VPN Hub. A guide on how to set up a RMS VPN Hub can be found here.
Please make sure that both RUT1 and RUT2 have been added to RMS VPN Hub.
Script
Adjust the script accordingly to the RMS VPN Hub assigned IP to RUT2. The script that been used in this example can be found here.
Results
If configured correctly you should be able to see that when RUT1 Input 1 state is being changed to high, RUT2 Output state changes to a high as well.