Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This guide explains how to configure x-hoppers integration with Veesion, software that allows to detect thefts in real time. 

Created: June January 2023

Updated: July 2024

Permalink: https://x-hoppers.atlassian.net/wiki/x/AYAj

Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printabletrue

Introduction

Veesion is software that helps to detect thefts in retail stores in real time, by analysing video feeds and sending real time alerts when suspicious behaviour is detected. x-hoppers integration with Veesion is a great way to make your store more secure.

Aura html
paramsJTdCJTIyaHRtbENvZGUlMjIlM0ElMjIlM0NpZnJhbWUlMjBzcmMlM0QlNUMlMjJodHRwcyUzQSUyRiUyRmZhc3Qud2lzdGlhLmNvbSUyRmVtYmVkJTJGbWVkaWFzJTJGZndqbGhsYW50dCU1QyUyMiUyMHdpZHRoJTNEJTVDJTIyNTYwJTVDJTIyJTIwaGVpZ2h0JTNEJTVDJTIyMzE1JTVDJTIyJTIwZnJhbWVib3JkZXIlM0QlNUMlMjIwJTVDJTIyJTIwYWxsb3dmdWxsc2NyZWVuJTNEJTVDJTIyYWxsb3dmdWxsc2NyZWVuJTVDJTIyJTNFJTNDJTJGaWZyYW1lJTNFJTVDbiUyMiUyQyUyMmNzc0NvZGUlMjIlM0ElMjIlMjIlMkMlMjJqc0NvZGUlMjIlM0ElMjIlMjIlMkMlMjJ0aGVtZSUyMiUzQSUyMmRyYWN1bGElMjIlN0Q=

Requirements

Positioning of cameras

Like any AI-based system, the accuracy of algorithm decisions is dependent on the context, like positioning of the cameras. The better the positioning, the more the system is capable of recognizing the shoplifting gestures and thus, the higher the detection rate. Below you can find recommendations for the optimal positioning of the cameras: 

  • Cameras should be centered on the aisle:

...

  • Detection range: 1.5 to 12m

...

The closer a shoplifter is to the camera, the higher detection rate (e.g. within 1.5m the detection rate is 70%, in the range of 12m - about 30%).

  • Optimal height: 1.8 to 3.5m

...

The height of the cameras influence the visibility of what is going on in the store and the detection performance.

What to avoid

Below you can find practices that we recommend to avoid, as long as they can lower the detection rate considerably:

  • Too wide field of view: when the camera’s field of view is too wide, there can be too many people present simultaneously, which reduces the detection rate because gestures may be hidden by other people or located far away from the camera (>12m).

...

  • Dead angles: customers cannot be seen between two shelves when cameras focus on blocks of shelves from the side. Avoid placing cameras placed laterally on shelves arranged in blocks and make sure cameras focus on the aisles. 

...

Other

  • DVR / NVR model ideally Hikvision or Dahua

  • Configuration for secondary video playback:

    • Resolution: 4CIF or D1

    • FPS: 15 or 12

    • Bitrate: 1024Kbps

Configure Veesion integration

...

Panel
panelIconIdatlassian-note
panelIcon:note:
bgColor#E3FCEF

Note: The support starts from WMS 6.02.20221228.1.

Step 1. Configuration of the webhook

Configuration of the webhook should be performed by administrator on the client side. Webhook should include two parameters: 

  • URL of the hook (with PBX as host)

  • store_veesion_id

...

Panel
panelIconIdatlassian-note
panelIcon:note:
bgColor#E3FCEF

Note: For PBX authorization, the webhook URL should contain the parameter with PBX token /?token=<simple>.

Examples of using Veesion API

  • Get token:

Code Block
curl -v --header "Content-Type: application/json" --request POST --data '{"username":"webhook_user@wildix","password":"test"}' https://api.klaxon.veesion.io/token 
{"token":"1dcbf200cc455968a66baad40b8238bd5165a8","expires_in":"1702.352942"} 

...

Code Block
{

"store_veesion_id":"test-store-wildix",

"store_hook_id":"test-store-wildix@wildix",

"group_id":"5",

"store_id":"",

"start_date":"2022-09-27T17:48:50Z",

"end_date":"2022-09-27T17:49:57Z",

"camera_ip":"192.168.0.108",

"camera_id":"5",

"video_url":"https:\/\/veesion-alerts-global\/alert.mp4",

"alert_type":"theft"

}

Step 2. PBX configuration

To configure PBX, two parameters need to be added to /rw2/etc/env.custom.ini file:

...

Code Block
VEESION_ALERT_CHANNEL=Local/*Alerts*@veesion

Step 3. Dialplan setup

  1. Add a Dialplan rule named veesion

  2. In the veesion Dialplan, add the following numbers:

    1. *Alerts", with application Conference and the relevant Room Number:

    2. veesion, with the application Play sound, typing text and variables to be played in the conference.

Example: Attention! Theft detected in ${storeId} on ${cameraId}

Available variables:

  1. storeId

  2. startDate

  3. endDate

  4. cameraIp

  5. cameraId

  6. groupId

  7. videoUrl

  8. alertType

...

Post Veesion alerts to x-bees conversation

Starting from WMS 6.03.20230630.3, it is possible to configure Veesion alerts to be sent to x-bees conversation (you can refer to x-bees documentation for more information about x-bees). The message that is sent to x-bees includes alert type, date, time, camera IP, ID of the camera and group, as well as the relevant video attachment. 

...

Panel
panelIconIdatlassian-note
panelIcon:note:
bgColor#E3FCEF

Note: The feature works only if there is an x-hoppers license available on the PBX.

How to configure 

  1. Add a user in WMS

  2. Create x-bees conversation with the user created in step 1 and copy the conversation ID (available in the URL)

  3. Add following data to the /rw2/etc/pbx/x-hoppers.json file:

    Code Block
    [
      {
        "store_veesion_id": "test-store-wildix",
        "name": "Store1",
        "audio_conf_id": "2",
        "location": "Odesa",
        "xbees_channel_id": "f6d17593-98b6-471d-941a-cd03153f",
        "veesion_user_extension": "12345"
      }
    ]

...

  • store_veesion_id: ID of the store on the Veesion side

  • name: name of the store 

  • audio_conf_id: ID of the audio broadcast channel in x-hoppers where the communication takes place

  • location: location of the store

  • xbees_channel_id: ID of the x-bees conversation, copied in step 2, where the content will be posted.

  • user: user, on behalf of whom the content will be posted

How to modify the alert 

Starting from WMS 6.06.20240325.1, it is possible to edit x-hoppers theft alerts: remove camera ID, IP address and group ID, as well as add a message header.

...