Overview
Integration with SENSR
SENSR is built to be integrated with other software solutions. This section describes how to do just that.
- SENSR's output data described in the Output Specification page,
- Data can be integrated through the SENSR Software Development Kit that supports Python, C++, Javascript,
- SENSR can be controlled through its REST API.
Process SENSR output data
Software Development Kit
SENSR's output data can be received and processed through the SDK by connecting to the Master Node.
It is recommended to deploy the SDK on the machine that will be used for integrating with SENSR.
Installation instructions can be found on the SDK's page. The SDK supports Python, C++ and JavaScript for processing the output data.
Output specification
SENSR encodes data through Protobuf and sends it through a TCP Websocket. The full specification can be found on the Output Specification page. The data is transmitted as 2 different messages: OutputMessage and PointResult (optional)
Control SENSR through REST API
SENSR can be remote-controlled through its REST API. It allows to:
- Control Algo Nodes,
- Change parameters,
- Add and remove zones,
- Restart the pipeline,
- Record data...
The REST API is fully documented with usage examples one REST API specification page.
Security
By default the REST API and Output message are shared through the http protocol. The following steps describe how to enable secure mode and ensure that all outbound/inbound packets are secured through SSL.
- In the Master Node, generate certificate files by running
generate_certificate.sh
with the ip address of the publishing packets. (E.g.$./generate_certificate.sh 192.168.0.100
) - The certificate file will be located under
$HOME/seoulrobotics/keys
- Update parameters to ensure the secure mode is used:
- Master Node: In
bin/data/app_config/app_settings.toml
, changesecurity.enable_ssl
- API queries: Run the queries in the form
$ curl -X GET 'https://localhost:9080/...
- SDK:
- Use the output modules
_secure
- Make sure the variable
use_ssl=True
- Example: In message_listener.py at L31 :
use_ssl=True
- Use the output modules
- Master Node: In