SKILL.md - NewDayProductionAI API Interface
Overview
Comprehensive interface to New Day Church's production infrastructure database at productionai.newdaychurch.cc (internal: 10.10.40.91:3002).
This API manages 97+ devices, 104+ wire connections, integration notes, software tracking, and signal flow visualization for the church's AV production environment.
Connection Details
| Property | Value |
|---|---|
| Base URL | http://10.10.40.91:3002/api |
| Authentication | None (CORS-enabled, trusted network) |
| WebSocket | ws://10.10.40.91:8080 (real-time updates) |
| Format | JSON |
Core Resources
| Resource | Endpoints | Purpose |
|---|---|---|
| Devices | GET/POST/PUT/DELETE /devices, /devices/:id | Equipment inventory (97 devices) |
| Wires | GET/POST/PUT/DELETE /wires, /wires/:id | Physical connections (104 wires) |
| Integration Notes | GET/POST/PUT/DELETE /integration-notes | Troubleshooting, setup, docs |
| Software | GET/POST/PUT/DELETE /software | Application tracking |
| Device-Software | GET/POST/DELETE /device_software | Install associations |
| Signal Flow Layouts | GET/POST/PUT/DELETE /signal_flow_layouts | Visual configurations |
| Settings | GET/POST/PUT/DELETE /settings/:key | App configuration |
| ATEM Configs | GET/POST/PUT/DELETE /atem_simulator_configs | Switcher configurations |
| Database | GET/POST /database/export, /database/import | Backup/restore |
Common Workflows
🔍 Find Device Information
By name (fuzzy):
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.device_name | contains("ATEM"))'
By unique_id:
curl -s http://10.10.40.91:3002/api/devices/DEV_023
By IP address:
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.ip_address == "10.10.40.28")'
By location:
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.location == "Production")'
🔐 Get Credentials
All devices with passwords:
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.password != "" and .password != null) | {name: .device_name, user: .username, pass: .password, ip: .ip_address}'
Specific device:
curl -s http://10.10.40.91:3002/api/devices/DEV_037 | jq '{name: .device_name, username: .username, password: .password, ip: .ip_address}'
📡 Signal Flow Tracing
Get wire connections:
curl -s http://10.10.40.91:3002/api/wires | jq '.[] | {from: .source_device_id, to: .destination_device_id, type: .signal_type}'
Trace from device:
curl -s http://10.10.40.91:3002/api/wires | jq '.[] | select(.source_device_id == "device-uuid-here")'
Full path (device → wire → device):
# Get all wires with device names
curl -s http://10.10.40.91:3002/api/wires | jq '[.[] | {wire_id: .id, from_port: .source_port_id, to_port: .destination_port_id, signal: .signal_type}]'
📝 Integration Notes
All notes:
curl -s http://10.10.40.91:3002/api/integration-notes
Notes for specific device:
curl -s http://10.10.40.91:3002/api/integration-notes/device/DEV_023
By note type:
curl -s http://10.10.40.91:3002/api/integration-notes | jq '.[] | select(.note_type == "troubleshooting")'
By priority:
curl -s http://10.10.40.91:3002/api/integration-notes | jq '.[] | select(.priority == "critical")'
🔧 Troubleshooting Lookup
Device with troubleshooting notes:
curl -s http://10.10.40.91:3002/api/devices/DEV_041 | jq '{name: .device_name, notes: .troubleshooting_notes}'
All devices with notes:
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.troubleshooting_notes | length > 0) | {id: .unique_id, name: .device_name, notes: .troubleshooting_notes}'
📅 Replacement Schedule
All devices sorted by replacement year:
curl -s http://10.10.40.91:3002/api/devices | jq -s 'sort_by(.replacement_year) | .[] | select(.replacement_year != null) | "\(.replacement_year): \(.device_name) (\(.unique_id))"'
Overdue devices:
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.replacement_year <= 2026) | {name: .device_name, replace_by: .replacement_year, purchased: .purchased_year}'
By lifespan remaining:
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.years_until_replace != null) | {name: .device_name, years: .years_until_replace, replace_year: .replacement_year}'
🌐 Network Status
Offline devices (ping failure):
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.ping_responding == false) | {name: .device_name, last_seen: .ping_last_change}'
Online devices:
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.ping_responding == true) | .device_name'
Unknown status:
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.ping_responding == null) | .device_name'
💾 Software Tracking
All software:
curl -s http://10.10.40.91:3002/api/software
Software on specific device:
curl -s http://10.10.40.91:3002/api/device_software | jq '.[] | select(.device_id == "device-uuid")'
🎛️ ATEM Configuration
All ATEM configs:
curl -s http://10.10.40.91:3002/api/atem_simulator_configs
By device:
curl -s http://10.10.40.91:3002/api/atem_simulator_configs/device/DEV_023
Updating Data
Update Device Field
curl -s -X PUT http://10.10.40.91:3002/api/devices/DEV_023 \
-H "Content-Type: application/json" \
-d '{"troubleshooting_notes": "New troubleshooting info here"}'
Updatable fields:
- •
device_name,device_type,model - •
ip_address,username,password - •
campus,location,description - •
software_installed,troubleshooting_notes - •
purchased_year,years_until_replace,replacement_year - •
available_ports,port_mapping
Create Integration Note
curl -s -X POST http://10.10.40.91:3002/api/integration-notes \
-H "Content-Type: application/json" \
-d '{
"title": "Network Issue Resolved",
"note_type": "troubleshooting",
"note_text": "Fixed by rebooting switch",
"priority": "medium",
"tags": ["network", "switch"],
"device_ids": ["DEV_023"],
"software_ids": []
}'
Update Wire
curl -s -X PUT http://10.10.40.91:3002/api/wires/123 \
-H "Content-Type: application/json" \
-d '{"wire_label": "Updated label", "notes": "Cable tested good"}'
Database Schema Reference
Device Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Primary key |
unique_id | String | User-defined (DEV_001, etc.) |
device_name | String | Display name |
device_type | String | camera, monitor, converter, etc. |
model | String | Manufacturer model |
ip_address | String | Network address |
username | String | Login credential |
password | String | Login credential |
campus | String | Location campus |
location | String | Physical location |
description | String | General description |
software_installed | String | Deprecated (use device_software) |
troubleshooting_notes | String | Fixes and issues |
purchased_year | Integer | Year acquired |
years_until_replace | Integer | Expected lifespan |
replacement_year | Integer | Auto-calculated |
available_ports | JSONB | Port definitions |
port_mapping | JSONB | Routing rules |
ping_responding | Boolean | Online status |
ping_last_change | Timestamp | Last status change |
embedding | Vector | AI embedding (1536 dim) |
Wire Fields
| Field | Type | Description |
|---|---|---|
id | Integer | Primary key |
source_device_id | UUID | From device |
destination_device_id | UUID | To device |
source_port_id | String | Port on source |
destination_port_id | String | Port on dest |
wire_type | String | Physical type |
wire_label | String | User label |
signal_type | String | HDMI, SDI, XLR, etc. |
signal_flow_chain | JSONB | Calculated path |
status | String | active, inactive |
Integration Note Fields
| Field | Type | Description |
|---|---|---|
id | Integer | Primary key |
title | String | Note title |
note_type | String | setup, repair, update, troubleshooting, modification |
note_text | String | Content |
priority | String | low, medium, high, critical |
tags | Array | Custom tags |
device_ids | Array | Associated devices |
software_ids | Array | Associated software |
Helper Scripts
Located at: ~/.openclaw/workspace/scripts/production-db/
Example: Quick Device Lookup
#!/bin/bash # device-info.sh - Get device details by name or ID DEVICE_QUERY="$1" API="http://10.10.40.91:3002/api" # Try unique_id first, then name search RESULT=$(curl -s "$API/devices/$DEVICE_QUERY" | jq -r '.unique_id // empty') if [ -z "$RESULT" ]; then # Search by name curl -s "$API/devices" | jq --arg q "$DEVICE_QUERY" '.[] | select(.device_name | contains($q))' else curl -s "$API/devices/$DEVICE_QUERY" fi
Example: Trace Signal Path
#!/bin/bash # trace-signal.sh - Follow signal from source to destination SOURCE_ID="$1" API="http://10.10.40.91:3002/api" echo "Tracing signal from device: $SOURCE_ID" curl -s "$API/wires" | jq --arg src "$SOURCE_ID" '.[] | select(.source_device_id == $src)'
Example: Offline Report
#!/bin/bash # offline-report.sh - List all offline devices API="http://10.10.40.91:3002/api" echo "=== OFFLINE DEVICES ===" curl -s "$API/devices" | jq -r '.[] | select(.ping_responding == false) | "\(.unique_id): \(.device_name) (Last: \(.ping_last_change // "Never"))"'
Security Notes
⚠️ Current API has no authentication — runs on trusted internal network only.
Sensitive data in API:
- •IP addresses (10.x.x.x private range)
- •Device passwords (stored in plaintext in descriptions)
- •License keys (Dante, etc.)
Access control:
- •Network-level only
- •No user authentication
- •No audit logging
Recommendations:
- •Keep API on internal network only
- •VPN for external access
- •Consider API key auth for future
Common Issues
Device ID Format
- •GET/PUT/DELETE uses
unique_id(e.g.,DEV_023) ✓ - •NOT the UUID (e.g.,
e3b8c69c-...) ✗
Port References
- •Always use
source_port_id/destination_port_id - •Must match
available_ports.inputs[].idoroutputs[].id
Embeddings
- •Must be exactly 1536 dimensions
- •Invalid embeddings silently skipped
- •Use OpenAI
text-embedding-ada-002format
Real-time Updates
- •WebSocket on port 8080
- •Channels:
device_ping_update,wire_change,device_change - •Separate from REST API
Usage Examples
"What's connected to the ATEM?"
curl -s http://10.10.40.91:3002/api/wires | jq '.[] | select(.destination_device_id | contains("DEV_023")) | {from: .source_port_id, to: .destination_port_id, type: .signal_type}'
"Show me all passwords for today's troubleshooting"
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.password != "" and .password != null) | "\(.device_name): \(.username) / \(.password)"'
"What needs replacement this year?"
curl -s http://10.10.40.91:3002/api/devices | jq '.[] | select(.replacement_year == 2026) | "\(.device_name) (\(.unique_id)) - Purchased: \(.purchased_year)"'
"Find troubleshooting notes for audio issues"
curl -s http://10.10.40.91:3002/api/integration-notes | jq '.[] | select(.tags | contains(["audio"])) | {title: .title, devices: [.devices[].device_name]}'
Related Skills
- •
asana— Task management for maintenance - •
slack— Alerts for offline devices - •
gog— Email integration for reports
Last updated: 2026-02-03
API Version: 1.0
Devices: 97 | Wires: 104 | Notes: 33