Version: 0.9.x | Dated: May 18th 2015

What is PlexusLAB?

PlexusLab, a state-of-the-art software, makes it possible to operate any machinery in just minutes!

Plexus and PlexusLab were created for users who do not have specific knowledge of electrical or IT work. Our cool, patented, and universal m8 connectors make it super easy for anyone to connect sensors and actuators. So, you can plan on spending less time and money on prep work, and more of that on your exciting trials and experiments.

After effortlessly connecting the sensors to Plexus, all you will need to do is simply plug the ethernet cable into Plexus. Now, you’re connected to PlexusLab are and ready to operate your machinery from your computer! Connect up to 20 Plexuses to a single computer; that’s 640 I/Os to control with a click of a mouse.

How it works

PlexusLab is based on an endless loop of three scripts written in PHP, which manage all the PlexusLAB functionalities (communication with Plexus, functions running, data storage, timers, alarms, ...)

Once PlexusLAB is installed these three scripts start running on your computer and they become parts of your system configuration.
This means that they start running when you turn on your computer and they stop when you turn it off.
Note With PlexusLAB you can manage those scripts by starting and stopping them via web browser.

Based on PHP

PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. As of January 2013, PHP was installed on more than 240 million websites (39% of those sampled) and 2.1 million web servers.

As of April 2007, over 20 million Internet domains had web services hosted on servers with PHP installed and mod_php was recorded as the most popular Apache HTTP Server module. As of October 2010, PHP was used as the server-side programming language on 75% of all websites whose server-side programming language was known (as of February 2014, the percentage had reached 82%), and PHP was the most-used open source software within enterprises.
Note You can find more info on PHP here.

Make it super fast with HHVM

If your computer is good in terms of RAM memory and CPU performance you could try the HHVM version of PLEXUS LAB which is three times faster than the PHP one.

HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the development flexibility that PHP provides.
Note You can find more info on HHVM here.

User Interface

The PlexusLAB user interface is based on a main page with three fixed elements which allows you to go trough all the functionalities of your project.

  1. Left column menu
  2. Top header bar
  3. Right panel (which is hidden as default)

Left column menu

This menu is divided in nine different submenus which allow you to navigate and edit the current project information.

  • Project info
    Here you can access the project general information page where you can edit its name, password and take a look on its speed.
  • System status
    This submenu shows you the current status of the PHP scripts which are running in your system and also allows you to start and stop them.
  • Devices
    This shows you a list of the devices you have created and you can activate or deactivate them from here.
    You can also add a new device from this menu.
  • Sections
    Here's a list of your sections and you can create a new one from here.
  • Functions
    In this menu you can create a new function, activate/deactivate an existing on and sort the order of their execution.
  • Storages
    The list of your storages is shown here with the activation/deactivation feature.
    You can create a new data storage from this menu.
  • Alarms
    This link shows you the alarm with all its features.
  • Black Box
    Here you can access to the endless data record page.
  • Panels
    This link opens a new page where you can create your own web-based HMI control panels.

Top header bar

The header bar has six buttons which make easier your interaction with PlexusLAB.

  • Left side
  • Hide/show the left column menu.

  • Right side
  • Go back to the projects list page.
  • Open the sounds modal with all its features to create, delete, play and reset a sound.
  • Open your HMI panels in a new tab.
  • Open the alarm page and shows the active alarms numbers as notification.
  • Hide/show the right panel.

Right panel

In this panel you can access and edit to your devices, sections, alarms and storages info and values which are shown in real time.

Tips Click the icon on the top header bar to show/hide this panel.

  • Devices
    This shows you a list of the devices you have created.
    Once you have selected a device, a list with all its values appears in the right panel and you can watch and edit those in real time whenever you want.
  • Sections
    This shows you a list of the sections you have created.
    Once you have selected a section, a list with all its variables and timers appears in the right panel and you can watch and edit those in real time whenever you want.
  • Alarms
    This shows you a list of the alarms you have created with their status.
  • Storages
    This shows you a list of the storages you have created their its status.

Requirements

Make sure you have all this before installing PlexusLAB:

  1. To run PlexusLAB you need to install Ubuntu on your computer.
    PlexusLAB supports Ubuntu Desktop 13.04/13.10/14.04/14.10 (download link)
    Note PlexusLAB currently does't support Ubuntu 15.04, so do not perform this update if asked.
    Note Ubuntu is really secure. To ensure high security on your system choose a strong password when asked during installation. For best performance do not choose the "Encrypt my disk" option!!
    Tips If you need help to install Ubuntu please check out this video tutorial : Install Ubuntu on youtube

  2. An internet connection
  3. 5 minutes of your time

Install

Follow these simple steps (internet is required):

