Push-notification of the call. Sending from mobotix (SIP)
As you know, the i3 pro application cannot get SIP calls when it is minimized. It does not allow you to use your device with i3 pro as a fully-featured doorphone panel.
But there is a solution for Mobotix T24/T25 SIP doorphone used with iRidium server and i3 pro. It enables sending of notifications from Mobotix to mobile devices with the i3 pro application. The notification reproduces the call and shows the window at clicking on which the window with the doorphone camera opens and an auto-call is made to the doorphone from which the initial call was made.
Downloads:
- Project for i3 pro (tablet, smart phone)
- Project for iRidium server (or the script for the server)
How It Works:
1. The Mobotix SIP server sends an НТТР command to iRidium server (the server can be installed on a PC). The command contains the message: "The call to SIP clients is made from doorphone <name>"
2. iRidium server processes the received message with the help of the special script and generates a Push notification for control panels which is sent to the iRidium cloud service.
3. iRidium cloud finds the panels with i3 pro (Push Group 1 in the cloud) which have to get the Push notification and sends the notification to all recipients.
4. The control panel plays the notification sound and shows the pop-up window with the message "call from <name>"
5. After clicking on the window the i3 pro application opens the page with the video doorphone (tablet, smart phone) and connects to the doorphone from which the call was made (you can talk and see video from the camera).
Limitations:
1. You can NOT send notifications from Mobotix directly to control panels. You need iRidium server running with the special script.
2. Notifications can be sent only to iOS or Android smart phones/tablets
Steps of Setting up
1.Configuring Mobotix to send special HTTP commands to iRidium Server
- Configuring the iRidium Server project to interact with Mobotix
- Configuring the i3 pro project to receive and process push notifications
- Working with the cloud
- Download configured projects in iRidium Cloud, configure Push Group
- Downloading projects from the cloud to i3 pro and iRidium Server
- Checking the operation of notifications
Detailed analysis of the stages:
1. Setting up Mobotix to send special HTTP commands to iRidium Server
Open the Mobotix T24 / T25 web interface in a web
browser. To do this, go to the IP address of Mobotix and enter the
administrator's login and password.
In the web interface click the "Setup
Menu" button:
Open Event Control | Action Group Overview submenu. Here you can configure the actions of the doorphone when the "Call" button is pressed.
Click the "Add new Group" button to create a new action group. Name it "iRidium Notification". Click the "Edit" button to configure it:
"IRidium Notification" group settings:
- Action Group - the name and status of the group, they are already set
- Event Selection | Signal: CameraBellButton | - to select an event that triggers an action. We select "Signal: CameraBellButton"
- Action Details | 0 | Simultaneously | - to trigger all actions simultaneously
- Press the "Add new action" button to add the action. We add the action - "SimpleNotify" when pressing doorphone "Call" button.
- Action 1 | IP Notify: SimpleNotify | 1 | - Send a simple notification within 1 second. Do not specify 0 - it means canceling the action
- Press the "Set" button to save the changes
- Press the "IP Notify" button to configure the
command sent by the SimpleNotify notification we selected:
Find the SimpleNotify profile in the list and configure:
- Destination Address | 192.168.0.66:8080 | - where 192.168.0.66 is the address of your iRidium Server (if the server
is launched on a PC, this is the PC address). Enter your address!
- Data Protocol | HTTP/1.0 Request - command type, simple HTTP request
- /doorphone=Main_entrance - data that the command will send to the iRidium server. This message
contains the name of the doorphone on which you pressed the button (/ doorphone
= <name>). In this case, the name of the doorphone: "Main
entrance". Instead of spaces, use underscores!
- Click the "Set" button to save the changed settings
Everything is done, now, when you press the doorphone key, it will not only be the call of clients set up in the "Outgoing Call" profile of the admin menu, but a special HTTP command will also be sent to the iRidium Server IP address.
Now you can configure the processing of this
command on the server side:
2. Setting up the iRidium Server project to interact with Mobotix
If you already have iRidium Server on the object (and the project for it), just add this script to the project.
If you do not use the server and you do not have any projects, download a ready-made project. You don't have to change it
Save the project and go to the next step.
3. Setting up the i3 pro project to receive and process push notifications
3.1. Ready-made project for i3 pro
To work with Mobotix doorphones, there is a ready-made visualization project (for tablet and for smartphone), which already includes a script for processing received Push notifications.
If you want to use the ready-made project, you need
to configure it:
3.1.1. Setting up the SIP driver
Open the Mobotix SIP project in iRidium Studio on PC, select the SIP driver and configure:
- Host: IP-address of the Mobotix SIP server
- SIP ID: number of the SIP client, to whom i3 pro will be presented (We created the clients in the SIP Server Settings, select free number)
- Caller ID: client name (Same as SIP ID or any other)
- Password: client password, configured on the SIP server
Leave the other settings by default, they are specially configured to connect to the Mobotix SIP server .
If you are using another SIP server (not Mobotix), the settings Port, First RTP Port, Last RTP Port may be different. Save the project.
Launch the project in iRidium Studio > Emulator, open the page with the doorphone.
If the connection to the SIP server is successful you will see the "On Hook ..." status in the upper right corner of the doorphone window:
After this, configure the script in the project, It is needed to receive video from the camera and make calls to the doorphone:
3.1.2. Setting up the script of the Mobotix SIP project
This script will provide a call to the doorphone when you press the "Call" button in the project, process Push notifications, and display the video stream from the Mobotix camera.
Click the "JS" button on the iRidium Studio toolbar to go to the script editor. Select the script file "Mobotix_DoorPhone_ADD":
For example, configure a connection with one doorphone. For this you need to create one set of settings in the script (comments are removed):
IR.AddListener(IR.EVENT_START, 0, function() { var mobotix1 = new add_mobotix_door_phone("Main entrance", "mobotix 1", ["192.168.0.110", "admin", "meinsm", "102"] ); });
In this example:
- "Main entrance" - a random name for your doorphone. It will be displayed in the visualization interface when you open the doorphone page and while an incoming call
- "mobotix 1" - pop-up page name in the visualization interface that displays video from the doorphone camera, "Call" button, "Open the door / Switch the light" buttons. This pop-up contains a special set of graphic elements. To create a new pop you need to copy the available ones. Do not remove items from the pop-up (if it is necessary, you can move them out of the pop-up range)
- "192.168.0.110" - Mobotix doorphone IP-address (the doorphone from which you need to receive a video stream)
- "admin" - admin login, which you use to enter the Mobotix doorphone web-interface
- "meinsm" - admin password, which you use to enter the Mobotix doorphone web-interface
- "102" - doorphone SIP address as a SIP client (you configured it in the Admin menu of the doorphone, in the SIP Client Settings submenu)
If there are two or more doorphones you need to create two or more sets of settings by the principle:
IR.AddListener(IR.EVENT_START, 0, function() { var mobotix1 = new add_mobotix_door_phone(...); var mobotix2 = new add_mobotix_door_phone(...); ... var mobotixN = new add_mobotix_door_phone(...); });
Example of the "Mobotix_DoorPhone_ADD" file for two doorphones (comments removed):
IR.AddListener(IR.EVENT_START, 0, function() { var mobotix1 = new add_mobotix_door_phone("Main entrance", "mobotix 1", ["192.168.0.110", "admin", "meinsm", "102"] ); var mobotix2 = new add_mobotix_door_phone("Back entrance", "mobotix 2", ["192.168.0.111", "admin", "meinsm", "104"] ); });
Save the script and project.
Launch the project in iRidium Studio > Emulator, open the page with the configured doorphone. If the script is correctly configured, you will see the video from the doorphone camera, and when you press the "Call" button you will call the Mobotix doorphone:
If the light control and door opening are connected to the dry contacts of the doorphone, the "Open door" and "Switch light" buttons will also work.
3.2. Insert notification processing into your project
You can process the received notification without using the ready-made interface for Mobotix. This can be useful, for example, if you have already configured the interface and do not want to modify it.
Add a script for processing Push notifications to your project. It is needed to open the doorphone window when you click on the pop-up notification text, and also to automatically call the doorphone and talk to the guest:
IR.AddListener(IR.EVENT_RECIEVE_PUSH_NOTIFY, 0, function (text, data, group) { if(data == "Main entrance") // если пришел звонок с панели "Main entrance" { IR.ShowPopup("Main entrance popup"); // покажи окно с камерой этой вызывной панели function IsRecallNeeded () // если я ее не разговариваю с этой панелью { if (IR.GetDevice("SIP").GetFeedback("STATUS") != "Incoming Call...") { IR.GetDevice("SIP").SetFeedback("NUMBER", "102") // позвони на эту панель по номеру "102" IR.GetDevice("SIP").Set("CALL", 0); } } IR.SetTimeout(2000, IsRecallNeeded); } });
You can configure your own operation logic when you receive a call from the calling panel while the application is closed. After configuration, save the project.
Without this script, the notification will still appear, but when you click on it, nothing will happen (the application will open, but will not show the pop-up with the doorphone).
4. Working with the cloud
4.1 Uploading configured projects in iRidium Cloud, setting up Push Group
Use this instruction to create a new automation object in iRidium Cloud. Add to the project the projects configured in the 2 and 3 articles, activate a commercial or trial license. Invite customers who will use the visualization and receive notifications from the call panel.
Please note that you can not use the integrator account to test notifications, they work only in user accounts.
The main configuration of this step is to set up the Push Group ID: 1. Notification groups with the ID 1. This group will receive notifications from iRidium Server. Invite all users to receive notifications.
When users are invited, you can launch projects on the user control panels and on the iRidium server.
4.2. Downloading projects with a license from the cloud in i3 pro and iRidium Server
- Log in to the i3 pro application as the end user (invited to the object with notifications for Mobotix). Upload the visualization project to the control panel.
- Log in to iRidium Server as an integrator, download the prepared project of notification translation for the server.
5. Checking the operation of notifications
Close or minimize i3 pro application in the control panel.
Customer support service by UserEcho