Production schedule changes from ERP not updating on IoT-connected HMIs

Our planners update production schedules in SAP ERP throughout the day, and these changes should flow to Smart Factory and then push to our IoT-connected HMIs on the shop floor. The problem is that operators are seeing outdated work instructions - sometimes schedules from 4-6 hours ago.

We’re using OPC UA for the HMI connections and REST API webhooks from ERP to MES. I suspect either the OPC UA event subscription isn’t triggering properly, the HMI polling interval is too slow, or the REST webhook isn’t configured correctly. Here’s our current webhook endpoint:


POST /api/v1/schedule/update
Headers: Authorization: Bearer {token}
Payload: {scheduleId, items[], timestamp}

Anyone experienced similar sync delays between ERP schedule updates and IoT HMIs?

Perfect - you’ve identified one major issue. Here’s the comprehensive solution addressing all three focus areas:

OPC UA Event Subscription Configuration: Your 10-minute polling interval is killing real-time updates. Reconfigure Smart Factory’s OPC UA server for event-driven subscriptions:

  1. Navigate to IoT Integration > OPC UA Server > Published Nodes

  2. For schedule-related nodes (WorkOrder, ProductionSchedule, OperationSequence), set:

    • MonitoringMode: Reporting (not Sampling)
    • SamplingInterval: 0 (event-driven, not time-based)
    • PublishingInterval: 500ms (how often to batch and send events)
    • QueueSize: 10 (buffer for burst updates)
  3. Enable the ScheduleChanged event type in your OPC UA event filter

  4. On HMI clients, subscribe to these events with MonitoredItemCreateRequest rather than polling Read requests

This shifts from “HMI asks every 10 minutes” to “MES pushes immediately when schedule changes.”

HMI Polling Interval Optimization: Even with event subscriptions, configure reasonable fallback polling:

  1. Set HMI OPC UA client KeepAlive to 30 seconds (detects connection issues)
  2. Configure fallback polling at 60-second intervals (only used if event subscription fails)
  3. Enable the DataChange notification filter with DeadbandType = Absolute, DeadbandValue = 0 (notify on any change)
  4. Verify HMI network connectivity allows persistent OPC UA sessions - some IoT gateways force reconnection which breaks subscriptions

REST Webhook Configuration: Your webhook structure looks correct, but verify these critical points:


// In SAP ERP - Configure outbound webhook trigger
Event: PRODUCTION_SCHEDULE_CHANGE
Trigger: On Save (immediate, not batch)
Endpoint: https://mes-server/api/v1/schedule/update
Timeout: 5000ms
Retry: 3 attempts with exponential backoff

In Smart Factory, verify the webhook endpoint handler:

  1. Check that /api/v1/schedule/update is mapped to ScheduleUpdateController
  2. Ensure authentication middleware validates the Bearer token correctly
  3. Add response logging to confirm SAP receives 200 OK acknowledgment
  4. Verify the endpoint immediately triggers OPC UA event publication (not queued for batch processing)

Critical: Your webhook handler should call publishScheduleChangeEvent() synchronously before returning 200 OK. If it queues the event for later processing, you’re adding unnecessary delay.

End-to-End Validation:

  1. Enable debug logging: Smart Factory > System > Logging > Set ‘ScheduleIntegration’ and ‘OPCUAServer’ to DEBUG level
  2. Make a test schedule change in SAP
  3. Verify in logs:
    • Webhook POST received within 1-2 seconds
    • OPC UA event published within 500ms of webhook
    • HMI client receives DataChange notification within 1 second
  4. Total end-to-end should be under 5 seconds from SAP save to HMI display

Common Pitfall: If you still see delays after fixing OPC UA, check if Smart Factory has a schedule cache refresh interval. Some versions batch schedule updates every 2 minutes for performance. Disable this cache for real-time schedule nodes in Production Scheduling > Advanced Settings > Real-time Mode = Enabled.

After implementing these changes, your schedule updates should reach HMIs in 3-5 seconds instead of 4-6 hours.

I’ve implemented this exact integration multiple times. The issue is almost always a combination of webhook timing and OPC UA subscription configuration. Let me give you the complete picture of what needs to be verified and fixed across all three components.

First check if the webhook is actually firing. Add logging on the MES side to capture incoming POST requests with timestamps. We had a case where the ERP webhook was configured but SAP wasn’t triggering it due to a missing event subscription in the ERP workflow.

What’s your HMI polling interval set to? Many IoT HMIs default to polling every 5-10 minutes to conserve bandwidth. If Smart Factory receives the update but your HMIs only check every 10 minutes, that explains the lag. Check the OPC UA client configuration on each HMI - you want event-driven subscriptions, not polling.