LogoLogo
OverviewDemos and ResourcesContact
  • What is Engine?
  • Key Concepts
    • Drivers
    • Modules
    • Systems
    • Zones
    • Settings
    • Interfaces
    • Triggers
  • Security
  • Deployment
    • System Architecture
    • Single Sign-On
      • Configuring Engine for SAML2
      • SAML2 with Azure AD
      • SAML2 with ADFS
      • SAML2 with Auth0
      • SAML2 with GSuite
      • OAuth2
  • Integrations
    • Supported Integrations
    • Directory Services
      • Microsoft Office365
    • IoT
      • Device Drivers
      • Node-RED
      • Azure IOT Hub
    • Location Services
      • Locating Users on a Network
      • SVG Map Creation
      • Cisco CMX
      • Cisco Meraki RTLS
      • Desk Sensors
  • Administration
    • Backoffice
      • Systems
      • Devices
      • Drivers
      • Zones
      • Triggers
      • Metrics
      • Users
      • Domains
        • Applications
  • Developer Guide
    • Development Environment
    • Building Drivers
      • Discovery and Metadata
      • State
      • Scheduling Actions
      • Response Tokenisation
      • Device Drivers
      • SSH Drivers
      • Service Drivers
      • Logic Drivers
      • Testing
      • Live Monitoring
      • Logging
      • Security
      • Utilities and Helpers
    • User Interfaces
      • Composer
      • Virtual Systems
      • Widgets
      • Settings.json
  • API
    • Authentication
    • Control
      • Systems
      • Modules
      • Dependencies
      • Zones
      • Websocket
        • Commands
          • bind
          • unbind
          • exec
          • debug
          • ignore
        • Heartbeat
        • Errors
  • Support
    • Service Desk
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. Control
  3. Websocket
  4. Commands

bind

The bind command is used to subscribe module state changes on the current connection. When creating the binding, the current state will be returned immediately.

Bindings are ephemeral, being discarded when the connection is closed.

{
    "id": 1,                 // tracking id, to pair request and response
    "cmd": "bind",           // request type
    "sys": "sys-OEtOZqd_2J", // the system containing the target
    "mod": "Display",        // module name
    "index": 1,              // module index in the system
    "name": "power"          // status variable you are interested in
}

A typical response to the above request:

{
    "id": 1,                  // tracking id
    "type": "success",        // request status (success or error)
    "meta": {                 // meta data that might be useful
        "sys": "sys-YNQ8uNfJvF",
        "mod": "Display",
        "index": 1,
        "name": "power"
    }
}

Once an active binding is in place, the server will push value changes.

{
    "type": "notify",
    "value": true,
    "meta": {
        "sys": "sys-YNQ8uNfJvF",
        "mod": "Display",
        "index": 1,
        "name": "power"
    }
}
PreviousCommandsNextunbind

Last updated 6 years ago

Was this helpful?