PHP version

  1. Open your terminal (Crtl + Alt + t) and type:
    sudo apt-get install curl
    (insert your PC password if asked)

  2. In your terminal type:
    bash <(curl http://plexus-automation.com/downloads/install.sh)
    (insert your PC password if asked)
    Note Make sure to answer always "Y" when asked ("Y" than "ENTER")
    Tips When asked, enter a strong password for MySql (this will happen only if MySql is not present in the system already)

  3. Open your browser (Google Chrome strongly recommended!) at this url:
    http://localhost/plx or http://localhost
    Tips To access PlexusLAB from any other computer/tablet or phone connected to the network, enter the IP address of your Ubuntu machine in the browser.

HHVM version

  1. Open your terminal (Crtl + Alt + t) and type:
    sudo apt-get install curl
    (insert your PC password if asked)

  2. In your terminal type:
    • Ubuntu 14.04: bash <(curl http://plexus-automation.com/downloads/install_hhvm_14_04.sh)
    • Ubuntu 14.10: bash <(curl http://plexus-automation.com/downloads/install_hhvm_14_10.sh)
    • Ubuntu 15.04: bash <(curl http://plexus-automation.com/downloads/install_hhvm_15_04.sh)
    (insert your PC password if asked)
    Note Make sure to answer always "Y" when asked ("Y" than "ENTER")
    Tips When asked, enter a strong password for MySql (this will happen only if MySql is not present in the system already)

  3. Open your browser (Google Chrome strongly recommended!) at this url:
    http://localhost/plx or http://localhost
    Tips To access PlexusLAB from any other computer/tablet or phone connected to the network, enter the IP address of your Ubuntu machine in the browser.

Uninstall

Unistall PlexusLAB (internet is required):

  1. Open your terminal (Crtl + Alt + t) and type:
    bash <(curl http://plexus-automation.com/downloads/uninstall.sh)
    (insert your PC password if asked)
    Note All your projects will be removed and lost forever!

Terminal commands

Here you can find some commands you can execute from the terminal:

  • Stop PlexusLAB's main process from terminal:
    Open your terminal and type: sudo /var/www/html/plx/system/upstart/stop
    (insert your PC password if it's required)

  • Restart PlexusLAB's main process from terminal:
    Open your terminal and type: sudo /var/www/html/plx/system/upstart/restart
    (insert your PC password if it's required)

  • If PlexusLAB is not showing your data or is not working properly, this might solve the problem:
    Open your terminal and type: sudo chmod -R 777 /var/www/html/plx
    (insert your PC password if it's required)

  • To manage your database easily you can install PhpMyAdmin:
    1) Open your terminal and type: sudo apt-get install phpmyadmin
    (insert your PC password if it's required)
    2) Follow the installation instruction and then type: sudo sed -i '$a Include /etc/phpmyadmin/apache.conf' /etc/apache2/apache2.conf
    (insert your PC password if it's required)
    3) Restart apache2 typing: sudo service apache2 restart
    (insert your PC password if it's required)
    4) Open your browser at this url:
    http://localhost/phpmyadmin

Add/edit/remove a project

PlexusLAB organize your work into projects. A project represent an entire automation process, no matter if you are controlling a single machine or an entire energy plant. You can create as many projects as you want on your computer, but only one can be activated at the time.

Add a new project:
PlexusLAB's home page shows you the list of your projects. To add a new project click on the blue button "ADD" and enter a name for your projects
Tips - Is good practice throughout this application to give names without special catchers and without spaces ( a good name would be : "my_new_project")
Once created, the new project will appear in the list of projects. From here you can : Start/stop the projects, access the operator panel or enter the project's editing page

Edit a project:
To access the project's
Tips - Is good practice throughout this application to give names without special catchers and without spaces ( a good name would be : "my_new_project")

Start/Stop a project

Note PlexusLAB can run only one project at the time! If the project is not running, real time data is not shown

Start a project:
To start a project click on the fist button on the left. The icon will turn green and the gear icon will rotate.

Stop a project:
To stop a project click on the fist button on the left (if green). The icon will turn gray and the gear icon stop the rotation.

Tips You can Start/Stop a project from the project's editing page, where the project's info are located.

Import/Export a project

PlexusLAB makes it really easy to share projects on different computers. With the export/import feature you can be up an running with a new machine or plant in seconds!

Import a project:
On the projects list home page, click on "import" (green button). Select the .zip file that has been generated when you exported a project.

Export a project:
To export a project go into the project's editing page and click on the "export project" button (green button). A .zip file will be generated and saved on your computer.
Note When you export a project, the project's id will be reassigned and "_exported" string will be append to the name.

Password protection

You can protect your project editing page and the operator panel with a password to block access to your system informations.

2 different passwords:
Go to the project's editing page. Here you can enter a password to block access to the editing page. If you want, you can choose a password for the operator panel as well, so that the operator will not have access the editing page.

Video

Add/edit/remove a device

PlexusLAB can control up to 20 devices (Plexus32) at the same time. Managing devices is really simple and intuitive.
Note - In order for PlexusLAB to control live your device, you need to activate it on the menu on the left with the ON/OFF button

Add a new device:
In the project's editing page click on "Devices" on the left menu to open the drop down list. Click on "+ Add Devices" and insert the ip address of the device you have connected to the network.
Tips - The device you add needs to be inside the network of your Ubuntu machine (example: If your computer's ip address is 192.168.1.1, your devices must be 192.168.1.xxx, for example 192.168.1.2)
Note - Never use the same ip address for more than 1 device!

Edit a device:
Click on the device ip address located on the left menu. When the device page loads, you can change the name,description, ip address and calling rate from the panel on the right. After you change the informations, click on "Update Info", to set the changes.
Tips - the calling rate defines how often PlexusLAB calls the device for new data. The fastest you can call a device in 40ms, the slowest has no preset limit. Is good practice to set the calling rate at the slowest acceptable rate, but remember, the calling rate will affect your output (send rate) too.

Remove a device:
Click on the device ip address located on the left menu. When the device page loads, you can remove the device by clicking on "Remove device" on the right panel.

I/O settings

Plexus has 32 I/O. From the device page you can read real time data, set a name for the channel, set the value range, send output values, set decimal point and tare and see detailed informations for the GET REQUEST option.
Tips - To send and save values into the Device's table, press the "ENTER" key to apply changes (you'll see a confirmation message on the top right of the page)

NAME column:
Here you can write a name that represent your channel (example "temp_1"). After you change the name press the "ENTER" key to apply changes.
Tips - The name given will be used inside the functions. Is good practice to use only letters, numbers and underscore instead of space (example: "Temperature_1")

VALUE column:
Here you the real time value of your channel. This is read only

SET column:
This column is activated only if you have an output channel. To send a value to the Plexus, enter a number and press the "ENTER" key to send the value.

TYPE column:
This read-only column shows you the type of channel that has been set on your device.

  • dIn = digital input
  • dOut = digital output
  • vIn = analog input (0-10V)
  • iIn = analog input (0/4-20mA)
  • vOut = analog output (0-10V)
  • iIn = analog output (0/4-20mA)

MIN/MAX columns:
Here you can set the range of the Input or Output value set on a channel. For example: if you have a thermocouple that reads temperature between 0°C and 100°C, set the MIN to 0 and the MAX to 100.
Note - Digital I/O will always have 0 as MIN and 1 as MAX.

DEC column:
This column round your calculated value to the set number of decimal digits. Example: if you set DEC to 1 , a returned value could be 14.7, if you set DEC to 2, the returned value could be 14,72
Note - Digital I/O will always have 0 as DEC.

TARE column:
This column will add a specified value to the final calculated number. Example: if you have a scale that give you 234 as a value but you want to tare the value, just write -234 on the TARE column
Note - Digital I/O will always have 0 as TARE.

INFO column:
Clicking on the button in this column shows you a modal with the channel info, the syntax for the PlexusLAB GET requests and the links to change the channel TYPE.

Add/edit/remove a section

PlexusLAB organize your work into sections. A section contains user created variables and timers, which you will be used to control your automated system.
Note - All sections are connected together, you have the ability to create different ones just to organize your work once the variables and timers start to grow to an ingestible number

Add a new section:
In the project's editing page click on "Sections" on the left menu to open the drop down list. Click on "+ Add Sections" and insert the name you want to assign to this new section.
Tips - Give your sections a short and clean name, avoiding spaces and special characters

Edit a section:
Click on the section's name located on the left menu. When the section page loads, you can change the name and description from the panel on the top. After you change the informations, click on "Update Section", to set the changes.

Remove a section:
Click on the section's name located on the left menu. When the section page loads, you can remove the section by clicking on "Remove Section" (red button) on the top panel.

Section's variables

PlexusLAB let you create variables that later you can use into your functions and in your panels.

Add a new variable:
Simply click on the blue link "+ Add Variable" in the Variables' box. A new variable will be added automatically with the default name "new_var"

Variable's property:
Tips -To change or set one of this value, click on it, type the change and press the ENTER key.

  • NAME = this will be the name representing your variable, choose a short and effective name, and avoid special characters
  • VAL = this number represent the real time value of the variable (read-only)
  • SET = here you can set the variable's value
  • MIN = this value represent the minimum value your variable will ever assume
  • MAX = this value represent the maximum value your variable will ever assume
  • DEC = this value represent the number of decimal points you want your variable to have
  • DELETE = click here to remove the variable from the list
  • INFO = use this button to get the var id and other useful informations for the GET REQUEST functionality

Section's timers

PlexusLAB let you create timers that later you can use into your functions. Timers are essential to create an automation process

Add a new timer:
Simply click on the blue link "+ Add Timer" in the Timers' box. A new timer will be added automatically with the default name "new_timer"

Timer's property:
Tips -To change or set one of this value, click on it, type the change and press the ENTER key.

  • NAME = this will be the name representing your timer, choose a short and effective name, and avoid special characters
  • DESCRIPTION = this will help you describe better the function of your timer, so you won't forget
  • DURATION (ms) = set here the duration, in milliseconds, of your timer
  • VALUE (m:s:ms) = When a timer is running, here you will see the value, in minutes, seconds and milliseconds
  • START = Click here to start or pause a timer. If the icon is green you can start a timer, if the icon if gray means that your timer needs to be reset before you can start it again. If the the timer is running you can pause it.
  • RESET = pressing this button will reactivate your timer and set all values to 0
  • DELETE = click here to remove the timer from the list
  • INFO = use this button to get the timer id and other useful informations for the GET REQUEST functionality

How do functions work

The functions are the core part of your new project, here you'll make automation happen

PlexusLAB uses PHP as programming language, so you can create complex algorithms without limitations!

The first to know about these functions, is that they will run continuously from top to bottom, every 40ms, and all functions are executed step by step (syncroniusly); so consider that:

  • If you create a simple variable inside a function like $x=0;, after the code is executed the variable is lost, and will be recreated after 40ms. If you want to reuse a variable without losing the value, you need to use a section's variable.
  • NEVER USE sleep(); or usleep();, this will block all functions since php is a synchronous language. If you want to "do something" after a certain period of time, use a section's timer
  • Functions are executed in the order you have them on the left menu. You can reorder the functions by dragging a function in the list. Note that the last function WINS, so if you assign a value in 2 different functions, the last assignation will be actually executed

At the end of this section, you'll find 2 examples that will make you understand better the concept of this programming method
Tips - If you want to write comments inside your application just type a double-slash at the beginning of a line (the text will turn green). Example: //this is a comment!

Add/edit/remove/reorder functions

PlexusLAB organize your process into functions that run on a loop every 40ms.

Add a new function:
In the project's editing page click on "Functions" on the left menu to open the drop down list. Click on "+ Add Function" and insert the name you want to assign to this new function.
Tips - Give your function a short and clean name, avoiding spaces and special characters

Edit a function:
Click on the function's name located on the left menu. When the function page loads, you can change the name and description from the panel on the bottom of the page. After you change the informations, click on "Update Function", to set the changes.

Remove a function:
Click on the function name located on the left menu. When the function page loads, you can remove the function by clicking on "Remove Function" (red button) on the panel located at the bottom of the page.

Reorder functions:
To reorder functions click on "Functions" on the left panel. Here you can drag a function up and down with your mouse or track-pad. Release the function name in the desired position to save the new position.
Note - Functions are executed in order. The rule is: the last one wins. So if you assign the same variables in 2 different functions, the last assignment will be the effective one

Add variables

At the top of every function you need to import your variables in order to use them in a function.
Here you can import devices variables (plexus' channels), sections variables and timers, alarms and storages.
Note - Every variable you add is represented as an array of multiple values, see the section "VARIABLES DATA" for more details

Add a single variable:
1) bring the cursor inside the function body
2) open the right panel (top-right button of the page)
3)Select the variable you want to import (it will become orange), than click on the "add" gray button
4)The variable is now written into your function and can be used
EXAMPLE: $ch0 = $devicesArray['1']['0'];

Add variables as array:
1) bring the cursor inside the function body
2) open the right panel (top-right button of the page)
3)Select multiple variables you want to import (they will become orange), than click on the "Add Array" gray button
4)The array is now written into your function and can be used (will contain all the variables you selected)
EXAMPLE: $arrayOfVars = [$devicesArray['1']['0'],$devicesArray['1']['1']];

