Skip to content

Integration Hub (Developer) ​

Migrations: 0026_integrations.sql, 0027_integration_settings.sql, 0028_integration_mqtt_type.sql.

API (JWT) ​

  • GET/POST/PATCH/DELETE /api/integrations
  • POST /api/integrations/preview (mapping + optional script)
  • POST /api/integrations/:id/set-default|start|pause
  • GET /api/integrations/:id/events
  • POST /api/integrations/:id/downlink — ChirpStack / TTN (path uses the device’s 16-hex LoRaWAN DevEUI from lorawan.dev_eui / integration.lorawan.dev_eui; not integration.external_id)
    • Body: deviceId, payload (hex by default; encoding: "base64" for base64), optional fPort (integer 1–223), optional confirmed (ChirpStack queue + TTS downlinks[].confirmed), optional ttnDeviceId
    • Strict validation: non-integer fPort, malformed base64, and non-hex digits in hex payloads are rejected (no silent strip/convert)

Ingest ​

  • HTTP named / legacy type URLs (X-Webhook-Secret)
  • MQTT: IntegrationMqttBridgeService connects when status=active

Settings (settings_json) ​

  • autoCreateDevice
  • mqtt — brokerUrl, topicFilter, topicDeviceRegex, credentials
  • scriptTransform — { enabled, source } sandboxed JS
  • downlink — ChirpStack / TTN API credentials

Rule Engine ​

  • Node integration_downlink → IntegrationDownlinkService.sendDownlink
  • Wired from RuleEngineExecutorService when ConnectivityModule is loaded

Runtime order ​

  1. Adapter normalize
  2. Pipeline mapping steps
  3. Optional script transform
  4. Device resolve (+ auto-create)
  5. Telemetry ingest → Rule Engine

Kill switch: INTEGRATIONS_MAPPING_ENABLED=false.

support@autoconnecto.in · founder@autoconnecto.in · +91 92121 00555 · app.autoconnecto.in