### Installing Dependencies (Bash) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/rapidly-refocus-your-cameras.md Installs the required Python packages listed in the `requirements.txt` file using pip. ```bash pip install -r requirements.txt ``` -------------------------------- ### Running the Script (Bash) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/rapidly-refocus-your-cameras.md Executes the `focusRhombusCameras.py` script using the python3 interpreter to start the auto-focus process. ```bash python3 focusRhombusCameras.py ``` -------------------------------- ### Example Shared Stream URL with Parameters Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/video-media.md An example URL for a Rhombus shared live video stream demonstrating how to append URL parameters to control player behavior, such as disabling autoplay, hiding events, and enabling real-time streaming. ```text https://console.rhombussystems.com/share/live/ehrF58ABSj2VT8QzXh7GVA?disableautoplay=true&hideevents=true&realtime=true ``` -------------------------------- ### Response Body for Getting Camera Configuration - JSON Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/region-crossing.md Example JSON response body containing the detailed configuration of a camera, including video settings and specific region-of-interest (ROI) coordinates for features like cross counting. ```json { "config": { "videoFacetSettings": { "v0": { "cross_counting": true, "cross_counting_settings": { "in_roi": [ { "coordinates": [ {"x": 0.5, "y": 0.1}, {"x": 0.5, "y": 0.9}, {"x": 0.6, "y": 0.1}, {"x": 0.6, "y": 0.9} ] } ], "out_roi": [ { "coordinates": [ {"x": 0.5, "y": 0.1}, {"x": 0.5, "y": 0.9}, {"x": 0.4, "y": 0.1}, {"x": 0.4, "y": 0.9} ] } ] } } } }, "error": false } ``` -------------------------------- ### Request Body for Getting Camera Configuration - JSON Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/region-crossing.md Example JSON request body used to retrieve the detailed configuration for a specific camera device using its UUID. ```json { "deviceUuid" : "XXXXXXXXXXXXX" } ``` -------------------------------- ### Request Body for Retrieving Camera Configuration (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/line-crossing.md Example JSON request body for the `/deviceconfig/getFacetedConfig` endpoint. It requires the `deviceUuid` of the camera whose configuration is being requested. ```json { "deviceUuid" : "XXXXXXXXXXXXX" } ``` -------------------------------- ### Cloning the Repository (Bash) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/rapidly-refocus-your-cameras.md Clones the rhombus-autofocus repository from GitHub and changes the current directory to the cloned repository. ```bash git clone https://github.com/yourusername/rhombus-autofocus.git cd rhombus-autofocus ``` -------------------------------- ### Starting MediaMTX Docker Container (Shell) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/convert-secure-raw-streams.md This command launches the MediaMTX server within a Docker container. It maps standard ports for RTSP (8554), RTMP (1935), and HTTP/HTTPS (8888, 8889) and specifies TCP as the protocol. The `--rm` flag ensures the container is removed upon exit, and `-it` runs it interactively. ```Shell docker run --rm -it \ -e MTX_PROTOCOLS=tcp \ -p 8554:8554 \ -p 1935:1935 \ -p 8888:8888 \ -p 8889:8889 \ bluenviron/mediamtx:latest-ffmpeg-rpi ``` -------------------------------- ### Partner API Authentication Headers Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- The Basics/authentication/authentication-methods.md Example headers used for authenticating requests to the Partner API. `x-auth-scheme` specifies the authentication method, `x-auth-apikey` is the API key, and `x-auth-org` identifies the client organization. ```configuration x-auth-scheme: [partner-api]* or * [partner-api-token]* x-auth-apikey: XXXXXXXXXXXX x-auth-org: XXCLIENT_UUIDXX ``` -------------------------------- ### Configuring API Keys (Python) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/rapidly-refocus-your-cameras.md Placeholder lines in the `focusRhombusCameras.py` script where the user needs to insert their actual Rhombus and OpenAI API keys. ```python RHOMBUS_API_KEY = "your-rhombus-api-key" OPENAI_API_KEY = "your-openai-api-key" ``` -------------------------------- ### Response Body for Retrieving Camera Configuration (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/line-crossing.md Example JSON response body from the `/deviceconfig/getFacetedConfig` endpoint. It includes the detailed camera configuration under the `config` object, including `videoFacetSettings` and `cross_counting_settings` with `in_roi` and `out_roi` coordinates. ```json { "config": { //.. other video settings ... "videoFacetSettings": { "v0": { "cross_counting": true, "cross_counting_settings": { "in_roi": [ { "coordinates": [ {"x": 0.5, "y": 0.1}, {"x": 0.5, "y": 0.9}, {"x": 0.6, "y": 0.1}, {"x": 0.6, "y": 0.9} ] } ], "out_roi": [ { "coordinates": [ {"x": 0.5, "y": 0.1}, {"x": 0.5, "y": 0.9}, {"x": 0.4, "y": 0.1}, {"x": 0.4, "y": 0.9} ] } ] }, // ... other video settings ... } } }, "error": false } ``` -------------------------------- ### Example Webhook Payload (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- The Basics/event-listeners.md Provides a concrete example of a Rhombus webhook payload JSON object with sample data, illustrating the structure defined previously. ```JSON { "summary": "Movement detected at Headquarters", "deviceUuid": "XXXXXXXXXXXXXXXXXX", "clipLocationMap": {"XXXXXXXXXXXXXXXXXX": "us-west-2"}, "alertUuid": "XXXXXXXXXXXXXXXXXXX", "activityTrigger": "MOTION", "location": "XXXXXXXXXXXXXXXX", "durationSec": 8, "version": "2", "timestampMs": 1646942680190, "thumbnailLocation": "us-west-2" } ``` -------------------------------- ### Request Body for Retrieving Line Crossing Counts (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/line-crossing.md Example JSON request body for the `/report/getThresholdCrossingCounts` endpoint. It specifies the object type (Human/Vehicle), the list of device UUIDs, and the start and end times in milliseconds for the query. ```json { "crossingObject": "HUMAN", "devices": [ "lG-M2-BrRZK1hFzkNNnjnA" ], "startTimeMs": 1723044419000, "endTimeMs": 1723649219358 } ``` -------------------------------- ### Response Body for Retrieving Line Crossing Events - JSON Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/region-crossing.md Example JSON response body containing line crossing events mapped by device UUID, including details like crossing object, direction, and timestamp. ```json { "deviceToThresholdCrossingEventMap": { "CAMERA_UUID": [ { "crossingObject": "HUMAN", "direction": "EGRESS", "timestampMs": 1723572999705 }, { "crossingObject": "HUMAN", "direction": "INGRESS", "timestampMs": 1723572983053 } ] }, "error": false } ``` -------------------------------- ### Retrieving Region Crossing Events Response (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/region-crossing.md Example JSON response from the /report/getThresholdCrossingEvents endpoint, showing a map of device UUIDs to arrays of threshold crossing events. Each event includes the object type, direction (INGRESS/EGRESS), and timestamp. ```json { "deviceToThresholdCrossingEventMap": { "CAMERA_UUID": [ { "crossingObject": "HUMAN", "direction": "EGRESS", "timestampMs": 1723572999705 }, { "crossingObject": "HUMAN", "direction": "INGRESS", "timestampMs": 1723572983053 } ] }, "error": false } ``` -------------------------------- ### Request Body for Retrieving Line Crossing Events - JSON Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/region-crossing.md Example JSON request body used to query line crossing events for specified devices within a time range, including parameters like device UUIDs, time range, and pagination. ```json { "crossingObject": "HUMAN", "devices": [ "CAMERA_UUID" ], "startTimeMs": 1723044419000, "endTimeMs": 1723649219358, "lastEvaluatedKey": 1, "maxPageSize": 1, } ``` -------------------------------- ### Response Body for Retrieving Line Crossing Counts (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/line-crossing.md Example JSON response body from the `/report/getThresholdCrossingCounts` endpoint. It contains an array of count entries, each with a `count` value and a `timestampMs`, and an `error` status. ```json { "counts": [ { "count": 0, "timestampMs": 1723154400000 }, { "count": 1, "timestampMs": 1723155400000 }, { "count": 2, "timestampMs": 1723156400000 }, { "count": 3, "timestampMs": 1723157400000 }, // ... more count entries ... { "count": 2, "timestampMs": 1723158400000 }, { "count": 1, "timestampMs": 1723159400000 }, { "count": 0, "timestampMs": 1723160400000 } ], "error": false } ``` -------------------------------- ### Retrieving Region Crossing Events Request Body (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/region-crossing.md Example JSON payload for the /report/getThresholdCrossingEvents endpoint to retrieve region crossing events for specified devices within a time range. Requires device UUIDs and start/end timestamps in milliseconds. ```json { "crossingObject": "HUMAN", "devices": [ "CAMERA_UUID" ], "startTimeMs": 1723044419000, "endTimeMs": 1723649219358 } ``` -------------------------------- ### Play Rhombus WAN Video Stream with FFplay (Bash) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/ffmpeg.md This command uses FFplay to stream video from a Rhombus camera's WAN media URI and play it directly in real-time. It includes the necessary authentication headers (API key and session token) similar to the FFmpeg command but does not save the stream to a file. ```bash ffplay -headers $'x-auth-scheme: api-token\r\nx-auth-apikey: YOUR_API_KEY\r\nCookie: RSESSIONID=RFT:YOUR_FEDERATED_SESSION_TOKEN' \ -i "https://IP.dash.rhombussystems.com:PORT/dash/api/outbound/CAMERA_UUID/SESSION/time/live-v2/file.m3u8" ``` -------------------------------- ### Getting Camera Thumbnail JPEG URL Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/video-media.md Provides the URL structure for retrieving a current snapshot (thumbnail) JPEG image from a specific camera. This endpoint requires API authentication headers and uses the camera's UUID and media region. ```text https://media.rhombussystems.com/media/{{cameraUuid}}/{{mediaRegion}}/snapshot.jpeg ``` -------------------------------- ### Converting SRS to RTSP with FFmpeg (Shell) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/convert-secure-raw-streams.md This command uses FFmpeg to process a Secure Raw Stream (SRS) URL. It takes the SRS URL as input (`-i`), copies the video codec without transcoding (`-c:v copy`), and outputs (`-f rtsp`) the stream to the local MediaMTX RTSP server running on port 8554. ```Shell ffmpeg -i "https://my-secure-raw-streaming-url-here" -c:v copy -f rtsp rtsp://localhost:8554/rtsp-stream ``` -------------------------------- ### Request Body for Getting Camera Media URIs (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/ffmpeg.md This JSON object provides the parameters for the `getMediaUris` API endpoint. It requires the `cameraUuid` field, specifying the unique identifier of the camera for which media URIs are requested. ```json { "cameraUuid": "XXXXXXXXXXXXXXXX" } ``` -------------------------------- ### Successful Response for Getting Camera Media URIs (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/ffmpeg.md This JSON object represents a successful response from the `getMediaUris` API endpoint. It provides various LAN and WAN URIs for accessing live and VOD streams from the specified camera, including templates for constructing VOD URLs. ```json { "error": false, "lanCheckUrls": [ "https://IP_ADDRESS.lan.rhombussystems.com:PORT/XXXXXXXXXXXXXXXX/" ], "lanLiveH264Uris": [ "wss://IP_ADDRESS.lan.rhombussystems.com:PORT/XXXXXXXXXXXXXXXX/ws" ], "lanLiveM3u8Uris": [ "https://IP_ADDRESS.lan.rhombussystems.com:PORT/XXXXXXXXXXXXXXXX/live/live.m3u8" ], "lanLiveMpdUris": [ "https://IP_ADDRESS.lan.rhombussystems.com:PORT/XXXXXXXXXXXXXXXX/live/live.mpd" ], "lanVodM3u8UrisTemplates": [ "https://IP_ADDRESS.lan.rhombussystems.com:PORT/XXXXXXXXXXXXXXXX/store/{START_TIME}_{DURATION}/clip.m3u8" ], "lanVodMpdUrisTemplates": [ "https://IP_ADDRESS.lan.rhombussystems.com:PORT/XXXXXXXXXXXXXXXX/store/{START_TIME}_{DURATION}/clip.mpd" ], "wanLiveH264Uri": "wss://IP_ADDRESS.dash-internal.rhombussystems.com:PORT/api/h264/live/XXXXXXXXXXXXXXXX/ws", "wanLiveM3u8Uri": "https://IP_ADDRESS.dash.rhombussystems.com:PORT/dash/api/outbound/XXXXXXXXXXXXXXXX/SESSION/time/live-v2/file.m3u8", "wanLiveMpdUri": "https://IP_ADDRESS.dash.rhombussystems.com:PORT/dash/api/outbound/XXXXXXXXXXXXXXXX/SESSION/time/live-v2/file.mpd", "wanVodM3u8UriTemplate": "https://IP_ADDRESS.dash.rhombussystems.com:PORT/dash/api/outbound/XXXXXXXXXXXXXXXX/SESSION/{START_TIME}/{DURATION}/vod/file.m3u8", "wanVodMpdUriTemplate": "https://IP_ADDRESS.dash.rhombussystems.com:PORT/dash/api/outbound/XXXXXXXXXXXXXXXX/SESSION/{START_TIME}/{DURATION}/vod/file.mpd" } ``` -------------------------------- ### Embedding Shared Stream with Iframe (HTML) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/video-media.md Demonstrates the basic HTML structure for embedding a Rhombus shared video stream player into a webpage using an iframe. The 'src' attribute should be set to the URL obtained from creating a shared stream. ```html ``` -------------------------------- ### Request Body for Generating Federated Session Token (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/ffmpeg.md This JSON object provides the parameters for the `generateFederatedSessionToken` API endpoint. It requires the `durationSec` field, specifying the desired validity period for the session token in seconds. ```json { "durationSec":86400 } ``` -------------------------------- ### Stream and Save Rhombus WAN Video with FFmpeg (Bash) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/ffmpeg.md This command uses FFmpeg to stream video from a Rhombus camera's WAN media URI and save it to a local file named 'output.mp4'. It includes necessary authentication headers (API key and session token) and uses '-c copy' to avoid re-encoding the video stream. ```bash ffmpeg -headers $'x-auth-scheme: api-token\r\nx-auth-apikey: YOUR_API_KEY\r\nCookie: RSESSIONID=RFT:YOUR_FEDERATED_SESSION_TOKEN' \ -i "https://IP.dash.rhombussystems.com:PORT/dash/api/outbound/CAMERA_UUID/SESSION/time/live-v2/file.m3u8" \ -c copy output.mp4 ``` -------------------------------- ### Confirming Camera Line Crossing Thresholds Update (Success Response) - Rhombus API - JSON Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/line-crossing.md This JSON object represents a successful response from the Rhombus API after updating a camera's line crossing thresholds. A simple `error: false` indicates the operation was completed without issues. ```json { "error" : false } ``` -------------------------------- ### Retrieving Line Crossing Events (Response Body) - Rhombus API - JSON Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/line-crossing.md This JSON object represents the response from the Rhombus API when retrieving line crossing events. It contains a `deviceToThresholdCrossingEventMap` where keys are device UUIDs and values are arrays of event objects, each detailing the `crossingObject`, `direction`, and `timestampMs`. ```json { "deviceToThresholdCrossingEventMap": { "CAMERA_UUID": [ { "crossingObject": "HUMAN", "direction": "EGRESS", "timestampMs": 1723572999705 }, { "crossingObject": "HUMAN", "direction": "INGRESS", "timestampMs": 1723572983053 } ] }, "error": false } ``` -------------------------------- ### Querying Line Crossing Events (Request Body) - Rhombus API - JSON Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/line-crossing.md This JSON object represents the request body for retrieving line crossing events via the Rhombus API. It requires specifying the `crossingObject` type (e.g., HUMAN), an array of device `devices` UUIDs, and the `startTimeMs` and `endTimeMs` in epoch milliseconds. ```json { "crossingObject": "HUMAN", "devices": [ "CAMERA_UUID" ], "startTimeMs": 1723044419000, "endTimeMs": 1723649219358 } ``` -------------------------------- ### Configuring Camera Line Crossing Thresholds (Request Body) - Rhombus API - JSON Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Guides - Examples/line-crossing.md This JSON object represents the request body for updating a camera's line crossing thresholds via the Rhombus API. It includes parameters like `cameraUuid`, the coordinates for the line (`pointA`, `pointB`), and an `inverted` flag to control event direction. ```json { "inverted": false, "pointA": { "x": 0.1, "y": 0.5 }, "pointB": { "x": 0.8, "y": 0.5 }, "cameraUuid": "XXXXXCXXXXXXXXX" } ``` -------------------------------- ### GoDaddy Root and Intermediate Certificates - G2 Text Version 1 Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- The Basics/authentication/authentication-methods.md These are the GoDaddy Root and Intermediate G2 certificates provided in text format. Clients should add these to their truststore to validate the server's identity when connecting to the Rhombus API. ```Text -----BEGIN CERTIFICATE----- MIIE0DCCA7igAwIBAgIB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ADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKD E6bFIEMBO4Tx5oVJnyfq9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH /PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD+qK+ihVqf94Lw7YZFAXK6sOoBJQ7Rnwy DfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutdfMh8+7ArU6SSYmlRJQVh GkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMlNAJWJwGR tDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEA AaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE FDqahQcQZyi27/a9BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmX WWcDYfF+OwYxdS2hII5PZYe096acvNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu 9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r5N9ss4UXnT3ZJE95kTXWXwTr gIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYVN8Gb5DKj7Tjo 2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI 4uJEvlz36hz1 -----END CERTIFICATE----- ``` -------------------------------- ### Amazon Root and Server Certificates - Text Version 2 Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- The Basics/authentication/authentication-methods.md These are the Amazon Root and Server certificates provided in text format. Clients should add these to their truststore to validate the server's identity when connecting to the Rhombus API. ```Text -----BEGIN CERTIFICATE----- MIIESTCCAzGgAwIBAgITBn+UV4WH6Kx33rJTMlu8mYtWDTANBgkqhkiG9w0BAQsF ADA5MQswCQYDV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VI1 59Gt/a6ZiqyJEi+752+a1U5y6iAwYfmXss2lJwJFqMp2PphKg5625kXg8kP2CN5t 6G7bMQcT8C8xDZNtYTd7WPD8UZiRKAJPBXa30/AbwuZe0GaFEQ8ugcYQgSn+IGBI 8/LwhBNTZTUVEWuCUUBVV18YtbAiPq3yXqMB48Oz+ctBWuZSkbvkNodPLamkB2g1 upRyzQ7qDn1X8nn8N8V7YJ6y68AtkHcNSRAnpTitxBKjtKPISLMVCx7i4hncxHZS yLyKQXhw2W2Xs0qLeC1etA+jTGDK4UfLeC0SF7FSi8o5LL21L8IzApar2pR/ -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF ``` -------------------------------- ### Required Authentication HTTP Headers Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- The Basics/authentication.md Requests to the Rhombus API must include these HTTP headers for authentication. The `x-auth-scheme` header specifies the type of authentication being used (e.g., `api-token`, `partner-api-token`), and the `x-auth-apikey` header contains the corresponding API key. ```HTTP x-auth-scheme: [api]* or [api-token]* or [partner-api-token]* x-auth-apikey: XXXXXXXXXXXX Client Example: x-auth-scheme: api-token x-auth-apikey: XXXXXXXXXXXXXXX Partner Example: x-auth-scheme: partner-api-token x-auth-apikey: XXXXXXXXXXXXXXXX x-auth-org: client_org ``` -------------------------------- ### Validating HMAC Signature (Python) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- The Basics/event-listeners.md Shows how to compute the HMAC-SHA1 signature of the webhook body in Python using the `hmac` and `hashlib` modules and a shared secret to authenticate the request. ```Python import hmac import hashlib digester = hmac.new(webhookSecret, webhookBody, hashlib.sha1) signature = digester.digest().encode("hex") ``` -------------------------------- ### Generating Certificate Signing Request (CSR) and Private Key - Shell Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- The Basics/authentication/authentication-methods.md This openssl command generates a new RSA private key (4096 bits) and a corresponding Certificate Signing Request (CSR). The private key is saved to 'rhombus_client.key' and the CSR to 'rhombus_client.csr'. The '-nodes' flag ensures the private key is not encrypted. The '-subj' parameter specifies the distinguished name details for the certificate. ```Shell openssl req \ -out rhombus_client.csr \ -new \ -newkey rsa:4096 \ -nodes \ -keyout rhombus_client.key \ -subj "/C=US/ST=California/L=Sacramento/O=Rhombus Systems/CN=Client Name" ``` ```Shell openssl req -out rhombus_client.csr -new -newkey rsa:4096 -nodes -keyout rhombus_client.key -subj "/C=US/ST=California/L=Sacramento/O=Rhombus Systems/CN=Client Name" ``` -------------------------------- ### Rhombus API OpenAPI URL - Text Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- Resources/low-code-no-code/postman.md This URL provides the OpenAPI specification for the Rhombus API. It can be imported directly into Postman to set up collections for testing and development. Note that additional parameters will be required within Postman for the API calls to function correctly. ```text https://api2.rhombussystems.com/api/openapi/public.json ``` -------------------------------- ### Validating HMAC Signature (Java) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- The Basics/event-listeners.md Demonstrates how to calculate the HMAC-SHA1 signature of the webhook body in Java using a shared secret to verify the request's authenticity. Requires `HmacUtils` and `HmacAlgorithms` from Apache Commons Codec. ```Java final String webhookSignature = new HmacUtils(HmacAlgorithms.HMAC_SHA_1, webhookSecret) .hmacHex(webhookBody); ``` -------------------------------- ### Webhook Payload Structure Definition (JSON) Source: https://github.com/rhombus-jeremy/rhombus-developer-md/blob/main/- The Basics/event-listeners.md Defines the structure and data types of the JSON object sent in Rhombus webhook POST requests. Lists fields like version, triggers, summary, deviceUuid, timestampMs, location, alertUuid, durationSec, thumbnailLocation, and clipLocationMap. ```JSON { "version": [INTEGER] the version of the webhook, "activityTrigger": [STRING] optional comma separated list of activities that triggered the alert (human movement, etc), "diagnosticTrigger": [STRING] optional comma separated list of diagnostics that triggered the alert (camera disconnects, etc), "summary": [STRING] user friendly description of the alert, "deviceUuid": [STRING] the id of the device that triggered the alert, "timestampMs": [LONG] the epoch millisecond timestamp of the alert, "location": [STRING] the id of the location for the alert, "alertUuid": [STRING] the id of the alert, "durationSec": [INTEGER] optional duration of the alert clip in seconds if the alert has media, "thumbnailLocation": [STRING] optional region of the alert thumbnail if the alert has media, "clipLocationMap": [MAP] optional map of device id to region for the alert clip } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.