Variables data

Most variables (not including alarms and storages) are represented as an array. This means you can access multiple values from the variable you import into a function.

DEVICES VARIABLES:
The device variables have these properties (read-only):

  • 'val' (this is the real time value)
  • 'min'
  • 'max'
  • 'dec'
Tips - Example: get the real time value $ch0['val'];

SECTION VARIABLES:
The section's variables have these properties (read-only):

  • 'val' (this is the real time value)
  • 'min'
  • 'max'
  • 'dec'
Tips - Example: get the real time value $my_var['val'];

SECTION TIMERS:
The section's timers have these properties (read-only):

  • 'duration' (0 if the timer is stopped, if running this will be milliseconds since JAN 1st 1970)
  • 'start' (0 if the timer is stopped, if running this will be milliseconds since JAN 1st 1970)
  • 'hold'
Tips - Example: get duration $my_timer['duration'];

ALARMS:
Alarms have no properties, they can only be used with APIs.

STORAGES:
Storages have no properties, they can only be used with APIs.

API: variable read/write and ramp

On the top right menu of the function's body you can find the API list. This list contains pre-made pieces of code that helps you write functions faster.

READ :
The variable's real time value: read_var($var_name);

WRITE :
Write the value of a variable (not valid for device's input variable) write_var($var_name,$theValueToWrite);
Example : set the variable $air to 50 write_var($air,50);

RAMP :
Write the value of a variable as a ramp (not valid for device's input variable) set_ramp($var_name,$start_value, $end_value, $milliseconds);
Example : set the variable $air from 20 to 50 in 10 seconds (10000 milliseconds)set_ramp($air,20,50,10000);
Example : set the variable $speed from 100 to 30 in 5 seconds (5000 milliseconds)set_ramp($speed,100,30,5000);
Tips - This function return 0 if the ramp is starting, 1 if it's running and 2 when it's done.

API: Timers

On the top right menu of the function's body you can find the API list. This list contains pre-made pieces of code that helps you write functions faster.

Start Timer :
This code will start your timer: start_timer($timer);

Pause Timer :
Set $pause as 1 to pause the timer, 0 to unlock it: pause_timer($timer, $pause);

Reset Timer :
This code will reset all values of timer to 0, so it can be started again: reset_timer($timer);

Is Running :
This code will return 1 if the timer is currently running, 0 if it stopped or it's done running: isTheTimerRunning($timer);

Get Time :
This code will return the time in millisecond that has been since the timer started : getTime($timer);

Set Duration :
This code will change the property 'duration' of the timer: set_timer_duration($timer, $new_duration);

API: storages

Enable storage:
1) bring the cursor inside the function body
2) open the right panel (top-right button of the page)
3)Select the storage you want to import (it will become orange), than click on the "Add Enable" gray button
4)The API is now added to the function's body: enable_storage($project_id, $storage_id, $toggle);
Note - $project_id and $storage_id are filled automatically once you add the API, set $toggle to 0 to stop the storage and to 1 to start it.

Get storage status:
1) bring the cursor inside the function body
2) open the right panel (top-right button of the page)
3)Select the storage you want to import (it will become orange), than click on the "Get Status" gray button
4)The API is now added to the function's body: get_storage_status($project_id, $storage_id);
Note - $project_id and $storage_id are filled automatically once you add the API.

