Difference between revisions of "Domnev"

From Teltonika Networks Wiki
Line 5: Line 5:
 
==Configuration overview and prerequisites==
 
==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.
+
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.
  
 
# RUT1 Input 1 state changes to a High;
 
# RUT1 Input 1 state changes to a High;
# RUT1 sends command to RUT2;
+
# RUT1 executes action and send command to RUT2;
 
# RUT2 Output(4) state changes to High;
 
# RUT2 Output(4) state changes to High;
  
Line 15: Line 15:
 
* An end device (PC, Laptop, Tablet, Smartphone) for configuration;
 
* 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.
+
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</b>. . You can do that by clicking the "Basic" button under "Mode", which is located at the top-right corner of the WebUI.
[[File:Basic WebUI Advanced.gif|border|center|class=tlt-border|1004x1004px]]
+
[[File:Basic WebUI Advanced.gif|frame|center|class=tlt-border|1004x1004px]]
 +
 
 +
 
 +
 
  
 
==Via SMS==
 
==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.
+
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===
 
===RUT 2===
 +
This section contain information on how to configure RUT2 device.
 
----
 
----
RUT2 device configuration section.
 
 
====SMS Utilities configuration====
 
====SMS Utilities configuration====
 +
The SMS Utilities section contains a list of rules that perform certain actions when they are activated by SMS messages.
 
----
 
