Domnev

From Teltonika Networks Wiki
Revision as of 16:12, 10 November 2022 by Domnev (talk | contribs)

Introduction

This article contains instructions on how to set up two RUT955 routers to

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 command when Input 1 is being triggered to a state high to change Output state to high on a RUT2.

Prerequisites:

  • Two RUT955 routers (one of them with SIM card inserted);
  • An end device (PC, Laptop, Tablet, Smartphone) for configuration;

Router configuration

If you have familiarized yourself with the configuration scheme and have all of the devices in order, you can start configuring your routers using instructions provided in this section.

If you're having trouble finding this 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.

Basic WebUI Advanced.gif

Via SMS

This section contains a detailed guide on how to execute an action from RUT1 when Input 1 is being trigger. Action will send an SMS message to a RUT2 and change the device Output state to a high.

RUT 2

First, let's configure a RUT2 router.


SMS Utilities configuration

The SMS Utilities section contains a list of rules that perform certain actions when they are activated by SMS messages.


  • Log into Router 2 WebUI;
  • Go to the Services → Mobile Utilities → SMS Utilities page;
  • Enter desired SMS text command (1) and select action (2);
  • Add new instance (3);
SMS utils add.png

After this you should redirected to configuration page for that rule:

SMS utils SMS config.png
  1. Open General tab;
  2. Check Enable;
  3. Action - Change I/O state;
  4. State - High
  5. SMS text - Enter your desired SMS text;
  6. Save and apply changes;

Note: Not marked fields can be left as default.

RUT 2


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. You can learn more about it here.


Actions tab

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. You can learn more about it here.


Log into Router 2 WebUI and go to the Services → Input/Output → I/O Juggler page; Then navigate to Actions and create a new instance.

IO juggler action sms.png
  1. Enter the desired action instance name;
  2. Select desired type;
  3. Click add;

This will open a new configuration page:

IO juggler SMS config new.png
  1. Type - SMS;
  2. Text message - enter your Router 2 password and the SMS rule that you have created;
  3. Recipient's phone number - enter Router 2 SIM cards number;
  4. Save and apply changes

Note: Not marked fields can be left as default.

General tab

IO juggler general config.png
  1. Open General tab (1) and enable it (2);
  2. Add new instance role (3);
  3. Click Add (4);

After that, you will be prompted to edit an instance:

  1. Check Enable;
  2. Trigger - Raising;
  3. Add actions - Select the action you have created;
IO Juggler general input config.png

Note: Not marked fields can be left as default.

Via Public IP

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. Action will execute a script that contains a curl -X command which will RUT2 Output state to a high via RUT2 Public IP.

RUT 1


Remote access


Navigate to System → Administration → Access Control:

Access control rutos.png
  1. Open General tab (1) and locate the WebUI section;
  2. Enable remote HTTP (2) and HTTPS access (3);
  3. Save and apply changes (4);

Note: Not marked fields can be left as default.

SMS Gateway configuration


Go to the Services → Mobile Utilities → SMS Gateway page;

SMS post get.png
  1. Open Post/Get tab;
  2. Check enable;
  3. Enter desired username;
  4. Password;
  5. Confirm password;
  6. Save and apply changes;

Note: Not marked fields can be left as default.

RUT 2


Actions tab

Navigate to Services → Input/Output → I/O Juggler and create an Action instance.

IO juggler script conf.png
  1. Type - Script;
  2. Specify path - you can choose between specifying the script path or uploading a script file directly;
  3. 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;
  4. Save and apply changes

Note: Not marked fields can be left as default.

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 here.

Via RMS VPN

Results

If configured correctly you should be able to see that the RUT1 Input 1 state is being changed to high as well as RUT2 Output.

IO state.gif
Output state.gif