API: alarms

On the top right menu of the function's body you can find the API list. This list contains pre-made pieces of code that helps you write functions faster.

Set alarm :
This code activate an alarm, here you can assign a message to the activated alarm: set_alarm($alarm, 'message associated with the alarm');

Reset alarm:
If the timer is active, this code will reset it to the inactive state: reset_alarm($alarm);

Get Duration :
This code will return how many milliseconds the timer was active: get_alarm_duration($alarm);

Is Active :
This code will return 1 if the alarm is currently active, 0 if not: is_alarm_active($alarm);

API: sounds

PlexusLAB let's you play .wav sounds directly from a function. To play a sound: 1)click on the "bell" button on the top menu of the app, 2) select a sounds or upload a wav file from your computer, 3) click on play_sound() or reset_sound(). By doing so, PlexusLAB will add a piece of code to your function (if selected)

Play Sound :
This code will play your sound: play_sound("sound id");

Reset Sound :
After a sound is done playing, you need to reset it with this line of code: reset_sound("sound id");

API: devices

Set call rate:
1) On the top right menu of the function's body you can find the API list. This list contains pre-made pieces of code that helps you write functions faster.
2) Click on the "Set Call Rate" API in the list
3)The API is now added to the function's body: set_device_rate($project_id, $device_id, $rate);
Note - $project_id is filled automatically once you add the API, the $device_id is the device you want to edit and $rate is the value of the new calling rate in milliseconds (minimum is 50ms).

Get device status:
1) bring the cursor inside the function body
2) open the right panel (top-right button of the page)
3)Select the device you want to get the status, than click on the "Get Status" gray button
4)The API is now added to the function's body: get_device_status($project_id, $device_id);
Note - $project_id and $device_id are filled automatically once you add the API.

How do storages work

You can use storages to record your data like devices and sections values and alarms status and they are very useful to keep track of whatever happened in your process.
Note The storages need MySQL to run so make sure to install it in your system to use this PlexusLAB feature!
Tips To help you manage your MySQL database you could install PhpMYAdmin, see how in the "Installation->Terminal Commands" section of this page.

Add/edit/remove storages

PlexusLAB organizes your process into storages that run on a loop every 200ms.

Add a new storage:
In the project's editing page click on "Storages" on the left menu to open the drop down list. Click on "+ Add Storage" and insert the name you want to assign to this new storage.
Tips - Give your storage a short and clean name, avoiding spaces and special characters

Edit a storage:
Click on the storage's name located on the left menu. When the storage page loads, you can change the name and description from the panel on the right of the page. After you change the informations, click on "Update Storage", to set the changes.

  1. Name
  2. Description
  3. Storage Rate
    This time shows how often your data are stored into the database, the minimum value is 200 milliseconds.
    Note You must enter this time in milliseconds! - Example: If you want a storage every 1 second you have to set the Storage Rate to 1000
  4. Host Port
    This is the database communication port of your host, as defautl MySQL has 3306.
    Note The Host IP Address is not editable and it's set to your localhost so your data will be stored on your computer.
  5. Host DB name
    Enter the name of the MySQL database where you wanna store the data.
    Tips - Give your storage a short and clean name, avoiding spaces and special characters
    Note If the database doesn't exist yet, a new one will be created with the name you have just set.
  6. Storage Query
    Select the query you wanna use to store your data between INSERT INTO and UPDATE.
    Note INSERT INTO adds a new line to the table every time data are stored.
    Note UPDATE overwrite the last line of the table every time data are stored.
  7. Host Database Username
    This is the database username you have set when you installed MySQL.
  8. Host Database Password
    This is the database password you have set when you installed MySQL.

Remove a storage:
Click on the storage name located on the left menu. When the storage page loads, you can remove the function by clicking on "Delete Storage" (red button) on the panel located at the right of the page.
Note When you delete a storage the table in MySQL won't be deleted and it will be kept in your computer, if you wanna delete it access to MySQL manage features.

Add/Delete variables

After you create a new storage you need to add the values you want to keep track in your process.

Add variables:
1) Click on the "+ Add Vars" blue button in the left box in the storage page and a modal will appear.
2) In the modal you have a list of different selects which contains all your variables divided by devices, sections and alarms.
3) Check all the values you wanna store in the database and then click on the "Add" green button and the page will be reloaded with the new settings.
Note The values already added will be disabled in the modals, to remove a value from the storage read below.

Delete a variable:
1) Click on the red button on the delete column of the list in the storages page' left box
2) Click on the "Delete" red button on the modal.
3) The page will be reloaded and the variables won't be in the list anymore.
Note When you delete a variable this doesn't affect the structure of your MySQL table, the column which represent that variable will be fill with 0 values at every record.

Truncate table:
1) Click on the "Truncate Table" red button on the left box
2) Click on the "Truncate" red button on the modal.
3) All the recorded data will be deleted and the table will be empty.

Charts

At the bottom of the page there is an interactive chart which shows you the last 50000 recorded data in your database scaled by hours on the X axis.
Tips - For an horizontal zoom click on the chart and drag the mouse to the left/right as you want.
Tips - For a vertical zoom click on the chart and drag the mouse up/down as you want.

On the top right of the box you can find some useful features for your chart:

  1. Date
    Click here to refresh the chart and use the date format as scale on your X axis.
  2. Usec
    Click here to refresh the chart and use the microseconds format as scale on your X axis.
    Tips - This gives you more sensibility than the date format but a less understandable time reading.

  3. Click here to open a new tab with the chart loaded with all the recorded without the limit of 50000.

  4. Click here to open a new tab with the all recorded data table.
    Here you can also export the table in the following formats: CSV, PDF, TXT, SQL, XML, JSON.

Add/remove/edit an Alarm

PlexusLAB let you create alarms that later you can use into your functions and in your panels.

Add a new alarm:
1) Simply click on the button "+" in the "Set Alarms" box and a modal will appear.
2) Fill the name field in the modal and click the green "Save" button.
3) The page will be reloaded and a new alarm will be added to the list.

Alarm's property:

  • NAME = this will be the name representing your alarm, choose a short and effective name, and avoid special characters
    Tips -To change or set this value, click on it, type the change and press the ENTER key.
  • ACTIVE = this button shows the alarm state (green if it's active and grey as default) and you can click on it to activate/reset the alarm.
  • DELETE = click here and a modal will appear, then click the "Delete" red button and the page will be reloaded and the alarm won't be in the list anymore.

Alarms list

This is a list of all the detected alarms you added in your functions.

Alarms List's property:

  • NAME = this is the name of the recorded alarm.
  • MESSAGE = this is the message you set when your alarm happened in the functions flow.
  • DURATION = this is the time (seconds) the alarm has been active.
  • WHEN = this is the time when the alarm was detected.
  • DELETE = click here and a modal will appear, then click the "Delete" red button and the page will be reloaded and the alarm record won't be in the list anymore.

Delete the alarms list:
1) Simply click on the red button "x" in the "Last Alarms" box and a modal will appear.
2) Click the red "Delete" button.
3) The page will be reloaded and the alarm record won't be in the list anymore.

