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.
Creating a Broadcast in the Personal Account
After configuring the server part, the user can start preparing events for playback in the broadcast.
To begin working with events in the broadcast, the user must first log into the personal account.
The next step is to find the "Broadcasts" section in the personal account and select the "Create" category.
After clicking on the "Create" category, a new window will open, displaying the entire interface for creating a broadcast.
Next, the user must create the required number of pages, depending on their needs. This action is done in the lower-left part of the screen by clicking a special icon in the form of a large "+" symbol.
After creating the required number of pages, the user must select a content zone on each page. This is done using a special icon in the form of a rectangle at the top of the screen.
When creating a zone, a toolbar with zone settings will open, allowing the user to configure the zone parameters.
After selecting the content zone, the user can individually customize the zone based on their needs.
Once the above steps are completed, the user needs to select the page with the content and open the page settings by clicking on the icon in the lower-left part of the personal account. The page settings will also open in the right toolbar, just like the content zone settings.
In the page settings, the user needs to find the row with the "Event" parameter and click on the "+" icon.
This action will open a new window with a list of events for this page.
Event Setup
After completing the actions described earlier, a window with event selection options will open for the user. There will be three available options in this window:
- Face recognition
- RFID tag
- Server application (the required option)
The user selects the "Server application" event, and a new row for filling out the "Key" will be added. In this row, select the option "By payload."
After selecting this key, another row - "Value" - will become available. In this row, the user must specify one of the special values:
Name | Value |
---|---|
Line crossing | ivs.vca.line_detection.event/started |
Entering the zone | ivs.vca.field_detection.event.enter/started |
After completing all fields in the window, the user needs to click the "Save" button in the center of the screen.
Related Information
For further completion of broadcast setup, it is recommended to review the following Wiki pages:
Result
After completing the setup of the ivideon personal account, integration with the SmartPlayer server application, and configuring the broadcast using the event-driven model in the SmartPlayer personal account, the solution should start functioning. This setup will trigger and change the content whenever a person approaches the designated and configured zone on the camera.
Video Instruction
ivideon and SmartPlayer Integration Setup
Additional Information
If this article does not help use the functionality as intended or if there are still questions after reading, you can raise those questions in the "Discussion" section at the top of the page.
Additional information can also be found on the page How to interact with the user in the "Discussion" section.