@transai/connector-runner-hp-indigo
v0.10.0
Published
Connector runner for **HP Indigo** digital printing presses. Connects via JMF (Job Messaging Format) persistent query subscriptions and forwards job status, device status, resource, and heartbeat events to the transAI platform as metrics.
Downloads
301
Readme
HP Indigo Connector Runner
Connector runner for HP Indigo digital printing presses. Connects via JMF (Job Messaging Format) persistent query subscriptions and forwards job status, device status, resource, and heartbeat events to the transAI platform as metrics.
How it works
- On
start()the connector launches a local HTTP server to receive callbacks. - For each configured machine it optionally checks JMF capability (
KnownMessages). - It retrieves already-active subscriptions and skips those already registered.
- For remaining subscription types it sends JMF
persistent-querysubscribe requests. - An initial queue snapshot is sent immediately after
queueStatussubscription. - Incoming JMF signals are parsed and forwarded as
metrics, enriched withmachineId,machineName(if set), andprinterId. - On
stop()it sends JMFStopPersistentChannelto unsubscribe all callbacks.
Configuration
Minimal
{
"connectorType": "hp-indigo",
"callbackHost": "192.168.1.10",
"machines": [
{
"machineId": "indigo-01",
"printerUrl": "http://192.168.1.50:8080/prodflow/jmf/printer1"
}
]
}Full configuration
{
"connectorType": "hp-indigo",
"callbackHost": "192.168.1.10",
"port": 3050,
"webhookPath": "/hp-indigo",
"collections": {
"queueStatus": "hp_indigo_queue",
"status": "hp_indigo_status",
"resource": "hp_indigo_resource"
},
"machines": [
{
"machineId": "indigo-01",
"machineName": "HP Indigo Floor 1",
"printerUrl": "http://192.168.1.50:8080/prodflow/jmf/printer1",
"checkCapabilities": true,
"subscriptions": {
"queueStatus": true,
"status": true,
"heartbeat": true,
"heartbeatInterval": 30,
"resource": true
}
}
]
}Configuration fields
Root level:
{
"callbackHost": "Required — IP or hostname reachable from the printer",
"port": "Webhook server port — default: 3050",
"webhookPath": "Base path for webhook endpoints — default: /hp-indigo",
"collections": {
"queueStatus": "Collection for job/queue status messages",
"status": "Collection for device status messages",
"resource": "Collection for resource/consumable messages"
},
"machines": "Required — array of machine configurations"
}Per machine:
{
"machineId": "Required — unique identifier, added to every metric",
"printerUrl": "Required — HP Indigo JMF endpoint URL",
"machineName": "Optional — human-readable display name, added to every metric",
"checkCapabilities": "Query printer for JMF support before subscribing — default: true",
"subscriptions": {
"queueStatus": "Subscribe to job queue updates — default: true",
"status": "Subscribe to device status updates — default: true",
"heartbeat": "Subscribe to periodic heartbeat signals — default: true",
"heartbeatInterval": "Heartbeat interval in seconds — default: 30",
"resource": "Subscribe to resource/consumable updates — default: true"
}
}Multiple machines
{
"connectorType": "hp-indigo",
"callbackHost": "192.168.1.10",
"machines": [
{
"machineId": "indigo-01",
"machineName": "HP Indigo Floor 1",
"printerUrl": "http://192.168.1.50:8080/prodflow/jmf/printer1"
},
{
"machineId": "indigo-02",
"machineName": "HP Indigo Floor 2",
"printerUrl": "http://192.168.1.51:8080/prodflow/jmf/printer2"
}
]
}Webhook-only mode
When no machines are configured the connector starts in webhook-only mode — no JMF subscriptions are created.
{
"connectorType": "hp-indigo",
"port": 3050
}HP Indigo must then be configured to POST directly to:
POST http://<connector-host>:3050/hp-indigo/queue-status?machineId=<machine-id>
POST http://<connector-host>:3050/hp-indigo/status?machineId=<machine-id>
POST http://<connector-host>:3050/hp-indigo/heartbeat?machineId=<machine-id>
POST http://<connector-host>:3050/hp-indigo/resource?machineId=<machine-id>Webhook endpoints
All endpoints expect Content-Type: application/vnd.cip4-jmf+xml.
The machineId query parameter routes the signal to the correct machine handler.
When only one machine is configured it is used as fallback if machineId is absent.
POST <webhookPath>/queue-status?machineId=<machine-id>
POST <webhookPath>/status?machineId=<machine-id>
POST <webhookPath>/heartbeat?machineId=<machine-id>
POST <webhookPath>/resource?machineId=<machine-id>Machine metadata
Every metric sent to the platform includes:
{
"jobId": "abc123",
"jobStatus": "Running",
"machineId": "indigo-01",
"printerId": "indigo-01",
"machineName": "HP Indigo Floor 1"
}machineName is omitted when not set. collection is added when configured at root level.
Collections
Messages are routed to root-level collections — shared across all machines.
{
"collections": {
"queueStatus": "hp_indigo_queue",
"status": "hp_indigo_status",
"resource": "hp_indigo_resource"
}
}If a collection is not set the platform default is used.
Monitoring & health
Health checks run every 5 minutes per machine.
With heartbeat enabled:
- Missing for more than 2 minutes →
WARN - After 3 consecutive missed checks, printer still reachable →
ERROR: check firewall - After 3 consecutive missed checks, printer unreachable →
ERROR: printer may be offline - Heartbeat missing but job data still arriving →
WARN: data flow healthy - Recovered →
INFO
Without heartbeat:
- No notifications for more than 15 minutes →
WARN(may be normal when idle)
Troubleshooting
No subscriptions created
- Verify
printerUrlis accessible from the connector host - Set
checkCapabilities: falseto skip the JMF capability check - Omit
machinesto use webhook-only mode
HP Indigo not sending webhooks
# Test reachability from the printer network
curl -X POST "http://<connector-host>:3050/hp-indigo/heartbeat?machineId=test" \
-H "Content-Type: application/vnd.cip4-jmf+xml" \
-d '<?xml version="1.0"?><JMF xmlns="http://www.CIP4.org/JDFSchema_1_1"><Signal Type="Status"/></JMF>'Testing webhooks locally
# Queue-status
curl -X POST "http://localhost:3050/hp-indigo/queue-status?machineId=indigo-01" \
-H "Content-Type: application/vnd.cip4-jmf+xml" \
-d '<?xml version="1.0"?>
<JMF xmlns="http://www.CIP4.org/JDFSchema_1_1">
<Signal Type="Status">
<QueueStatus>
<QueueEntry JobID="test-job" DescriptiveName="test.pdf" Status="Running"/>
</QueueStatus>
</Signal>
</JMF>'
# Heartbeat
curl -X POST "http://localhost:3050/hp-indigo/heartbeat?machineId=indigo-01" \
-H "Content-Type: application/vnd.cip4-jmf+xml" \
-d '<?xml version="1.0"?><JMF xmlns="http://www.CIP4.org/JDFSchema_1_1"><Signal Type="Status"/></JMF>'Documentation
- CONFIGURATION.md - Complete configuration reference
Building
npx nx build connector-runner-hp-indigoTesting
npx nx test connector-runner-hp-indigo