RBT - rosteleset/SmartYard-Server GitHub Wiki

FRS

Q: What to do if you need to change the IP address of FRS?

  • Stop FRS service if it is running.
  • Update section frs->servers of the RBT server config in /opt/rbt/server/config.json file with new values.
  • Important!. In the RBT database, for all records in the cameras table, in the frs column, replace the old value (e.g. http://127.0.0.1:9051) with the new one (e.g. http://127.0.0.10:9051).

  • Start FRS service.

Q: What to do if FRS and RBT are located on different servers?

A: Suppose RBT has internal 192.168.0.1 host and can reach FRS at 192.168.0.2 host. In this case you have to replace localhost with 192.168.0.2 in the FRS configuration file located in the /opt/frs directory:

;Частичный URL для скриншотов со слэшем на конце
http_server_screenshot_url=http://192.168.0.2:9051/static/screenshots/

;Частичный URL для скриншотов событий (вызов API метода bestQuality) со слэшем на конце
http_server_events_url=http://192.168.0.2:9051/static/events/

Restart FRS.

In RBT server configuration file (config.json):

  • inside "api"->"internal" replace 127.0.0.1 with 192.168.0.1
  • inside "frs" section replace 127.0.0.1 with 192.168.0.2

In nginx configuration file add permission for FRS and RBT's internal address to access internal.php like this:

location = /internal.php {
                allow 127.0.0.1;
                allow 192.168.0.1;
                allow 192.168.0.2;
                deny all;
                root /opt/rbt/server;
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php-fpm.sock;
        }

Reload nginx config.


FALPRS

Q: How to migrate from deprecated FRS to FALPRS?

A: Please follow these steps:

  • If you haven't built the FALPRS project yet, please do so using these instructions.
  • Use these instructions for syncing data with the old FRS project.
  • Stop FALPRS service if it is running.
  • Update RBT server config in /opt/rbt/server/config.json file. In frs->servers section add api attribute with value frs and replace value of url attribute to like http://127.0.0.1:9051/frs/api/. For more information see instructions in /opt/rbt/server/config.sample.json5 file.
  • Important! In the RBT database, for all records in the cameras table, in the frs column, replace the old value (e.g. http://127.0.0.1:9051) with the new one (e.g. http://127.0.0.1:9051/frs/api/).

  • Start FALPRS service.

Q: What to do if you need to change the IP address of FALPRS?

  • Stop FALPRS service if it is running.
  • Update section frs->servers of the RBT server config in /opt/rbt/server/config.json file with new values.
  • Important! In the RBT database, for all records in the cameras table, in the frs column, replace the old value (e.g. http://127.0.0.1:9051/frs/api/) with the new one (e.g. http://127.0.0.10:9051/frs/api/).

  • Start FALPRS service.

Q: What to do if FALPRS and RBT are located on different servers?

A: Suppose RBT has internal 192.168.0.1 host and can reach FALPRS at 192.168.0.2 host. In this case you have to replace localhost with 192.168.0.2 in the FALPRS configuration YAML file located in the /opt/falprs directory:

frs-workflow:
    config:
        screenshots-url-prefix: 'http://192.168.0.2:9051/frs/screenshots/'  # Web URL prefix for faces screenshots

lprs-workflow:
    config:
        screenshots-url-prefix: 'http://192.168.0.2:9051/lprs/'  # Web URL prefix for events' screenshots

Restart FALPRS.

In RBT server configuration file (config.json):

  • inside "api"->"internal" replace 127.0.0.1 with 192.168.0.1
  • inside "frs" section replace 127.0.0.1 with 192.168.0.2

In nginx configuration file add permission for FALPRS and RBT's internal address to access internal.php like this:

location = /internal.php {
                allow 127.0.0.1;
                allow 192.168.0.1;
                allow 192.168.0.2;
                deny all;
                root /opt/rbt/server;
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php-fpm.sock;
        }

Reload nginx config.

Q: How to set up license plate recognition in RBT?

A: In RBT server configuration file (config.json) inside "frs"->"servers" section add new object and set attributes, for example:

{
    "api": "lprs"
    "title": "LPRS server",
    "url": "http://127.0.0.1:9051/lprs/api/"
}

See the corresponding question/answer in the FALPRS section if you have RBT and FALPRS on different servers.

Q: What kind of cameras does RBT support for license plate recognition?

A: You can find the list of supported cameras here.

Q: How to set up a camera to recognize license plates?

A: Please follow the instructions below:

  • Add a camera and set Model that RBT supports for license plate recognition, set Credentials, set Name. For the Recognition Server parameter, from the drop-down list, specify the one that contains "api"="lprs" in the RBT config. FRS mode has three options: Off, Recognition, Detection. Off means that recognition is disabled. Recognition means that only registered license plates can open the gate or barrier. Detection means that any recognized vehicle number can open a gate or barrier (for example, any vehicle is allowed to leave the territory).

2025-03-18_13-11

  • Click the Add button. The new camera should appear in the list.
  • Set the area in which license plates will be recognized. Find your camera in the list and click Change button. Choose Recognition tab and set an area. For example:

image

  • Click the Change button.

Q: How to add a license plate number to open a barrier or gate?

A: Go to the flat settings and select the Cars tab. Enter one license plate number on each line, using numbers and capital letters of the English alphabet without any punctuation marks or spaces. Currently, Russian registration plates of type 1 (ГОСТ Р 50577-93) and 1А (ГОСТ Р 50577-2018) are supported. Once you have finished entering, click the Change button. For example:

image

Q: How to set up motion detection area for the face recognition system?

A: Find your intercom camera in the Cameras list and click Change button. Choose Detection tab and set the rectangular area at the bottom of the image. For example:

image

Q: What settings should be specified for the camera to recognize special vehicles?

A: In Extended tab of the camera set:

{
  "flag-process-special": true
}

Q: The face recognition system does not work well on Rubetek intercoms. How can I fix this?

Important

Make sure your device is running firmware 2025.04.171131928 or later. This firmware version fixes the slow snapshots issue. In this case, no extra parameters are required for FRS and you can skip the next answer.

A: It is known that Rubetek takes a long time to give a snapshot and it has a small resolution. You need to specify the parameters for the face recognition system in the advanced settings of the intercom camera. Find your intercom camera in the Cameras list and click Change button. Choose Extended tab and set:

{
  "blur": 100,
  "capture-timeout": 5,
  "delay-between-frames": 0.001
}

More information about video stream parameters can be found in the API documentation.


Intercoms

Add intercom

Important

The intercom that you are adding to the system for the first time MUST be reset to factory settings!

Adding an intercom requires entering the device URL and a password. This password will be automatically set on the device, so the device must be reset to factory settings first. Some model-specific details are explained below the screenshot.

add_intercom

Bas-IP AA-07FB

Download the BASIP UKEY app to configure the internal RFID reader. Set the output interface to Wiegand-58 and enable Wiegand inversion. After applying the settings, disconnect from the reader, otherwise it will not transmit the key to the intercom.

Akuvox R20A

Before adding the intercom, you need to login to the device's WEB interface using "admin" / "admin". The device will ask you to enter a new password (this cannot be skipped). Enter a password that meets the requirements and remember it. Then, go to the "Settings/HTTP API" tab and select digest authorization mode. After that, you can add the device with the same password that you set using the device's WEB interface.

Ufanet Secret Top

API listens on port 85, so your URL will be http://<ip_address>:85

If you want to use a custom display image, you can put it in /opt/rbt/server/hw/ip/domophone/ufanet/assets/display_image.jpg and it will be applied during the first autoconfiguration. Make sure your image meets the requirements.

Rubetek RV-3434

When using firmware older than version 2024.08, manual configuration of the discrete output logic is required (custom situation command -> Switch OFF). Do this before adding intercom to RBT!

If you want to use a custom image, a default image, or cyclic text, set them directly through the device's WEB interface. The autoconfigurator will skip these three display types, and your settings will remain unchanged.

Sputnik Cloud

sputnik_config

IP cameras

Add new IP camera

Main tab

image

For city cameras, the Name field has the format: camera name/installation address. In the mobile application, it is shown on two lines.

Secondary tab

Geo coordinates: Latitude,longitude for positioning on the map
Common: enable camera in "City Cameras" on mobile app

image

Custom token for camera

image

Enable "City Cameras"

Edit server config: server/config/config.json

 "mobile": {
        --- 
        "city_cams": true,
        ---
    },

Show "City Cameras" in mobile app
299607277-534a4da1-b504-44ec-8285-4e295c508d9c

List of cameras on map
299607792-6c2551a3-c0fe-48e9-8f06-b1c0238b2f92

Live camera view with the ability to request recording
299607844-535b5782-92c2-4f34-bd5b-568baa0eb9fb

CCTV stub

  • Modify server config /opt/rbt/server/config/config.json
    add stub url from your media server
"dvr": {
            "backend": "internal",
            "servers": [...],
            "stub": {
                "payment_require_url": "https://video.server.hostname:8443/stub_payment_require",
                "service_url": "https://video.server.hostname:8443/stub_service",
                "fallback_url": "https://video.server.hostname:8443/fallback"
            }
}
  • flat is blocked - replace stream to stub "payment_require_url".

image

  • IP camera is disabled in the admin panel - replace stream to stub "service_url"

image

  • DVR stream is specified incorrectly - replace stream to stub "fallback_url". User made a mistake when adding the url or this field is empty.

image

Server config

DVR

...
"dvr": {
            "backend": "internal",
            "servers": [
                {
                    "title": "First server",
                    "type": "flussonic",
                    "url": "https://video.server.hostname:8443",
                    "token": "EexioRahKua9ohKeboox5Se4Beenieca",
                    "hlsMode": "mpegts"
                }
            ],
            "stub": {
                "payment_require_url": "https://video.server.hostname:8443/stub_payment_require",
                "service_url": "https://video.server.hostname:8443/stub_service",
                "fallback_url": "https://video.server.hostname:8443/fail"
            }
        },
...

Flussonic example

# Global settings:
http 8080;
https 8443;
nvidia_monitor false;
edit_auth username example_pass;
auth_backend rbt-auth {
  allow token EexioRahKua9ohKeboox5Se4Beenieca;
}

# DVRs:
dvr raid0 {
  root /mnt/raid0;
  raid 0;
  limits 95% 3h;
  metadata idx;
  disk disk0;
}

# Stream templates:
template t1 {
  prefix rbt-demo;
  on_play auth://rbt-auth;
  meta comment "Example stream template, storage 3h and auth";
  dvr @raid0 3h;
}

# Ingest streams:
stream rbt-demo-000001 {
  template t1;
  disabled false;
  input rtsp://admin:[email protected]/av0_0;
  title "Beward test camera";
  meta comment "Beward test camera";
  source_timeout 42;
}

Flussonic example. Use secure token

# Global settings:
http 8080;
https 8443;
nvidia_monitor false;
edit_auth username example_pass;
auth_backend rbt-auth {
  allow token EexioRahKua9ohKeboox5Se4Beenieca;
  backend securetoken://ooTohshahphooj4equ2ahxo4ihohgien?no_check_ip=true;
}

on_play auth://main;

# DVRs:
dvr raid0 {
  root /mnt/raid0;
  raid 0;
  limits 95% 3h;
  metadata idx;
  disk disk0;
}

# Stream templates:
template t1 {
  prefix rbt-demo;
  on_play auth://rbt-auth;
  meta comment "Example stream template, storage 3h and auth";
  dvr @raid0 3h;
}

# Ingest streams:
stream rbt-demo-000001 {
  template t1;
  disabled false;
  input rtsp://admin:[email protected]/av0_0;
  title "Beward test camera";
  meta comment "Beward test camera";
  source_timeout 42;
}

Forpost example

Geocoder

image

  • Edit server config:
...
        "geocoder": {
            "backend": "dadata",
            "token": "DADATA_API_KEY",
            "locations": [
                {"country_iso_code": "RU"},
                {"country_iso_code": "BY"},
                {"country_iso_code": "UZ"}
                ...
            ]
        },
...

image

Support for Issues from Mobile App

This section describes what minimal changes need to be made to the server and client configuration in order for issues to work through the mobile application.

Server Config

In mobile section add:

  "issues_version": "2"

In backends section add configuration parameters, replacing where required with your values (i.e mqtt, tt_url and later tt_token):

    "tt": {
        "backend": "internal"
    },
    "tt_journal": {
        "backend": "clickhouse"
    },
    "files": {
        "backend": "mongo"
    },
    "cs": {
        "backend": "internal"
    },
    "mqtt": {
        "backend": "internal",
        "agent": "http://127.0.0.1:8082/broadcast",
        "ws": "wss://YOUR-RBT-SERVER/mqtt",
        "mqtt": "mqtt://127.0.0.1:1883",
        "username": "rbt",
        "password": "YOUR-MQTT-PASSWORD"
    },
    "groups": {
        "backend": "internal"
    },
    "issueAdapter": {
        "backend": "teledom",
        "tt_url": "https://example.com/frontend/tt",
        "tt_token": "<!-- your app_user token --!>",
        "anti_spam_interval": 86400,
        "requestCallback": {
            "project": "APP",
            "workflow": "Mobile",
            "subject": "Запрос обратного звонка",
            "catalog": "Обратный звонок",
            "assigned": "callcenter"
        },
        "requestFragment": {
            "project": "APP",
            "workflow": "Mobile",
            "subject": "Запрос видео фрагмента",
            "catalog": "Видео фрагмент",
            "assigned": "cctv-managers"
        },
        "removeAddress": {
            "project": "APP",
            "workflow": "Mobile",
            "subject": "Удаление адреса из приложения",
            "catalog": "Работа с адресами",
            "assigned": "callcenter"
        },
        "connectServicesNoCommon": {
            "project": "APP",
            "workflow": "Mobile",
            "subject": "Подключение услуг (нет общедомовых)",
            "catalog": "Услуги",
            "assigned": "callcenter"
        },
        "connectServicesHasCommon": {
            "project": "APP",
            "workflow": "Mobile",
            "subject": "Подключение услуг (есть общедомовые)",
            "catalog": "Услуги",
            "assigned": "callcenter"
        },
        "connectServicesNoNetwork": {
            "project": "APP",
            "workflow": "Mobile",
            "subject": "Подключение услуг (нет присутствия)",
            "catalog": "Услуги",
            "assigned": "callcenter"
        },
        "requestQRCodeOffice": {
            "project": "APP",
            "workflow": "Mobile",
            "subject": "QR-код",
            "catalog": "Услуги",
            "assigned": "office",
            "_cf_qr_delivery": "Самовывоз"
        },
        "requestQRCodeCourier": {
            "project": "APP",
            "workflow": "Mobile",
            "subject": "QR-код",
            "catalog": "Услуги",
            "assigned": "office",
            "_cf_qr_delivery": "Курьер"
        },
        "requestCredentials": {
            "project": "APP",
            "workflow": "Mobile",
            "subject": "Напоминание логина/пароля",
            "catalog": "Договор",
            "assigned": "callcenter"
        }
    }

Client Config

In client config these modules should be included:

"modules": [
        "mqtt",
        "tt",
        "cs",
        "map",
        "users",
        "groups",
        "permissions",
        "about",
        "geocoder",
        "addresses"
    ],

Other steps

In command line run:

php /opt/rbt/server/cli.php --init-tt-mobile-template

In the web interface of RBT find persistent token of the app_user and set it's value as tt_token parameter in server config.

Server config

Client config

Example clent config

{
    "defaultServer": "https://smart-yard-server.com/frontend",
    "defaultLanguage": "ru",
    "languages": {
        "ru": "Русский",
        "en": "English"
    },
    "modules": [
        "asterisk",
        "addresses",
        "about"
    ],
    "asterisk": {
        "ws": "wss://smart-yard-server.com/wss",
        "ice": [
            {
                "urls": [ "stun:stun.l.google.com:19302" ]
            }
        ],
        "sipDomain": "smart-yard-server.com:5066"
    },
    "map": {
        "tile": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
        "crs": "EPSG3857",
        "default": {
            "lat": 51.505,
            "lon": -0.09,
            "zoom": 13
        },
        "min": 4,
        "max": 18
    },
    "regExp": {
        "phone": "^(7 \\(\\d{3}\\) \\d{3}-\\d{2}-\\d{2}|7\\d{10})$",
        "rfid": "^[0-9A-F]{14}$" // RFID serial number regexp "00000000ABCDEF"
    },
    "defaultRoute": "#about",
    "logo": "rbt",
    "phonePattern": "7 (###) ###-##-##",
    "printServer": "https://smart-yard-server.com/print"
}

Get started

3. Add address

image

4. Make entrances

use previously created entities (intercom and camera)
image

5. Add flats

example 12 floors, 4 apartments per floor image

add single flat: set entrances for this flat
image

6. Add mobile subscribers for flat

image

image

7. Add RFID keys

image

Chat

Example for https://talk-me.ru
Edit server config:
server/config/config.json

"mobile": {
        "web_server_base_path": "https://rbt-demo.lanta.me",
        "payments": true,
        "payments_url": "https://rbt-demo.lanta.me/example/domofon/index.html",
        "city_cams": true,
        "support_phone": "88002220374,
        "chat": true,
        "chat_url": "https://chat.integracio.ru/EXAMPLE_SECURE_TOKEN/rbt-demo.lanta.me/ru",
        "phonePattern": "7 (###) ###-##-##",
        "tt_project": "TDM",
        "tt_workflow": "mobile",
        "tt_user": "mobile",
        "time_zone": "Europe/Moscow",
        "guest_access": "turnOnOnly",
        "issues_version": "2"
    },

Example for talkMe https://talk-me.ru/

Edit server config:
server/config/config.json

"mobile": {
        "web_server_base_path": "https://rbt-demo.lanta.me",
        "payments": true,
        "payments_url": "https://rbt-demo.lanta.me/example/domofon/index.html",
        "city_cams": true,
        "support_phone": "88002220374,
        "chat": true,
        "talk_me_id": "EXAMPLE_TALKME_CHAT_ID",
        "talk_me_domain": "rbt-demo.lanta.me",
        "talk_me_token": "EXAMPLE_TALKME_TOKEN",
        "phonePattern": "7 (###) ###-##-##",
        "tt_project": "TDM",
        "tt_workflow": "mobile",
        "tt_user": "mobile",
        "time_zone": "Europe/Moscow",
        "guest_access": "turnOnOnly",
        "issues_version": "2"
    },

Disable personal flat code

edit flat, set "door opening code" to 00000 for hide this feature in mobile app

image

⚠️ **GitHub.com Fallback** ⚠️