Remote Tools

Overview

In addition to the SmartPlug Apps, the CloudPlugs SmartPlug™ IoT agent includes three important tools to enable remote access, monitoring and management of files on field devices. The tools are:

  1. The Remote Terminal.
  2. The Remote JavaScript Shell.
  3. The Remote File Manager.

They are available on Production Things running a SmartPlug™.

Remote Terminal

Remote Terminal The SmartPlug™ includes a full implementation of a Remote tty Terminal accessible through the management console or properties console of Production Things. You can work on the device remotely, edit files, watch processes, etc.

To open a remote terminal:

  1. Open the Production Things Management console from the CloudPlugs IoT platform web desktop.
  2. Select a device running a SmartPlug™.
  3. Click on the Remote Terminal button ( Remote Terminal ).
Remote Terminal

If the device is running a SmartPlug™, the Remote Terminal can also be opened through the Thing Properties Console as shown below.

Remote Terminal

The result is the Remote Terminal shown below.

Remote Terminal2

Back to Top

You can paste into the Remote Terminal window by copying the desired text to the clipboard and using option+V in Windows or cmd+V in Mac.

Remote JavaScript Shell

JS Shell The SmartPlug™ also has a Remote JavaScript Shell (JS Shell) which allows remote, real-time monitoring of all the JavaScript applications running on the SmartPlug™. The JS Shell is an implementation of the Node.js REPL (Read-Eval-Print-Loop) and is connected to the SmartPlug™ Worker process.

To open a remote JS Shell:

  1. Open the Things Management console from the CloudPlugs IoT platform web desktop.
  2. Select a device running a SmartPlug™.
  3. Click on the JS Shell button ( JS Shell ).
JS Shell

If the device is running a SmartPlug™, the JS Shell can also be opened through the Thing Properties Console as shown below.

JS Shell

The JS Shell opens as shown below.

JS Shell

Back to Top

The JS Shell allows several commands which can be seen by typing .help on the console.

  • .break Aborts further input or processing of the curent expression.
  • .clear Alias for .break.
  • .exit Closes the I/O stream and exits the REPL JS Shell.
  • .help Shows the REPL commands and options.
  • .load Load a JS file from the device into the current REPL session.
  • .npm Execute an npm command.
  • .restart Restart the SmartPlug™ Worker process.
  • .save Save all evaluated commands in this REPL session into a file on the device.
  • .timeout Sets the node.js promise timeout in milliseconds. A value of false means no timeout.
  • process.exit() Causes the restart of the Worker process.

You can paste into the JS Shell window by copying the desired text to the clipboard and using option+V in Windows or cmd+V in Mac.

Remote File Manager

Remote File Manager The SmartPlug™ also has a File Manager which allows remote file operations on the system running the SmartPlug™. The main features are:

  1. Upload (Upload) files from the computer running the web desktop to the device running the SmartPlug™.
  2. Download (Download) files from the device running the SmartPlug™ to the computer running the web desktop.
  3. Rename (Rename) device files.
  4. Delete (Delete) device files. Requires read write permissions on the system running the SmartPlug™ by entering the parameter fm-perms=rw in the smartplug.conf file.
  5. Create new folders/directories (New Folder) on the device running the SmartPlug™.
  6. Navigate (Navigate) through the device file system structure.

To open the File Manager:

  1. Open the Things Management console from the CloudPlugs platform web desktop.
  2. Select a device running a SmartPlug™.
  3. Click on the File Manager button ( Remote Terminal ).
File Manager

If the device is running a SmartPlug™, the File Manager can also be opened through the Thing Properties Console as shown below.

File Manager

The File Manager window is open as shown below.

File Manager

Back to Top

Still need help? Get in touch!
Last updated on 6th May 2021