Export the alarms list:
1) Click on the button "Export" in the "Last Alarms" box and a submenu will appear.
2) Choose the format you want (CSV, PDF, TXT, SQL, XML, JSON).
3) The list will be downloaded in the desired format.

How do black boxes work

PlexusLAB always store all your data every second in a file with a maximum size of 100MB and once this limit is reached it cuts the oldest 20MB and restart to record again.

Note Every 24 hours and every time before the file cutting PlexusLab stores all the recorded data into a zip file.

Choose what to watch

In the "Black Box Search" box you have a list of different selects which contains all your variables divided by devices and sections.
All you need is just to check all the values you wanna see in the chart and then click on one of the following buttons:

  1. Last Hour shows you the last hour of recording.
  2. Last Day shows you the last day of recording.
  3. Last Week shows you the week hour of recording.
Tips Click on the button to download all the black box zip files.
Note Click on the button and confirm the delete action in the modal that will appear to delete all the black box zip files.
IMPORTANT: remember to download all your zip files before delete them!
Note Click on "Reset Info" to uncheck all the variables in the list.

Add/edit/remove black boxes

PlexusLAB let you create black boxes that you can use as a bookmarks of your visualization settings.

Add a new black box:
1) Simply click on the button "+" in the "Black Box List" box and a modal will appear.
2) Fill the name field in the modal and click the green "Save" button.
3) The page will be reloaded and a new record will be added to the list.

Record's property:

  • NAME = this will be the name representing your black box, choose a short and effective name, and avoid special characters
    Tips -To change or set this value, click on it, type the change and press the ENTER key.
  • LOAD = this button shows the black box state (green if it's active and grey as default) and you can click on it to activate the black box.
    Tips -When you click on LOAD, the chart will be refreshed with the last day of records for the saved settings.
  • DELETE = click here and a modal will appear, then click the "Delete" red button and the page will be reloaded and the black box won't be in the list anymore.
    Note -When you delete a black box all its the time intervals will be deleted too.

Add/edit/remove time interval

After you create a new black box you can save a specific time interval that you selected in your chart.
Note -You must activate a black box before create a time interval!

Add a new time interval:
1) Simply click on the button "+" in the "Timing List" box and a modal will appear.
2) Fill the name, the time from and the time to fields in the modal and click the green "Save" button.
3) The page will be reloaded and a new time interval will be added to the list.
Tips -The time from and the time to fields are already filled with the time interval selected in the chart.

Time Interval's property:

  • NAME = this will be the name representing your time interval, choose a short and effective name, and avoid special characters
    Tips -To change or set this value, click on it, type the change and press the ENTER key.
  • LOAD = this button shows the time interval state (green if it's active and grey as default) and you can click on it to activate the time interval.
    Tips -When you click on LOAD, the chart will be refreshed with the saved time range.
  • DELETE = click here and a modal will appear, then click the "Delete" red button and the page will be reloaded and the black box won't be in the list anymore.

Charts

At the bottom of the page there is an interactive chart which shows the selected recorded data scaled by hours on the X axis.
Tips - For an horizontal zoom click on the chart and drag the mouse to the left/right as you want.
Tips - For a vertical zoom click on the chart and drag the mouse up/down as you want.

On the top right of the box you can find some useful features for your chart:

  1. Number of data to get
    Fill this field with a number between 100 and 2000 to choose how many data get from the recorded file in the selected time range.
    Tips - More data you get more resolution you have.
  2. Reset Chart
    Click here to refresh the chart to the first loaded time range.
  3. High Resolution
    Click here to refresh the chart with the current zoom level.

What is a PlexusLAB HMI panel?

PlexusLab painlessly generates a beautiful and web-based interface by users simply managing customizable drag-and-drop functions. You can sit back and comfortably control your machinery with this user-friendly interface, as well as collect and analyze data with click-of-a-button, real-time charts. Keep in mind that the interface is touch-optimized, so a tablet or other touch-screen device can become your best friend during your experiments. Finally, we are thrilled to share that the interface and, consequently - your machinery, can be accessed and controlled via a secure connections from virtually anywhere in the world

User Interface

The PlexusLAB HMI user interface is based on a main page with three fixed elements which allows you to go trough all the functionalities of your panel builder.

Note When you click to a link that let you leave the HMI builder a modal will appear to remind you to save your changes before leaving.

  1. Left column menu (which is hidden as default)
  2. Top header bar
  3. Right panel (which is hidden as default)

Left column menu

This menu allows you to create a new page and shows you all the pages you created and you can open, delete and edit the name of all of them.

Top header bar

The header bar has six buttons which make easier your interaction with PlexusLAB.

  • Left side
  • page Hide/show the left column menu.
  • Add Box Open the modal to add an empty box to the page.
  • Add Text Open the modal to add an a text or an html code to the page.
  • Upload Image Open the modal to upload an image to PlexusLAB HMI editor.
  • Manage Image Open the modal to add an uploaded image to the page.

  • Right side
  • Go back to the projects list page.
  • Save the changes you made to the page.
  • Open your HMI panels in a new tab.
  • Open the alarm list table page and shows the active alarms numbers as notification.
  • Hide/show the right panel.

Right panel

In this panel you can access and edit to your devices, sections, alarms and storages info and values which are shown in real time.

Tips Click the icon on the top header bar to show/hide this panel.

  • Devices
    This shows you a list of the devices you have created.
    Once you have selected a device, a list with all its values appears in the right panel and you can watch and edit those in real time whenever you want.
  • Sections
    This shows you a list of the sections you have created.
    Once you have selected a section, a list with all its variables and timers appears in the right panel and you can watch and edit those in real time whenever you want.
  • Alarms
    This shows you a list of the alarms you have created with their status.
  • Storages
    This shows you a list of the storages you have created their its status.

Pages

Every time you create a project a blanked page is created and it's used as default in your HMI panel builder.

Add a new page:
Open the left column menu by clicking the page button. Click on "+ Add Page" and insert the name you want to assign to this new page.
Note - You can only give an only letters lower case name to your page, all the other characters are blocked.

Edit the page name:
Open the left column menu by clicking the page button. Click on "Pages" to open the pages list and then click the green "Rename Page" button. Change the name in the name field of the modal that will appear and click "Edit Page Name". The page will be reloaded with the new name.
Note - You can only give an only letters lower case name to your page, all the other characters are blocked.

Delete a page:
Open the left column menu by clicking the page button. Click on "Pages" to open the pages list and then click the red "Delete Page" button. Click the "Delete Page" button in the modal that will appear. The HMI bulder will be reloaded and the deleted page won't be in the list anymore.

Boxes

The boxes are the spaces where you will put your elements and helps you to keep the page clean and ordered.

Add a new box:
Click the Add Box button and a modal will appear with the following fields:

  1. Name this is the box name placed in the box header, if it's blank the box won't have an header.
  2. Size this is the box size and it is proportioned on the page width.
  3. Head Color this is the box header color.
  4. Set as sortable if yes the box's elements will be draggable and sortable following a grid, otherwise they'll be just draggable without order.
  5. Set as table if yes the box will contain a sortable table and you can only add elements as table rows.
  6. Background Image this is the box background image.

Click the "Add" button and the box will be added to the page.

Edit a box position:
Drag and drop your box in the page.

Resize a box height:
Click the resize icon at the bottom left of the box and drag to the desired height.

Delete a box:
Move with your mouse on a box and click on the "x" button that will appear on its top right.
Note - When you delete a box you also delete all its content!

Add data elements

You can relate an HMI element to your devices values, section variables, alarms and storages to manage them in your control panel.

Add a device/section variable or an alarm:
1) Select the box where you wanna place the element by click on it (it'll turn orange once selected).
2) Open the right panel (top-right button of the page)
3) Select the variable you want to import (it will become orange), than click on the "Add Element" gray button
4) A modal will appear with the following options:

  1. Name this is the label that will be placed aside your element, if it's blanked no labels will be inserted.
  2. Element type here you can choose which type of element you wanna relate to the selected variable or alarm.
    Note - When you select an element, different fields will appear in the modal to manage its properties.
    • Input this is a simple text input.
    • Html this is a simple html text.
    • Bar this is a bar scaled to the related value and you can choose its color and the max/min limits.
    • Gauge this is a gauge (half circle) scaled to the related value and you can choose its color and the max/min limits.
    • Switch this is a switch button useful to show an on/off state.
    • Knob this is a knob (circle) scaled to the related value and you can choose its color and the max/min limits.
    • Button you can use this to change an on/off state and you can choose its on/off colors and on/off texts.
    • Image you can use this to show an on/off state and you can choose its on/off images.
  3. Write Enable if your variable can be edited you can turn on this switch to make the changes made in the panel effective.

