Материал из for iRidium developers
Перейти к: навигация, поиск
Эта страница является переводом страницы AMX. Перевод выполнен на 100%.

Other languages:
English • ‎русский

the documentation os updated 07.4.2017


iRidium for AMX is a set of tools for visualization of AMX control from iOS, Android, Windows, Mac. iRidium enables upload of interfaces created in TPDesign4 (AMX) on any device. You can also add control of third-party equipment to the AMX visualization or control several AMX controllers together.

iRidium is perceived by controllers as an AMX TouchPanels. It required a unique Device ID. There is no need to prepare TP4 files in any way to upload them on iRidium panels.


Supported: AMX controllers of NI and NX series, AMX TPDesign4 projects in the *.TP4 format


Supported commands:

@PPM-, @PPN-, @PPF-, @PPX, @PPA, @PPK-, @PPG-, PPON-, PPOF-, PPOG-

@APG-, @CPG-, @DPG-, @SSL-, @SST-, @SWK-, @AKP-, @AKR, @PKP-, AKEYB-, AKEYP-, AKEYR,

BEEP, DBEEP, ABEEP, ADBEEP, @SOU-, ^MUT-, ^VOL-, @BRT-, BRIT-, ^RAF-, ^RFR-, ^RFRP-, ^RMF-, ^RSR-,

^SHO-, @SHO, ^ENA-, @ENA, ^BSF-, ^BSM-, ^BFB-, ^BML-, ^BPP-,

^BSP-, ^BMC-, ^GIV-, ^GLH-, ^GLL-, ^GSC, ^GSN-, ^BOR-,

^CPF-, ^APF-, ^DPF-,

@PWD-, ^PWD-,

^TXT-, ^BAT-, ^UNI-, ^BAU-, ^ANI-, ^BMF-, ^BCB-, ^BCF-, ^BCT-,

^BWW-, ^BRD-, ^BSO-, ^BDO-, ^JSB-, ^JSI-, ^JST-,

^ICO-, ^BMP-, ^BOP-, ^BBR-, ^TEC-, ^TEF-, ^FON-, ^BMI-,

OLD: BTON, BTOF, !B, !T, TEXT, @TXT, !F, FONT, !I, ICON, !C


Supported interface items:

  • Page, Popup
  • General, multi-state general, bargraph, multi-state bargraph, joystick, text input

Licensing provides a possibility to obtain one license for all iRidium control panels which work with one controller; it is also possible to obtain a license for each mobile device.


Instructions for AMX TPDesign4


The basic variant of using iRidium supposes upload of projects created in TPDesign4 on mobile devices WITHOUT using iRidium development tools.

video-lesson:


1 Open your *.TP4 project in iRidium Transfer

If the project is opened in TPDesign4, close it -otherwise, there will be an error of acccessing the file.

Transfer input-AMX.png


2 Set up controller properties in iRidium Transfer

The *.TP4 file does not contain the IP-address of your AMX controller and other properties. That is why they have to be set up:

Transfer TP4 Settings.png

Host - the IP-address of the АМХ controller

Port - the TCP control port (it is always 1319)

Login - the login when using the protected session

Password - the password when using the protected session

Device ID - the unique identifier of the panel (Panel ID), it should not be duplicated on different panels


3 If there are several control panels, set up different Device IDs for them.

It is required to set up unique Device IDs as you cannot connect several control panels with one ID to AMX - it will lead to errors in controller work.

The settings which can be unique are written in the properties of control panels (the Panels tab):

Transfer TP4 Advansed-Settings.png


4 Synchronize iRidium Transfer and control panels

Steps you have to perform to upload your visulaization interface on a control panel:

TransferringSteps.png


More:

Apple iOS: the i3 pro application

Android OS: the i3 pro application

Windows 7/8: thei3 pro application

Mac OS: the i3 pro application



Additional capabilities

Patch for TPDesign4

It is necessary to create interfaces with resolutions for iPad, iPhone, Android, etc. The resolution should not be more than 2000 px in width or height – it is the limitation of TPDesign4 (there are no such limitations in iRidium).

AMX Patch.png



Change of connection settings

You need the possibility to change connection properties when you disconnect from the Wi-Fi network of the automation object and start using 3G or another Wi-Fi network. To maintain control of the object you need to switch from the local to public IP-address of the Internet router.

The switch is not automatic. You have to select the connection mode. For remote access you have to make ports for controlling the automation system public. In order to do that you have to set up the Port Forwarding service on your Internet router. VPN can provide protected connection.


