BotPairResult bot.pair-result@1
Generated at from
openvibe-contracts v0.97.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- bot
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Decision
- ADR-043
- Schema
https://openvibe.network/contracts/bot/pair-result.v1.json
bot.pair-result@1: the 201 answers of OpenVibe.Bot's pairing routes (server/api/v1.js). POST /api/v1/pair → { device_id, credential, publish_key, whip_url?, robot_id, profile }; POST /api/v1/devices/bind (a Network node token) → the same without credential. The credential, the publish key and the WHIP URL are shown once and never again. Without OpenRe configured there is no key: video is not_configured instead.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: bound-without-video
{
"device_id": "dev_01J8Z4N5S2V8X0ZB4M7Q9R3T5W",
"video": "not_configured",
"robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
"profile": null
}Valid: paired
{
"device_id": "dev_01J8Z4N5S2V8X0ZB4M7Q9R3T5W",
"credential": "example-credential-shown-once",
"publish_key": "example-publish-key-shown-once",
"whip_url": "https://ingest.openre.stream/whip/example-publish-key-shown-once",
"robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
"profile": {
"id": "adeept.adr036",
"version": 1,
"name": "Adeept ADR036 4WD Smart Car",
"vendor": "Adeept",
"kind": "onboard",
"capabilities": [
"drive.differential",
"servo.pan_tilt",
"lights.rgb",
"speaker.horn",
"sensor.ultrasonic",
"battery"
],
"mapping": {
"driver": "pca9685",
"plugin": "adeept_adr036",
"wheels": "ordinary",
"i2c_bus": 1,
"address": "0x5f",
"motor_channels": [
8,
9,
10,
11,
12,
13,
14,
15
],
"servo_channels": {
"pan": 0,
"tilt": 1
},
"battery": {
"driver": "ads7830",
"address": "0x48"
},
"lights": "ws2812",
"horn": "buzzer"
},
"commands": {
"drive": {
"axes": {
"throttle": [
-1,
1
],
"steer": [
-1,
1
]
}
},
"actuator": {
"names": {
"pan": {
"type": "number",
"range": [
-1,
1
]
},
"tilt": {
"type": "number",
"range": [
-1,
1
]
},
"buzzer": {
"type": "tone",
"hz": [
220,
880
]
},
"lights": {
"type": "rgb",
"count": 8
}
}
}
},
"widgets": [
{
"type": "drive",
"capability": "drive.differential",
"label": "Drive",
"order": 1,
"command": {
"kind": "drive"
}
},
{
"type": "pan-tilt",
"capability": "servo.pan_tilt",
"label": "Pan / tilt",
"order": 2,
"command": {
"kind": "actuator",
"names": [
"pan",
"tilt"
]
}
},
{
"type": "battery",
"capability": "battery",
"label": "Battery",
"order": 3
},
{
"type": "latency",
"label": "Latency",
"order": 4
}
],
"camera": {
"transport": "whip",
"resolution": "640x480"
},
"limits": {
"max_speed": 1,
"max_turn": 1,
"max_command_ms": 300,
"heartbeat_ms": 1000
}
}
}Rejected: credential-hash
{
"device_id": "dev_01J8Z4N5S2V8X0ZB4M7Q9R3T5W",
"credential_hash": "x",
"video": "not_configured",
"robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
"profile": null
}Rejected: no-key-no-video
{
"device_id": "dev_01J8Z4N5S2V8X0ZB4M7Q9R3T5W",
"credential": "example-credential-shown-once",
"robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
"profile": null
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('bot.pair-result@1', value); // { valid, errors: [{ path, message }] }