Click the "Add" button and the element will be added to the box.
Tips - You can add multiple elements with the same properties just selecting those on the right panel.
Note - If the box is a table the elements can only be inputs or texts.

Add a storage:
Note - The only element you can relate to a storage is an interactive chart.
Note - You can select only one storage at time in the right panel.
1) Select the box where you wanna place the element by click on it (it'll turn orange once selected).
2) Open the right panel (top-right button of the page)
3) Select the storage you want to import (it will become orange), than click on the "Add Element" gray button
4) A modal will appear with the following options:

  1. Query Data Fetch Limit choose how many data you wanna load in the chart between 1 to 50000.
  2. Time Format choose the time format for the x axis of the chart between date and microseconds.

Click the "Add" button and the element will be added to the box.
Tips - To refresh the chart click on the button on the box top right.
Tips - The chart can only load 50000 data as max, to see the full data chart click on the button on the box top right and a new tab will be opened with the new chart.

Edit an element position:
Drag and drop your element in the box.
Note - An element cannot change box!

Edit an element:
1) Move with your mouse on an element and click on the icon that will appear on its top right and a modal will appear.
2) The modal is already filled with the current element properties and you can change those as you want.
3) Once you finished your changes click the "Add" green button and the element will be edited.

Delete an element:
Move with your mouse on an element and click on the "x" button that will appear on its top right.

Text/Html elements

The text/html elements are the texts or html codes blocks that will be placed in your page.

Add a new text/html element:
Click the Add Text button and a modal will appear with the following fields:

  1. Type choose between text and html to change the behavior of the text field below.
  2. Text here you can write your text or html code to add to the page.
    Note - If you choose the html type and there's a syntax error in the text field the element won't be added to the page until it's fixed!
  3. Size this is the element size and it is proportioned on the page width.
  4. Align this is the text align option (left, right or center).
    Note - This is active only if you choose a text type.

Click the "Add" button and the element will be added to the page.

Edit a text/html element position:
Drag and drop your element in the page.

Edit an text/html element:
1) Move with your mouse on an element and click on the icon that will appear on its top right and a modal will appear.
2) The modal is already filled with the current element properties and you can change those as you want.
3) Once you finished your changes click the "Edit" green button and the element will be edited.

Resize a text/html element height:
Click the resize icon at the bottom left of the element and drag to the desired height.

Delete a text/html element :
Move with your mouse on an element and click on the "x" button that will appear on its top right.

Images

In your HMI panel you can upload and add images to give a better look to your user interface.

Upload a new image:
Click the Upload Image button, choose a file in the modal that will appear and click "Upload".
When the upload is done a success/error message will be displayed and your image will be ready to be used in the HDM builder.
Note - The image size upload limit is 1Mbyte!

Add a new image:
Click the Manage Image button and a modal will appear with the following fields:

  1. Select an image choose an image between the one you uploaded.
  2. Width choose the image width (pixels or %), default is "auto".
    Note - If you leave this blanked the original image width will be used.
  3. Height choose the image height (pixels or %), default is "auto".
    Note - If you leave this blanked the original image height will be used.
  4. Unit choose the image measure unit between pixels (px) and percentage (%).
    Note - If you use pixels (px) the image will measures will be fixed, if you choose percentage (%) the image will automatically fit in the box size based on its width and height values.
  5. Size this is the image element size and it is proportioned on the page width.
    Note - This is not the size of the image itself!
  6. Align this is the image align option (left, right or center).

Click the "Insert" button and the image will be added to the page.

Delete an uploaded image:
Click the Manage Image button and a choose the image in the Select an image field.
Click the "Delete" button and the image will be deleted from the HMI images list.

Edit an image position:
Drag and drop your image in the page.

Resize an image element height:
Click the resize icon at the bottom left of the image element and drag to the desired height.
Note - This won't change the image height!

Delete an image element :
Move with your mouse on an image element and click on the "x" button that will appear on its top right.

What is it?

If you wanna create your own application to control your automation system but you still use PlexusLAB features you can simply tell him what to do with a POST or GET HTTP request. PlexusLAB has a file which allows you to check the server status, the system info, the alarms, to read and write all the device and sections variables.
You just need to call this file http://yourhostIPaddress/plx/callplexuslab.php and follow the instructions below!
Note - To use this feature you have to enable the "Project get request" in the Project Info page. After turned on the switch click on the "Update Project" button.

POST requests

If you use a POST request you need to pass the data in JSON format (more info here).
The fields of the request are the following:

  1. project_id it's the id of the project you wanna communicate with and it's mandatory.
  2. project_password if you added a password to your project this is mandatory, otherwise you can leave it empty.
  3. read this is the JSON object which contains the data you wanna read and it's divided in "devices", "sections", "alarms" and "server".
  4. write this is the JSON object which contains the data you wanna write to PlexusLAB and it's divided in "devices", "sections_vars" and "sections_timers".

Read:
  1. devices is a JSON object with a list of the devices id you wanna read, if it's empty no devices info will be read.
  2. sections is a JSON object with a list of the devices id you wanna read, if it's empty no sections info will be read.
  3. alarms is a string which needs the value "all" to give you back the alarms info, if it's empty or with a different value no alarms info will be read.
  4. server is a string which needs the value "info" to give you back the server info, if it's empty or with a different value no server info will be read.