Built-in interface for configuring AMX

You can integrate a special interface in your *.TP4/TP5 project. It will help with the initial and current setting up of parameters for connection to the controller. The appearance of the interface can be changed in iRidium studio (change the color, translate, add images).

Amxandsetupprojectui1.png
Amxandsetupprojectui2.png

the interface for setting up connection parameters for tablets and PC (+ темная версия)

the interface for setting up connection parameters for smart phones (+ темная версия)

How to add the interface for setting up connection to your *.TP4/TP5:

  1. Download and set up iRidium development environment on your PC. Then start iRidium studio
  2. Open your *.TP4/TP5 project in iRidium studio
  3. Open the project Setup AMX Connection.irpz in iRidium studio
  4. Drag the Setup AMX Connection project on your project - they will merge automatically:
    Amxandsetupprojectmerge.png
  5. [optional] Click the [JS] button in the toolbox of iRidium studio and specify standard settings of the AMX driver (in the script, beginning with string 16). This step can be skipped.
  6. Save the АМХ project. If will be save as an *.irpz file. The file can be uploaded on the iRidium mobile web site and used on control panels


The interface will be automatically opened at the first project launch. Then is can be activated at any time with the right-to-left swipe on the main page of your project (for iOS and Android, gestures do not work on Windows).

You can activate the interface from the AMX controller with the page opening command "Setup AMX Connection".


Command for setting of connection settings from TPDesign4

This command can be called from TP4 project or sent from AMX controller.

IR_PARAMETERS-<host>,<port>,<login>,<password>,<panel_id>

  • <host> - the IP-address of the АМХ controller
  • <port> - the TCP control port
  • <login> - the login when using the protected session
  • <password> - the password when using the protected session
  • <panel_id> - the unique panel identifier (Panel ID), it should not be duplicated on different panels


Example of activation on clicking the button (Command Output):

IR_PARAMETERS-192.168.0.100,1319,,,10001

IR_PARAMETERS-192.168.0.100,1319,Admin,Admin,10001


Example of activation from the controller:

send_command dvTP, "'IR_PARAMETERS-192.168.0.100,1319,Admin,Admin,10001'"

AMX IR PARAMETERS.png


URL schemes (links, launch of applications...)

URL schemes can be used to launch third-party applications, send e-mails and open web sites.


Command syntax (TPDesign4):

IR_EXECUTE-<string>

<string> - the string of the command to be executed. The string format can be different depending on the OS where the i3 pro is launched.


Examples:

  • IR_EXECUTE-http://iridiummobile.net/ - opens the iridiummobile.net web site in the browser
  • IR_EXECUTE-music:// - opens the Music application on iOS


Example in TPDesign4:

AMX IR EXECUTE-TP4.png

Example in Netlinx:

BUTTON_EVENT [10001:1:0,1]
{
    PUSH: 
    {
	send_command 10001:1:0,"'IR_EXECUTE-http://iridiummobile.net/'"
    }
}


Dynamic lists (IRLB)

iRidium dynamic list (List) is a project item on the basis of which you can form the scrolling list from one popup (template). The list items can be added or removed when working with the project.

The number of items is set up by the controller command and is limited by settings of the list basis. The content of the list template can be changed with the help of special commands: to change text, color, images.


Detailed instruction >>



Instruction for iRidium Studio

iRidium Studio is an editor of graphic interfaces whee you can edit your AMX visualization or create it from scratch.


Reasons to use iRidium Studio instead of TPDesign4:

  1. In iRidium Studio you can set up concurrent connection to several АМХ controllers at a time
  2. iRidium Studio does not limit the user in selection of the project resolution. When working in TPDesign4, you cannnot select the resolution manually
  3. The Java Script language simplifies creation of logic inside the visualization project. Java Script helps to send commands to the controller and control graphic items of the interface
  4. Besides АМХ you can add control of any iRidium supported equipment in your project including audio-video, media servers, etc. It is convenient when working with several systems as does not require changes in controller work


Edit the TP4 project

Projects from TPDesign4 can be opened in iRidium Studio and edited. After making changes the project cannot be used in TP4. But it can be used on any iRidium panel

Create a new design

On the iRidium mobile web site you can buy or get a free graphic interface for your future iRidium project. But you will not be able to use it in TPDesign4.

