Instructions for sending Push notifications from iRidium server to iOS, Android devices with i3 pro
read the handbook on JS methods for Push notifications
download the example
You can send push-notifications to i3 pro panels from outside systems, in this case use a push-key instead of notification group ID:
iRidium server can notify the user about any event in the automation system, which it perceives. One of the ways of notification is sending Push notifications to smartphones and tablets where the i3 pro application is installed. i3 pro can be closed, you only need Internet connection without which Push notifications will not be received by the addressee.
iRidium server sends the command "to notify control panels" to the iRidium mobile website. The iRidium mobile website redirects the command to Apple or Google services (depending on the control panel OS). And the services send notifications to smartphones and tablets of users.
To understand which smartphones and tablets should receive notifications, they have to be in the list of active control panels on the iRidium mobile website.
iRIdium Server отправляет уведомления не каждому устройству отдельно, а условным Группам устройств. Настроить Группы можно в объекте iRidium Cloud, вкладка "Пользователи и проекты". Подробно - читайте далее.
! It is not possible to send Push notifications without iRidium server
! If a control panel is not connected to the Internet, Push notifications cannot be received
! Sometimes Push notifications cannot be delivered to the addressee. Please, ensure backing up of important messages, for example, with the help of SMS. It is because Apple and Google services do not have control of Push notifications delivery
Any event of iRidium server can be used to send Push notifications:
1 Create a new project for iRidium server in iRidium Studio (File > New > New Server Project...)
2 Add the variables at changing which notifications should be sent in the server project:
3 Open the editor window [JS] in the top toolbar of iRidium studio. Create a new script file: (+) > New Script and set up sending of notifications at various events in it. Let Let's consider three options:
see the video-instruction
Sending of notifications in this case is implemented with the help of scripts:
//********** send push when User press a button in i3 pro **********
function push_from_i3(type, name, value)
IR.SendPush(value, "info", 1); // send notification (text of notification, hiden data, group of panels)
Now any string stored in "Push from Panel" will be converted into a Push notification and will be sent by the server to control panels.
//********** send push when Feedback of driver changes **********
var driver = IR.GetDevice("KNX"); // driver name
IR.AddListener(IR.EVENT_TAG_CHANGE, driver, function(name,value)
if (name == "Address 1" && value == 1) // if the KNX feedback "Address 1" changed to 1
IR.SendPush("Back door opened!", "show backdoor camera", 1); // text of notification, hiden data, group of panels
In order for the script to work, the feedback channel "Address 1" of the "KNX" driver has to receive value 1. No additional actions are required from the user is not - sending of notifications is automatic.
//********** send push when it is some Date & Time **********
IR.SetGlobalListener(IR.EVENT_GLOBAL_TAG_CHANGE, function (name, value)
if (IR.GetVariable("System.Date.MM_DD") == "03/14" && IR.GetVariable("System.Time.Hour") == 10 && IR.GetVariable("System.Time.Minutes") == 0)
IR.SendPush("Happy Birthday Mike!", "notification", 1); // text of notification, hiden data, group of panels
IR.SubscribeTagChange("System.Time.Minutes"); // subscribe on minutes to check condition each minute
The script is activated every minute and checks for the condition - the indicated date and time. Reaction to change of parameters in the operating system is provided by the global listener and subscription. A notification will be sent when the conditions are satisfied - month/day and time selected as the moment to send the notification occur
4 Create a project for the control panel: right-click on the server project > Create Project Panel.Find the iRidium server driver in the created project and indicate the IP-address (Host) of the device on which you plan to run iRidium server, otherwise the control panel will not be able to connect to it.
i3 pro does not need any special settings to get notifications when the app is closed or minimized but we will set up additional possibilities for handling notifications (it is optional):
If the i3 pro application is already launched and opened on the control panel, the window with Push notifications will not pop up and the notification sound will not be heard by default. But it may also be required to handle server events in the opened application. Therefore, for handling of Push notifications in the opened application, add the script in the project for the control panel (*.irpz):
//********** Play sound and display text when notification received by the opened app **********
IR.AddListener(IR.EVENT_RECIEVE_PUSH_NOTIFY, 0, function(text, data, group)
IR.PlaySound('Alerting.wav',0,50); // play sound
IR.GetPage("Page 1").GetItem("text").Text = text; // display text of notification
IR.GetPage("Page 1").GetItem("data").Text = data; // display hiden data that can be used in JS
In this example, when receiving a Push notification, the application plays the sound and writes the data received from the notification on the graphic items in the project.
It applies only if there is the script implemented in the 3.1 example in the server project "To send a notification from the control panel or server web-interface "
To initiate the sending of notifications by user actions implemented in the 1st example of the script for the server, you need to control server virtual variables from the control panel. The setup does not directly relate to work of Push notifications, here we just write the server virtual variable in a string. The server processes the string and converts it into a Push notification for all control panels.
Create a graphic item - Button or Editbox. It will send the text of your notification to the server. Find the "Push from Panel" command in the "iRidium server" driver and drag it on the graphic item. In the dialog window for command assigning select Action: Send Token and in the value field: the .Text property of the item. For Editbox it is also necessary to assign the Show Keyboard command to start entering data from the keyboard of the mobile device after clicking on Editbox.
5 Save the projects for the server and the control panel and upload them in iRidium cloud. It is required for both projects to belong to the same automation object in the cloud.
6 Create a Trial or commercial license for the object
7 Invite (activation step 4) the end-user in the object or use your alternative e-mail.
8 Set up Push Groups - grouping of users. In the example we set up sending of notifications to group 1, so we will create group 1 in the cloud:
1. Invite the end user to the project. Click "Push Groups" in "Users & Panels" to set up the groups that will contain the invited user
2. Create group 1 (for our example), select any name for it
3. The group is now linked to the end user. He will get notifications sent to the group
9 Sign in in i3 pro on your iOS, Android device as the end user (activation step 5.1), download the project with handling of notifications. Remember, that the integrator's account in i3 pro cannot be used to test Push notifications!
10 Sign in (activation step 5.2) on the server as an integrator, download the project with handling of notifications.
11 Everything is ready. Your mobile device will get the notification from the server when any of the preset events is activated. Send notifications from control panels, the server web-interface or monitor changes of equipment status, time and date events with the help of notifications.