Write:
  1. devices is a JSON object with a list of objects which contain a list of the channels with the new values written as a string joined by "_".
    { "devices" : { "deviceId" : { "channelNumber_valuetowrite", "channelNumber_valuetowrite", "channelNumber_valuetowrite"} , "deviceId" : { "channelNumber_valuetowrite", "channelNumber_valuetowrite", "channelNumber_valuetowrite"} } }
  2. sections_vars is a JSON object with a list of objects which contain a list of the variables with the new values written as a string joined by "_".
    { "sections_vars" : { "sectionId" : { "varId_valuetowrite", "varId_valuetowrite", "varId_valuetowrite"} , "sectionId" : { "varId_valuetowrite", "varId_valuetowrite", "varId_valuetowrite"} } }
  3. sections_timers is a JSON object with a list of objects which contain a list of the timers with the new values written as a string joined by "_".
    { "sections_timers" : { "sectionId" : { "timerId_valuetowrite", "timerId_valuetowrite", "timerId_valuetowrite"} , "sectionId" : { "timerId_valuetowrite", "timerId_valuetowrite", "timerId_valuetowrite"} } }
    Note - The values you can assign to the string ""valuetowrite" for the timers are the following:
    • start to start the timer execution.
    • pause to pause the timer.
    • reset to reset the timer.
    • duration to set the duration of the timer in milliseconds use this syntax timerId_duration_milliseconds

Example 1 if you want to read devices 0, 4 and 14 info, sections 1553937299c2a7 and 1553937299c3g6, the alarms and the server info of the project with 155259b56e9e8d as id and "secret" as password, the object will look like this:

{ "project_id": "155259b56e9e8d", "project_password": "secret", "read": { "devices": {"0", "4", "14"}, "sections": {"1553937299c2a7", "1553937299c3g6"}, "alarms": "all", "server": "info" } }

Example 2 In the project with 155259b56e9e8d as id and "secret" as password, you want to write those values:

  • Device 0, channel0 to 16 and channel23 to 120
  • Device 6, channel10 to 1 and channel2 to 0
  • Section 1553937299c2a7, var 15539372cf0019 to 1000 and var 15539372cf1117 to 4
  • Section 1553937200v4f7, var 15539372sd4459 to 1467
  • Section 1553937299c2a7, start timer 12349342cf0023 and set timer 12349342cf123454 duration to 10 seconds (10000 milliseconds)
  • Section 1553937200v4f7, pause timer 12349342cf0046 and reset timer 12349342cf12765
{ "project_id": "155259b56e9e8d", "project_password": "secret", "write": { "devices": {"0":{"0_16", "23_120"}, "6":{"10_1", "2_0"}}, "sections_vars": {"1553937299c2a7":{"15539372cf0019_100", "15539372cf1117_4"}, "1553937200v4f7":{"15539372sd4459_1467"}}, "sections_timers": { "1553937299c2a7":{"12349342cf0023_start", "12349342cf123454_duration_10000"}, "1553937200v4f7":{"12349342cf0046_pause", "12349342cf12765_reset"} } } }

Example 3 Combine Example 1 and Example 2:

{ "project_id": "155259b56e9e8d", "project_password": "secret", "read": { "devices": {"0", "4", "14"}, "sections": {"1553937299c2a7", "1553937299c3g6"}, "alarms": "all", "server": "info" }, "write": { "devices": {"0":{"0_16", "23_120"}, "6":{"10_1", "2_0"}}, "sections_vars": {"1553937299c2a7":{"15539372cf0019_100", "15539372cf1117_4"}, "1553937200v4f7":{"15539372sd4459_1467"}}, "sections_timers": { "1553937299c2a7":{"12349342cf0023_start", "12349342cf123454_duration_10000"}, "1553937200v4f7":{"12349342cf0046_pause", "12349342cf12765_reset"} } } }

GET requests

If you use a GET request you need to pass the data in a string format and the fields of the request are the following:

  1. project_id it's the id of the project you wanna communicate with and it's mandatory.
  2. project_password if you added a password to your project this is mandatory, otherwise you can leave it empty.
  3. read this is the string which contains the data you wanna read and it's divided in "d" (devices), "s" (sections), "alarms" and "server".
  4. write this is the string which contains the data you wanna write to PlexusLAB and it's divided in "d" (devices), "v" (sections_vars) and "t" (sections_timers).

Read:
  1. d is a the first character that compose the string to read a device info, the syntax is d_deviceId.
  2. s is a the first character that compose the string to read a section info, the syntax is s_sectionId.
  3. alarms is a string which needs the value "all" to give you back the alarms info, if it's empty or with a different value no alarms info will be read.
  4. server is a string which needs the value "info" to give you back the server info, if it's empty or with a different value no server info will be read.

Write:
  1. devices is a the first character that compose the string to write a value to a device channel, the syntax is d_deviceId_channelNumber_valueToWrite.
  2. v is a the first character that compose the string to write a value to a section variable, the syntax is v_sectionId_varId_valueToWrite.
  3. t is a the first character that compose the string to write a value to a section timer, the syntax is t_sectionId_timerId_valueToWrite.
    Note - The values you can assign to the string ""valuetowrite" for the timers are the following:
    • start to start the timer execution.
    • pause to pause the timer.
    • reset to reset the timer.
    • duration to set the duration of the timer in milliseconds use this syntax t_sectionId_timerId_duration_milliseconds
Note - In the read string and in the write string all the elements are separated by *.

Example 1 if you want to read devices 0, 4 and 14 info, sections 1553937299c2a7 and 1553937299c3g6, the alarms and the server info of the project with 155259b56e9e8d as id and "secret" as password, the GET request will look like this (the host address is the localhost):

http://localhost/callplexuslab.php?project_id=155259b56e9e8d&project_password=secret&read=d_0*d_4*d_14*s_1553937299c2a7*s_1553937299c3g6*alarms_all*server_info

Example 2 In the project with 155259b56e9e8d as id and "secret" as password, you want to write those values:

  • Device 0, channel0 to 16 and channel23 to 120
  • Device 6, channel10 to 1 and channel2 to 0
  • Section 1553937299c2a7, var 15539372cf0019 to 1000 and var 15539372cf1117 to 4
  • Section 1553937200v4f7, var 15539372sd4459 to 1467
  • Section 1553937299c2a7, start timer 12349342cf0023 and set timer 12349342cf123454 duration to 10 seconds (10000 milliseconds)
  • Section 1553937200v4f7, pause timer 12349342cf0046 and reset timer 12349342cf12765

http://localhost/callplexuslab.php?project_id=155259b56e9e8d&project_password=secret &write=d_0_0_16*d_0_23_120*d_6_10_1*d_6_2_0 *v_1553937299c2a7_15539372cf0019_1000*v_1553937299c2a7_15539372cf1117_4*v_1553937200v4f7_15539372sd4459_1467 *t_1553937299c2a7_12349342cf0023_start*t_1553937299c2a7_12349342cf123454_duration_10000*t_1553937200v4f7_12349342cf0046_pause *t_1553937200v4f7_12349342cf12765_reset

Example 3 Combine Example 1 and Example 2:

