@transai/connector-runner-hp-indigo
v0.15.6
Published
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 processed immediately after
queueStatussubscription. - Incoming JMF signals are parsed and forwarded as
metrics, enriched withmachineId,machineName, andprinterId. - On
stop()it sends JMFStopPersistentChannelto unsubscribe all callbacks.
Configuration
Minimal
{
"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"
}
]
}Full configuration
{
"connectorType": "hp-indigo",
"callbackHost": "192.168.1.10",
"port": 3050,
"webhookPath": "/hp-indigo",
"collections": {
"jobstatus": "jobstatus",
"status": "hp_indigo_status",
"inkResourceChange": "ink_resource_change",
"mediaResourceChange": "media_resource_change"
},
"machines": [
{
"machineId": "indigo-01",
"machineName": "HP Indigo Floor 1",
"printerUrl": "http://192.168.1.50:8080/prodflow/jmf/printer1",
"pressUrl": "http://192.168.1.60:8080/prodflow/jmf/press1",
"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": {
"jobstatus": "Collection for normalized job queue entries — default: jobstatus",
"status": "Collection for device status messages",
"inkResourceChange": "Collection for ink availability change events",
"mediaResourceChange": "Collection for media availability change events"
},
"machines": "Required — array of machine configurations"
}Per machine:
{
"machineId": "Required — unique identifier, added to every metric",
"printerUrl": "Required — HP Indigo queue/resource JMF endpoint URL",
"pressUrl": "Optional — dedicated HP Indigo status endpoint URL (falls back to printerUrl)",
"machineName": "Required — human-readable display name, added to every metric and used by actions",
"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",
"pressUrl": "http://192.168.1.60:8080/prodflow/jmf/press1"
},
{
"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 always included. collection is added when configured at root level.
Collections
Messages are routed to root-level collections — shared across all machines.
Queue status messages are normalized to job entries and sent to the jobstatus collection with queueEntryId as key field.
Ink and media resources are normalized into independent records keyed by resourceKey.
The latest observed resource state is stored in the offset store; resource metrics are emitted only when availability changes between available and unavailable.
{
"collections": {
"jobstatus": "jobstatus",
"status": "hp_indigo_status",
"inkResourceChange": "ink_resource_change",
"mediaResourceChange": "media_resource_change"
}
}If jobstatus is not set, it defaults to jobstatus. If inkResourceChange or mediaResourceChange is not set, it defaults to <type>_resource_change (e.g. ink_resource_change). Only status (device status) falls back to the platform default when not configured.
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