If you plan to edit *.TP4 in iRdium Studio, changing only the graphic part of the project, use the information about the graphic capabilities of the editor.

If you plan to create the graphic part and set up control of AMX, use the following instruction:



Connection to AMX

Create a new project or open your *.TP4 file in iRdium Studio. Open the panels DEVICE BASE (drivers with which iRidium can work) and PROJECT DEVICE PANEL (drivers which will be used in the project).

Find the AMX driver and drag it on PROJECT DEVICE PANEL. Set up the driver for connection to the controller:

AMX inEditor ADDnCONNECTION.png

Host - the IP-address of the АМХ controller

Port - the TCP control port (it is always 1319)

Login - the login when using the protected session

Password - the password when using the protected session

Device ID - the unique identifier of the panel (Panel ID), it should not be duplicated on different panels


Change of connection settings

You need the possibility to change connection properties when you disconnect from the Wi-Fi network of the automation object and start using 3G or another Wi-Fi network. To maintain control of the object you need to switch from the local to public IP-address of the Internet router.

The switch is not automatic. You have to select the connection mode. For remote acces you have to make ports for controlling the automation system public. In order to do that you have o set up the Port Forwarding service on your Internet router. VPN can provide protected connection.


1 Download the template (*.js) (right-click button: "Save object as ..."), add the template in the script editor with the buttonIcon Scripts.png (+) Add Script from file


2 Set up script properties as it is shown in the example:

function Internal_1() {
IR.GetDevice("AMX").SetParameters({Host: "192.168.0.100", Port: 1319, Login: "admin", Password: "pass", PanelID: 10001});
}
function External_1() {
IR.GetDevice("AMX").SetParameters({Host: "215.110.10.10", Port: 1319, Login: "admin", Password: "pass", PanelID: 10001});
}

Copy the driver name from Projeсt Device Panel - the list of properties has to be copied from the example.


3 Select the button which will be responsible for the switch of Internal and External properties. Open Macros Editor for the Press event (Object Properties > Programming), select the Script Call command and add it by double-clicking on it. Select the name of the function which will be activated by the button:

Script call internal-external.png

Now each pressing on the button will apply the corresponding connection properties.


Setting up variables

To unify work with different equipment, setting up of variables in iRidium differes considerably from work in TPDesign4.

In TPDesign4 you indicate the numbers of variables and comamnds in the "Programming" settings of graphic items. You can also set up level properties there.

In iRidium Studio you are required to create an address in PROJECT DEVICE PANEL (Commands and Feedback) and drag it on the graphic item. It is also indicated what events have to activate the command on the item: "Press", "Release", "Move". After that the address is seen in the "Programming" tab of item settings.


Fast creation of the list of variables

Initially variables and graphic items are separated in iRidium. Having a project of the AMX controller, you can find the list of variables which have to work in the project and create the list in iRidium fast:

AMXaddCommandsRange.png

On the output you get 50 variables Channel Port: 1 Channel Code: 1...50; Level Port: 1 Level Code: 1...50. You can create ranges of variables in stages.


Channel

Identical settings ot the "Channel" type variable in AMX TPDesign4 and iRidium Studio by the example of Item Type: General (Button) with default settings:

AMXandIridiumChannelSettings.png

In TPDesign4 you indicate Сhannel Port and Channel Code in the "Programming" settings of the graphic item.

In iRidium Studio you are required to create an address in PROJECT DEVICE PANEL (Commands and Feedback) and drag them on the graphic item. Indicate the values: "Press: 1", "Release: 0" and "Add a Feedback Channel" for the item to work similarly to the button in AMX. After that the address is seen in the "Programming" tab of item settings.

Setting up of "Data: Internal" in iRidium enables you to send to the variable one and the same value indicated in its settings (true or false).

If the item should not send commands but have to react on Channel changing, drag the Channel variable from the Feedback tab on the item and select "In Value"


Level

Identical settings ot the "Level" type variable in AMX TPDesign4 and iRidium Studio by the example of Item Type: Bargraph (Level) with default settings:

AMXandIridiumLevelettings.png

In TPDesign4 you indicate Level Port and Level Code in the "Programming" settings of the graphic item. You can also set up level properties there.

In iRidium Studio you are required to create and address in PROJECT DEVICE PANEL (Commands and Feedback) and drag them on the graphic item. Tick "Press", "Release", "Move" and "Add a Feedback Channel" for the item to work similarly to the level in AMX. After that the address is seen in the "Programming" tab of item settings.