http://localhost/callplexuslab.php?project_id=155259b56e9e8d&project_password=secret&read=d_0*d_4*d_14*s_1553937299c2a7*s_1553937299c3g6*alarms_all*server_info &write=d_0_0_16*d_0_23_120*d_6_10_1*d_6_2_0 *v_1553937299c2a7_15539372cf0019_1000*v_1553937299c2a7_15539372cf1117_4*v_1553937200v4f7_15539372sd4459_1467 *t_1553937299c2a7_12349342cf0023_start*t_1553937299c2a7_12349342cf123454_duration_10000*t_1553937200v4f7_12349342cf0046_pause *t_1553937200v4f7_12349342cf12765_reset

Response structure

The response is a JSON object divided in the following fields and is the same for both the POST and GET requests.

  1. status this string shows the status of the server and normally is set to "alive".
  2. message if there's no error during the requests the value of this string is "ok", otherwise it shows you a message with the error explained.
  3. devices this is an object which contains all the info about the devices listed in the request.
  4. sections this is an object which contains all the info about the sections variables listed in the request.
  5. timers this is an object which contains all the info about the sections timers listed in the request.
  6. alarms this is an object which contains all the info about the requested alarms.
  7. server this is an object which contains all the info about the server.

Example 1 In the project with 155259b56e9e8d as id and no value as password, you want to read and write those values:

    Read
  • Device 1
  • Section 1553937299c2a7
  • Alarms all
  • Server info
  • Write
  • Device 1, channel0 to 0 and channel1 to 0
  • Section 1553937299c2a7, var 15539372cf0019 to 0
  • Section 1553937299c2a7, set timer 1553937454b633 duration to 5 seconds (5000 milliseconds)
The GET url will be like this:

http://localhost/callplexuslab.php?project_id=155259b56e9e8d&read=d_1*s_1553937299c2a7*alarms_all*server_info &write=d_1_0_0*d_1_1_0*v_1553937299c2a7_15539372cf0019_0*t_1553937299c2a7_1553937454b633_duration_5000


The response is the following:

{
"status":"alive",
"message":"ok",
"devices":{ "1":{"id":"1","devicelooptime":1801.72,"ip":"192.168.2.202","active":0,"0":{"var_id":0,"name":"ch0","val":0,"type":3,"min":0,"max":1,"tare":0,"dec":0},"1":{"var_id":1,"name":"ch1","val":0,"type":1,"min":0,"max":1,"tare":0,"dec":0},"2":{"var_id":2,"name":"ch2","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"3":{"var_id":3,"name":"ch3","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"4":{"var_id":4,"name":"ch4","val":0,"type":3,"min":0,"max":1,"tare":0,"dec":0},"5":{"var_id":5,"name":"ch5","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"6":{"var_id":6,"name":"ch6","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"7":{"var_id":7,"name":"ch7","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"8":{"var_id":8,"name":"ch8","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"9":{"var_id":9,"name":"ch9","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"10":{"var_id":10,"name":"ch10","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"11":{"var_id":11,"name":"ch11","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"12":{"var_id":12,"name":"ch12","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"13":{"var_id":13,"name":"ch13","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"14":{"var_id":14,"name":"ch14","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"15":{"var_id":15,"name":"ch15","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"16":{"var_id":16,"name":"ch16","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"17":{"var_id":17,"name":"ch17","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"18":{"var_id":18,"name":"ch18","val":0,"type":1,"min":0,"max":1,"tare":0,"dec":0},"19":{"var_id":19,"name":"ch19","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"20":{"var_id":20,"name":"ch20","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"21":{"var_id":21,"name":"ch21","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"22":{"var_id":22,"name":"ch22","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"23":{"var_id":23,"name":"ch23","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"24":{"var_id":24,"name":"ch24","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"25":{"var_id":25,"name":"ch25","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"26":{"var_id":26,"name":"ch26","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"27":{"var_id":27,"name":"ch27","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"28":{"var_id":28,"name":"ch28","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"29":{"var_id":29,"name":"ch29","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"30":{"var_id":30,"name":"ch30","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0},"31":{"var_id":31,"name":"ch31","val":0,"type":0,"min":0,"max":1,"tare":0,"dec":0}}},
"sections":{"1553937299c2a7":{"id":"1553937299c2a7","name":"sectionTino","active":0,"vars":{"1553937299c2a7":{"15539372cf0019":{"var_id":"15539372cf0019","val":0,"min":0,"max":"20","dec":0,"name":"varTino"},"15565db59b2596":{"var_id":"15565db59b2596","val":0,"min":0,"max":1,"dec":0,"name":"new_var"}}},
"timers":{"1553937299c2a7":{"1553937454b633":{"timer_id":"1553937454b633","duration":5000,"current":0}}}}},
"alarms":{"15539370c82b10":{"id":"15539370c82b10","name":"Alarm1","active":0,"start":1433370523.7091,"end":1433370526.6084}},
"server":{"is_project_active":"0","devicesloop":"1","functionsloop":"1","timersloop":"1","storagesloop":"1","functionslooptime":1.22,"storageslooptime":3.7}
}

Example 2 In the project with 155259b56e9e8d as id and "secret" as password, you want to read and write those values:

    Read
  • Device 1
  • Section 1553937299c2a7
  • Alarms all
  • Server info
  • Write
  • Device 1, channel0 to 0 and channel1 to 0
  • Section 1553937299c2a7, var 15539372cf0019 to 0
  • Section 1553937299c2a7, set timer 1553937454b633 duration to 5 seconds (5000 milliseconds)
WHAT HAPPEN IF I SEND THE WRONG PASSWORD?
The GET url will be like this:

http://localhost/callplexuslab.php?project_id=155259b56e9e8d&project_password=wrong_pass&read=d_1*s_1553937299c2a7*alarms_all*server_info &write=d_1_0_0*d_1_1_0*v_1553937299c2a7_15539372cf0019_0*t_1553937299c2a7_1553937454b633_duration_5000


The response is the following:

{
"status":"alive",
"message":"password_or_getoff"
}


Note - If you didn't active the GET project request switch in the project info page you'll get the same result.

Example 3 In the project with 155259b56e9e8d as id and "secret" as password, you want to read and write those values:

    Read
  • Device 1
  • Section 1553937299c2a7
  • Alarms all
  • Server info
  • Write
  • Device 1, channel0 to 0 and channel1 to 0
  • Section 1553937299c2a7, var 15539372cf0019 to 0
  • Section 1553937299c2a7, set timer 1553937454b633 duration to 5 seconds (5000 milliseconds)
WHAT HAPPEN IF I SEND THE WRONG PROJECT ID?
The GET url will be like this:

http://localhost/callplexuslab.php?project_id=10000&project_password=secret&read=d_1*s_1553937299c2a7*alarms_all*server_info &write=d_1_0_0*d_1_1_0*v_1553937299c2a7_15539372cf0019_0*t_1553937299c2a7_1553937454b633_duration_5000


The response is the following:

{
"status":"alive",
"message":"project"
}

Example 4 I just wanna know if the server is alive:
The GET url will be like this:

http://localhost/callplexuslab.php


The response is the following:

{
"status":"alive",
"message":"ok"
}