----
The [[RUT955_Mobile_Utilities#SMS_Utilities|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;
 
* Log into Router 2 WebUI;
 
* Go to the '''Services → Mobile Utilities → SMS Utilities''' page and scroll down for '''Add new rule''';
 
* Go to the '''Services → Mobile Utilities → SMS Utilities''' page and scroll down for '''Add new rule''';
Line 46: Line 48:
  
 
'''Note:''' Not marked fields can be left as default.
 
'''Note:''' Not marked fields can be left as default.
 
+
----
 
===RUT 1===
 
===RUT 1===
 +
This section contains RUT1 I/O Juggler configuration.
 
----
 
----
RUT1 devices configuration section.
 
 
 
====I/O Juggler configuration====
 
====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 [[RUT955_Input/Output#I.2FO_Juggler|here]].
 
----
 
----
The [[RUT955_Input/Output#I.2FO_Juggler|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=====
 
=====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. You can learn more about it [[RUT955_Input/Output#Actions|here]].
 
----
 
----
The [[RUT955_Input/Output#Actions|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;
 
 
* Log into RUT1 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)''';  
 
* '''Enter''' the desired action '''instance name (2)''' and select '''desired action type (3)''';  
 
* Click '''add (4)''';  
 
* Click '''add (4)''';  
Line 65: Line 64:
  
 
This will open a new configuration page:
 
This will open a new configuration page:
[[File:IO juggler action sms1.png|border|center|class=tlt-border|1004x1004px]]
+
[[File:IO_juggler_SMS_config_new.png|border|center|class=tlt-border|1004x1004px]]
  
 
# Type - '''SMS''';
 
# Type - '''SMS''';
# Text message - '''RUT2 password''' and the '''[https://wiki.teltonika-networks.com/wikibase/index.php?title=Domnev&oldid=97995#SMS_Utilities_configuration SMS rule]''' that have been created on RUT2;
+
# Text message - '''RUT2 password''' and the '''SMS rule''' that have been created on RUT2;
 
# Recipient's phone number - RUT2''' SIM cards number''';
 
# Recipient's phone number - RUT2''' SIM cards number''';
 
# '''Save''' and '''apply changes''';
 
# '''Save''' and '''apply changes''';
  
 
'''Note:''' Not marked fields can be left as default.
 
'''Note:''' Not marked fields can be left as default.
 
+
----
 
=====General configuration=====
 
=====General configuration=====
 +
The General section is used to Input Trigger rules, which can perform a specified user-configured action when the Input state changes
 
----
 
----
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:
+
* Once I/O Juggler Action tab is configured, open '''General''' tab ('''1''') and '''enable''' it ('''2''');
 
 
* Open '''General''' tab ('''1''') and '''enable''' it ('''2''');
 
 
* Add '''new instance''' role ('''3''');
 
* Add '''new instance''' role ('''3''');
 
* Click Add ('''4''');
 
* Click Add ('''4''');
Line 92: Line 90:
  
 
'''Note:''' Not marked fields can be left as default.
 
'''Note:''' Not marked fields can be left as default.
 +
----
  
==Via Public IP using a script==
+
==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|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.  
+
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|Private and Public IP Addresses.]] 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===
 
===RUT 2===
 +
This section contain information on how to configure RUT2 device. A guide on how to [https://wiki.teltonika-networks.com/wikibase/index.php?title=Domnev&oldid=97979#SMS_Utilities_configuration configure SMS Utilities] can be found above.
 
----
 
----
This section contain information on how to configure RUT2 device. A guide on how to [https://wiki.teltonika-networks.com/wikibase/index.php?title=Domnev&oldid=97979#SMS_Utilities_configuration configure SMS Utilities] can be found above.
 
 
 
====Remote access configuration====
 
====Remote access configuration====
 +
The Access Control page is used to manage remote and local access to device.
 
----
 
----
The Access Control page is used to manage remote and local access to device. To enable remote access:
 
 
 
* Navigate to '''System → Administration → Access Control'''
 
* Navigate to '''System → Administration → Access Control'''
* Open '''General''' tab ('''1''') and locate the '''WebUI section'''('''2''');
+
* Open '''General''' tab ('''1''') and locate the '''WebUI section''';
* '''Enable''' remote '''HTTP''' ('''3''') and '''HTTPS''' access ('''4''');
+
* '''Enable''' remote '''HTTP''' ('''2''') and '''HTTPS''' access ('''3''');
* '''Save''' and '''apply''' '''changes''';
+
* '''Save''' and '''apply''' '''changes''' ('''4''');
  
[[File:Access control rutos1.png|border|center|class=tlt-border|1004x1004px]]
+
[[File:Access control rutos.png|border|center|class=tlt-border|1004x1004px]]
  
====Post/Get configuration====
+
====SMS Gateway (Post/Get) configuration====
 +
Post/Get allows you to perform action requests by writing them in the URL after your device’s IP address.
 
----
 
----
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)''';
 
* Go to the '''Services → Mobile Utilities → SMS Gateway page → Post/Get (1)''';
 
* '''Enable''' Post/Get '''(2)''';
 
* '''Enable''' Post/Get '''(2)''';
Line 120: Line 116:
 
* '''Save''' and '''apply changes (5)''';
 
* '''Save''' and '''apply changes (5)''';
  
[[File:SMS post get1.png|border|center|class=tlt-border|1004x1004px]]
+
[[File:SMS post get.png|border|center|class=tlt-border|1004x1004px]]
  
 
===RUT 1===
 
===RUT 1===
 +
This section contain information on how to configure RUT1 device. A guide on how to [https://wiki.teltonika-networks.com/wikibase/index.php?title=Domnev&oldid=97979#I.2FO_Juggler_configuration configure I/O Juggler] can be found above.
 
----
 
----
This section contain information on how to configure RUT1 device. A guide on how to [https://wiki.teltonika-networks.com/view/Domnev#I.2FO_Juggler_configuration configure I/O Juggler] can be found above.
 
 
 
=====Actions configuration=====
 
=====Actions configuration=====
 
----
 
----
Line 139: Line 134:
 
'''Note:''' Not marked fields can be left as default.
 
'''Note:''' Not marked fields can be left as default.
  
====Script====
 
----
 
 
Script example can be seen below:
 
Script example can be seen below:
 
<pre>#!/bin/sh
 
<pre>#!/bin/sh
Line 146: Line 139:
 
curl -X GET "http://84.25.189.15/cgi-bin/sms_send?username=name&password=password&number=0037066081843&text=admin01 outputon"
 
curl -X GET "http://84.25.189.15/cgi-bin/sms_send?username=name&password=password&number=0037066081843&text=admin01 outputon"
  
exit 0</pre>
+
exit 0</pre></li>
 +
 
 +
More information about '''curl -X''' command syntax [[RUT955_Mobile_Utilities#Post.2FGet|here]].
  
More information about '''curl -X''' command syntax can be found [[RUT955_Mobile_Utilities#Post.2FGet|here]].
+
==Via RMS VPN==
  
==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===
 
===RMS VPN configuration===
----
 
Go to '''[http://rms.teltonika-networks.com rms.teltonika-networks.com]''' → '''log into''' your '''RMS''' account → '''create''' a '''RMS VPN Hub'''. A guide on how to set up a RMS VPN Hub can be found [https://youtu.be/dfAudZR2wPY here].
 
  
[[File:RMS VPN config IO.png|border|center|class=tlt-border|604x604px]]
+
A guide on how to set up a RMS VPN Hub can be found [https://youtu.be/dfAudZR2wPY here].
  
Please make sure that both RUT1 and RUT2 have been added to RMS VPN Hub.
+
Both RUT1 and RUT2 have to be added to RMS VPN Hub.
  
 
====Script====
 
====Script====
----
+
Adjust the script accordingly to the RMS VPN Hub assigned IP to RUT2.
 +
 
 +
<pre>#!/bin/sh
 +
 
 +
curl -X GET "http://192.168.255.6/cgi-bin/sms_send?username=user1&password=password&number=0037066081843&text=admin01 outputon"
  
Adjust the script accordingly to the RMS VPN Hub assigned IP to RUT2. The script that been used in this example can be found [https://wiki.teltonika-networks.com/wikibase/index.php?title=Domnev&oldid=97995#Actions_configuration_2 here].
+
exit 0</pre></li>
  
 
==Results==
 
==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.
+
 
 +
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.
  
 
[[File:IO state.gif|border|center|class=tlt-border|1004x1004px]]
 
[[File:IO state.gif|border|center|class=tlt-border|1004x1004px]]
  
 
[[File:Output state.gif|border|center|class=tlt-border|1004x1004px]]
 
[[File:Output state.gif|border|center|class=tlt-border|1004x1004px]]

Revision as of 15:06, 14 November 2022

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

  1. RUT1 Input 1 state changes to a High;
  2. RUT1 executes action and send command to RUT2;
  3. 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.

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

This section contain information on how to configure RUT2 device.


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 and scroll down for Add new rule;
  • 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. I/O - Output(4);
  5. State - High
  6. SMS text - Enter your desired SMS text;
  7. Save and apply changes;

Note: Not marked fields can be left as default.


RUT 1

This section contains RUT1 I/O Juggler configuration.


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


  • 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);
IO juggler action sms.png

This will open a new configuration page:

IO juggler SMS config new.png
  1. Type - SMS;
  2. Text message - RUT2 password and the SMS rule that have been created on RUT2;
  3. Recipient's phone number - RUT2 SIM cards number;
  4. 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


  • Once I/O Juggler Action tab is configured, open General tab (1) and enable it (2);
  • Add new instance role (3);
  • Click Add (4);
IO juggler general config.png

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

IO Juggler general input config.png
  1. Check Enable;
  2. Trigger - Raising;
  3. Add actions - Action name that was created previously;

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


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

SMS Gateway (Post/Get) configuration

Post/Get allows you to perform action requests by writing them in the URL after your device’s IP address.


  • 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);
SMS post get.png

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.

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

RMS VPN configuration

A guide on how to set up a RMS VPN Hub can be found here.

Both RUT1 and RUT2 have to be added to RMS VPN Hub.

Script

Adjust the script accordingly to the RMS VPN Hub assigned IP to RUT2.

#!/bin/sh

curl -X GET "http://192.168.255.6/cgi-bin/sms_send?username=user1&password=password&number=0037066081843&text=admin01 outputon"

exit 0

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