The level properties can be set up in the "General" tab.

When creating commands in iRidium (the Commands tab), make sure to create feedback channels (Feedback) for correct work of variables. You can add feedback channels fast using the right-click menu.

If the item is not required to send commands but have to react on Level changing, drag the Level variable from the Feedback tab on the item and select "In Value"


String

Identical settings of sending "String" in AMX TPDesign4 and iRidium Studio by the example of Item Type: General (Button) with default settings:

AMXandIridiumStringettings.png

In TPDesign4 you indicate String Output Port and String Output in the "Programming" settings of the graphic item.

In iRidium Studio you are required to create and address in PROJECT DEVICE PANEL (Commands and Feedback) and drag them on the graphic item. Tick "Press" and write the string for sending for the item to work similarly to the one in AMX. After that the address is seen in the "Programming" tab of item settings.

To send several strings, drag the string on the item the required number of times and write in strings for sending.


Command

Identical settings of sending "Command" in AMX TPDesign4 and iRidium Studio by the example of Item Type: General (Button) with default settings:

AMXandIridiumCommandSettings.png

In TPDesign4 you indicate Command Port and Command Output in the "Programming" settings of the graphic item.

In iRidium Studio you are required to create and address in PROJECT DEVICE PANEL (Commands and Feedback) and drag them on the graphic item. Tick "Press" and write the string for sending for the item to work similarly to the one in AMX. After that the address is seen in the "Programming" tab of item settings.

To send several commands, drag the command on the item the required number of times and write in commands for sending.


Address

Identical settings of "Address" in AMX TPDesign4 and iRidium Studio by the example of Item Type: General (Button) with default settings:

AMXandIridiumAddressSettings.png

In TPDesign4 you indicate Address Port and Address Code in the "Programming" settings of the graphic item.

In iRidium Studio you are required to create a command in PROJECT DEVICE PANEL (Feedbacks) and drag it on the graphic item. After that the command is seen in the "Programming" tab of item settings.


Driver tokens

Driver tokens are varaibles available for reading. They return information about connection to АМХ. Drag a token on the graphic item to output its value.

GUI Descr Tokens.png

Online - the state of connection to АМХ (Online/Offline = 1/0)

Status - the status of connection to АМХ (Offline/Connect/Online/Disconnect = 0...3)

Host - the domain name of the remote system

HostPort - the port of the remote system to which iRidium connects

IP - the IP-address of the control panel

HostIP - the IP-address of the remote system to which iRidium is connected

Port - the local iRidium port through which connection with АМХ is performed

In AMX TPDesign4 there are analogs of Project Tokens or System Tokens. Using System Tokens you can get date, time and other properties of the panel where iRidium is running. Project Tokens are local variables where you can store numbers, strings or arrays between application launches.



JavaScript API

API iRidium is a set of JavaScript functions. It enables control of iRidium visualization projects. To add JavaScript in your project, study the guide.

The guide is meant for developers acquainted with JavaScript programming and object-oriented paradigm of development. The guide gives definitions of the main terms used in API and methods of solving typical tasks for controlling iRidium projects.

All available API objects are described in detail in the handbook on program interfaces.


Emulator: project testing

Emulator - an application launched in iRidium Studio to test the project work.

An Emulator works only when you authorized with login and password from iRidium Mobile web site

Emulator work modes see in iRidium Studio > Tools > Options > Emulator:

  • Client Fullscreen - start the Emulator in Full Screen mode (press Alt+F4 to Exit)
  • Client Sound On - switch sound in app
  • Show log at Emuator Start - open the log window automatically at Emulator start (you can also use F4)


Path to the license.png

Hot keys:

  • F4 - open the debug log
  • F5 - launch Emulator
  • F7 - open the app Menu to manage account and download projects from iRidium Cloud
  • F8 - open the settings (password: 2007)



Synchronization with control panels

Upload and launch of the iRdidium project on the control panel is performed with the help of the iRidium Transfer application, installed on your PC. You can also upload the project on the panel from the editor via Transfer.


Use i3 pro for iOS, Android, Windows, Mac in Test Mode by downloading projects via iRidium Transfer (the possibility is available for integrators):


iRidium Transfer settings


Commercial use of iRidium is possible only at download of visualization projects with the help of the iRidium Cloud service on the iRidium Mobile web site (see the instructions).

iRidium Cloud can be set up only by a registered integrator. After the setting up he can invite end-users to control the automation object.