Integration of SmartPlayer with ivideon
Situation Description
This instruction is intended to provide information on the proper setup of the ivideon service, as well as information for its integration with the SmartPlayer platform.
Usage Scenario for Integration with ivideon
To understand how the integration between ivideon and SmartPlayer will occur, the following general interaction scenario will be used:
- Register/log in to the ivideon personal account
- Add and configure the camera in the ivideon personal account
- Obtain an API key for integration with SmartPlayer
- Log in to the SmartPlayer personal account
- Create a broadcast in SmartPlayer with two pages
- Page #1 plays background content (idle mode)
- Page #2 plays content that will be triggered by the motion detection camera
- After the content from page #2 is played, it returns (switches back) to page #1
ivideon Setup
User Registration/Authorization in ivideon Service
The first step for the user is to register in the ivideon service. You can register by following this link. To start the registration process, the user needs to follow the link and click on the "Register" button.
After clicking, a new window will open with a list of information that needs to be provided by the user. This list includes the following information:
- Name
- Email address (E-Mail)
- Phone number
- Password
- Checkbox (checkmark) to accept the terms of service and privacy policy
After logging into ivideon, the user will be presented with the main page of their personal account.
Adding a device to the ivideon personal account
On the main page, the user will be prompted to add a device via a special button in the center of the screen - "Connect Device."
By clicking the "Connect Device" button, the user will open a list where they need to select the desired device. In this case, it's an IP camera.
Next, the user is advised to choose the connection method for the IP camera. ivideon technical support specialists strongly recommend using a wired "Ethernet" connection.
At this stage, the user will be asked to provide the device's serial number. If the user does not have this information, it is possible to register the device using the MAC address. By clicking on the special line "Use MAC address," the user will be redirected to a new registration window.
In the opened registration window, the user needs to enter the MAC address of the device, which can be found on the device itself (IP camera) or on the box in which the device was packaged upon purchase.
After entering the MAC address and clicking the "Continue" button, the user's camera will be registered and displayed in their personal account.
Using the camera's web interface for configuration
Manufacturers of various cameras provide an internal interface for configuring the camera. To access it, a certain sequence of steps must be followed.
First, the user needs to go to the "Settings" section in the ivideon personal account and proceed to the "Security" category.
In this category, the user can change the camera password and set the desired one if they do not know it.
Next, proceed to the camera information section. To do this, the user needs to click on the three vertical dots in the window of the registered camera and open the list of options for interacting with the camera. In this list, the user selects the line "Camera Information."
In the opened window, information about the camera will be provided. At the bottom of the window, there will be the required block "IP Address" with the line "eth 0". The needed IP address will be listed in this line.
This IP address is copied and pasted into the browser's address bar to open the camera's settings interface. The opened page will require login credentials for the camera.
After this, in the camera's web interface, go to the "Configuration" section and enable the setting or checkbox for "Enable motion detection."
Some cameras also offer the option to record and store logs. For this purpose, the camera is equipped with the ability to insert a USB-flash drive. Logs can also be viewed in the camera's web interface (this feature is not available on all devices).
Event Display in the ivideon Personal Account
After configuring the camera's web interface in the ivideon personal account, events will begin to appear for the user.
In the "Events" section of the personal account, the user needs to filter events using the provided filters.
From the available filters, the user needs to use the event type filter:
- Line crossing
- Entry into a zone
After applying the filter, only the filtered events described above will be displayed in the personal account.
It's important to understand that even if the event is not sent to the ivideon personal account, the system still detects and counts it. This means that the five-minute timer will refresh and start again.
Integration with SmartPlayer
For integration with SmartPlayer, the user needs to perform three actions in the SmartPlayer personal account:
- Add the camera to the desired device
- Create an API key in the ivideon personal account and use it to connect to SmartPlayer
- Prepare the server application and broadcast(s) with correctly configured events
Each of these points will be detailed below.
Adding a Camera to the Device Used in a SmartPlayer Broadcast
To receive information about changes in the camera's status, the user needs to connect it to the device that will be used in the broadcast. This can be done in the SmartPlayer personal account.
Initially, the user needs to navigate to the "Devices" section in the personal account.
Next, the user needs to find the required device, click on it, and go to the "Settings" section in the right-hand toolbar.
In the settings section, they need to find the "Camera" category and open it.
Once the "Camera" category is opened, the user must click the "Add Camera" button and fill in the following fields:
- Camera Name - enter the camera's name
- Camera Identifier - this can be obtained from the ivideon personal account, in the "Camera Information" section (Camera ID)
Receiving Data in SmartPlayer via the ivideon API Key
To connect to SmartPlayer and receive events from ivideon, the user needs to obtain an API key from the ivideon personal account. After obtaining the API key, it must be added to the settings in the SmartPlayer personal account.
Creating an API Key in the ivideon Personal Account
To obtain the API key, the user needs to navigate to the "Settings" section in the ivideon personal account and go to the "Access and Security" category.
On the opened page, the user needs to find the "For Developers" block and click the "Open" button next to the "API Access Keys" line.
On the new page, the user must create a new API key. To do this, they need to click the "Create Key" button in the upper right corner. It is also possible to delete all keys on this page by clicking the "Delete All Keys" button.
In the opened window, the user must enter a name for the key and click the "Continue" button. The "Continue" button will be inactive until the user enters the key name.
The next window will display the new key, which the user must copy by clicking the special icon next to the line where the key is shown. The user must also check the checkbox "I have copied the key." Otherwise, the user will not be able to complete the creation of the API key, as the "Done" button will remain inactive.
Clicking the "Done" button will return the user to the page with the list of keys, where the new key will be displayed for use in connecting to SmartPlayer.
Applying the API Key for Integration with SmartPlayer
The API key obtained in the ivideon personal account must be added to the SmartPlayer personal account. To do this, the user needs to log in to the SmartPlayer personal account and navigate to the "Settings" section.
In the "Settings" section, the user needs to go to the "Integrations" block.
In this block, the user needs to configure the following parameters:
- Activate the checkbox
- Enter the API key value (must be copied from the ivideon personal account)
- Select the type of events that will be used in the broadcast. In this case, only the values for "line crossing" and "zone entry" will be used.
Creating a Broadcast for Playback in SmartPlayer with the Necessary Settings
To receive data from the ivideon service and make SmartPlayer correctly respond to these events, the user must create a broadcast with specially configured parameters.
- Windows - ver. 2.41.7
- Linux - ver. 2.41.7
- Android - ver. 1.74.2 and above.
Server Application Setup:
- Create a personal account on the required server application. When creating the personal account, the role must be set to "admin" with video analytics.
- Manually create a broadcast in the personal account and configure the transitions for the required content and event values (actions for events).
Programming Part:
- When implementing the programming part, "socket.io v.2" must be used. This solution is available at the following link.
Personal Account:
- Interaction with the personal account occurs via the http(s) and webSocket protocols. Information about "socket.io v.2" is provided above.
Protocol Information:
- restApi - used mostly for authorization and file handling.
- Socket.io - used by most methods to interact with the personal account.
Authorization:
- Information on obtaining the necessary tokens can be found at this link.
- Information on properly configuring "join" can be found at this link.
Receiving the Broadcast:
- A specific event can be used to get the list of broadcasts. Information on obtaining this event is available at this link.
After receiving the data, the user needs to select the desired event. From this object, they must take the ID, which will be used in the event described below.
Sending a Response Event:
- The next step is to send another event, available at this link, with the necessary parameters.
The event with the correct parameters should switch the pages in the broadcast grid.
Создание трансляции в личном кабинете
После настройки серверной части пользователь сможет воспользоваться подготовкой событий для воспроизведения их в трансляции.
Чтобы начать работу с событиями в трансляции пользователю необходимо сначала авторизоваться в личном кабинете.
Следующим шагом пользователю найти в личном кабинете раздел "Трансляции" и выбрать категорию "Создать".
После нажатия по категории "Создать" пользователю откроется новое окно, в котором будет показан весь интерфейс для создания трансляции.
Далее пользователю необходимо в зависимости от своих задач создать нужно количестве страниц. Данное действие делается в левой нижней части экрана по специальной иконке в виде большого символа "+".
Создав нужное количество страниц, пользователь должен на каждой странице выбрать зону для контента. Это делается по специальной иконке в виде прямоугольника вверху экрана.
При создании зоны открывается тулбар с настройками зоны, в котором можно настраивать параметры зоны.
После выделения зоны для контента пользователь может индивидуально настроить зону с контентом, в соответствии со своими нуждами.
Проделав действия, описанные выше пользователю необходимо выбрать страницу с контентом и открыть настройки страницы по иконке в левой нижней части личного кабинета. Настройки страницы откроются также в тулбаре справа, как и настройки для зоны контента.
В настройках страницы пользователю необходимо найти строку с параметром "Событие" и нажать на иконку в виде "+".
Данное действие откроет новое окно со списком событий для данной страницы.
Настройка события
Проделав действия, описанные ранее пользователю откроется окно с выбором событий. В данном окне будет три доступных варианта:
- Распознавание лица
- RFID метка
- Серверное приложение (нужный вариант)
Пользователь выбирает событие "Серверное приложение" и ему добавится новая строка для заполнения "Ключ". В ней необходимо выбрать вариант "По полезной нагрузке".
Выбрав данный ключ пользователю станет доступна еще одна строка - "Значение". В этой строке пользователь и должен указать одно из специальных значений:
Название | Значение |
---|---|
Пересечение линии | ivs.vca.line_detection.event/started |
Вход в зону | ivs.vca.field_detection.event.enter/started |
После завершения заполнения всех полей в окне пользователю необходимо нажать на кнопку "Сохранить" в центре экрана.
Связанная информация
Для дальнейшего завершения настройки трансляции рекомендуется ознакомиться со следующими Wiki-страницами
Итог
После завершения настройки личного кабинет ivideon, интеграции с серверными приложением SmartPlayer и настройки трансляции с использованием событийной модели в личном кабинете SmartPlayer должно начать функционировать. Данное решение будет проигрывать и изменять контент при любом приближении человека в рамках выбранной и настроенной на камере зоны.
Видеоинструкция
Настройка интеграции ivideon и SmartPlayer
Дополнительная информация
Если данная статья не помогает использовать функционал по назначению или после ее прочтения остаются вопросы можно озвучить данные вопросы в разделе "Обсуждения" вверху страницы.
Также дополнительную информацию можно узнать на странице Как взаимодействовать пользователю с разделом "Обсуждения"