with one click
strixcamdb-add
// Add new brands, camera models, or stream URLs to StrixCamDB. Use when user wants to add camera data to the database, mentions adding a brand/model/URL, or provides camera stream information.
// Add new brands, camera models, or stream URLs to StrixCamDB. Use when user wants to add camera data to the database, mentions adding a brand/model/URL, or provides camera stream information.
| name | StrixCamDB-Add |
| description | Add new brands, camera models, or stream URLs to StrixCamDB. Use when user wants to add camera data to the database, mentions adding a brand/model/URL, or provides camera stream information. |
| argument-hint | [description of what to add] |
| disable-model-invocation | true |
You are editing the StrixCamDB camera database. Follow the rules below exactly.
Chat with the user in Russian. All data in JSON files -- in English.
You can ONLY ADD new data: new brands, new streams, new models. You must NEVER delete or modify existing entries -- not URLs, not models, not streams. Even if something looks wrong, broken, or nonsensical (like model name DVR or 1080P or empty-looking URL). These entries may be valid for specific cameras.
If you see something suspicious -- tell the user. But don't touch it without explicit confirmation.
If the user provided details in the command arguments -- parse them and determine what to do automatically. If not -- ask using AskUserQuestion:
What do you want to do?
models arrayoui.jsonWhen user selects "Add OUI prefix":
3C:EF:8C) and brand name (e.g. Dahua)3c:ef:8c -> 3C:EF:8CXX:XX:XX (uppercase hex, colon-separated)oui.json, check if prefix already exists -- if yes, warn and show current mappingensure_ascii: false, trailing newlinepython3 -c "import json; json.load(open('oui.json'))"OUI file format (oui.json in repository root):
{
"3C:EF:8C": "Dahua",
"44:47:CC": "Hikvision"
}
Key: MAC prefix (first 3 octets). Value: brand name (human-readable).
When user selects "Process contribution issues":
gh issue list --repo eduard256/StrixCamDB --label contribution --state open to list pending contributionsgh issue view {number} --repo eduard256/StrixCamDB to read the YAML data
b. Parse the YAML block from the issue body:
brand: Dahua
model: IPC-HDW1220S
url: /live
protocol: rtsp
port: 554
mac_prefix: 3C:EF:8C
comment: Works on firmware v2.800
c. Validate the data:
/StrixCamDB-New-Protocol-Or-Placeholdersgh issue close {number} --repo eduard256/StrixCamDB --comment "Added to database"
f. If the data is invalid or rejected by user:
gh issue close {number} --repo eduard256/StrixCamDB --reason "not planned" --comment "Rejected: {reason}"Ask (or parse from input):
Hikvision)Brand ID is auto-generated from brand name: lowercase, spaces to hyphens, special chars removed.
Ask (or parse from input):
brands/ directory if unclear)/Streaming/Channels/101)rtsp, http, https, rtsps, rtmp, mms, bubble, rtp, dvrip)554, 80. Use 0 if unknown)* for all)Ask (or parse from input):
Every brand file is brands/{brand_id}.json:
{
"version": 2,
"brand": "Brand Name",
"brand_id": "brand-name",
"streams": [
{
"id": "brand-name-1",
"url": "/path/to/stream",
"protocol": "rtsp",
"port": 554,
"models": ["Model-A", "Model-B"],
"notes": "Optional notes"
}
]
}
| Field | Type | Required | Rules |
|---|---|---|---|
version | int | yes | Always 2 |
brand | string | yes | Human-readable name, capitalized properly |
brand_id | string | yes | Lowercase, hyphens only, must match filename |
streams | array | yes | At least one stream |
| Field | Type | Required | Rules |
|---|---|---|---|
id | string | yes | Format: {brand_id}-{N} where N is sequential. Must be unique within file |
url | string | yes | URL path only (no protocol://host:port prefix). Can contain placeholders |
protocol | string | yes | One of: rtsp, http, https, rtsps, rtmp, mms, bubble, rtp, dvrip |
port | int | yes | 0-65535. Use 0 if unknown (means "use default for protocol") |
models | array | yes | Non-empty. Use ["*"] if stream works for all models of this brand |
notes | string | no | Only add if genuinely useful context exists |
| Placeholder | Description | Example |
|---|---|---|
[CHANNEL] | Channel number, 0-based | 0, 1, 2 |
[CHANNEL+1] | Channel number, 1-based | 1, 2, 3 |
[USERNAME] | Login username | admin |
[PASSWORD] | Login password | 12345 |
[WIDTH] | Video width | 1920 |
[HEIGHT] | Video height | 1080 |
[IP] | Camera IP address | 192.168.1.100 |
[PORT] | Port number | 554 |
[AUTH] | Base64-encoded username:password | |
[TOKEN] | Authorization token |
Alternative forms: [USER], [PASS], [PWD], {CHANNEL}, {channel+1} -- all supported.
brand_id must match the filename (without .json)id must be unique within the fileprotocol:port:url combination must not appear twiceurl must not be emptymodels must not be emptyport must be integer 0-65535protocol must be a non-empty stringbrands/{brand_id}.json does NOT existversion: 2, brand info, and streams{brand_id}-1brands/{brand_id}.jsondahua-47, next is dahua-48)streams arrayindent=2, ensure_ascii=False, trailing newlinebrands/{brand_id}.jsonmodels array (if not already present)ensure_ascii: false (preserve Unicode)version, brand, brand_id, streamsid, url, protocol, port, models, notesAfter writing:
python3 scripts/validate.py to check for errorsBefore finishing, check for problems and report them to the user immediately:
protocol:port:url) within the brand fileDVR, PTZ, 1080P, Other) -- warn the user but don't blockschemas/brand.schema.json -- warn the user, suggest running /StrixCamDB-New-Protocol-Or-PlaceholdersAsk the user using AskUserQuestion:
Question: "Commit changes?"
v0.2.0)git add brands/{brand_id}.jsonAdd {brand} camera databaseAdd stream URL for {brand}Add {model} to {brand}git push origin maingit tag v{X.Y.Z}git push origin v{X.Y.Z}feat:, fix:, chore: prefixesAdd Reolink camera database, Add RTSP stream for TP-Link Tapo, Add DS-2CD2047 to Hikvision