CreatorCreator
Home
Getting Started
  • 中文简体
  • English
Home
Getting Started
  • 中文简体
  • English
  • Creator

    • Getting Started
  • Stream Dock

    • Plugin SDK
    • Icon Pack

      • Overview
      • Terminology
      • Creating an Icon Pack
      • Icon Specifications
    • Scene Configuration

      • What is a Scenario Configuration?
      • Exporting
      • Use Cases
  • mPanel

    • Plugin SDK
  • Cpp SDK

    • Overview
    • Dependency Installation
    • Device Manager
    • StreamDock Base Class
    • Communication Transport
    • Example
    • API Reference
    • Source Code
  • Python SDK

    • Overview
    • Dependency Installation
    • Device Manager
    • StreamDock Base Class
    • API Reference
    • Examples
    • Source Code
  • Windows-WebSocket SDK

    • Overview
    • Getting Started
    • Events Sent
    • Events Received
    • Source Code
  • Support

    • Help and Bug Reporting

Events Received

After you connect to the StreamDock SDK, you will receive the following event notifications:

Event TypeDescription
deviceDidConnectDevice connected
deviceDidDisconnectDevice disconnected
readKey and knob operation events
getFirmVersionFirmware version query result

deviceDidConnect

This event is received when a new StreamDock device is connected to your computer.

{
    "event": "deviceDidConnect",
    "path": "Unique device identifier",
    "payload": {
        "Path": "Device path",
        "VendorID": 1234,
        "ProductID": 5678,
        "SerialNumber": "SN123456",
        "Manufacturer": "ManufacturerName",
        "Product": "ProductName",
        "FirmwareVersion": "1.0.0",
        "ReleaseNumber": 1,
        "Type": "N4Pro"
    }
}

Event Description:

  • event: Event type, fixed as "deviceDidConnect"
  • path: Unique device identifier, required for subsequent operations
  • payload: Contains detailed device information

Usage Recommendations:

  • After receiving this event, you can start setting the device background and key icons
  • It's recommended to save the device path for subsequent operations

deviceDidDisconnect

This event is received when the StreamDock device is disconnected from the computer.

{
    "event": "deviceDidDisconnect",
    "path": "Unique device identifier",
    "payload": {
        "Path": "Device path",
        "VendorID": 1234,
        "ProductID": 5678,
        "SerialNumber": "SN123456",
        "Manufacturer": "ManufacturerName",
        "Product": "ProductName",
        "FirmwareVersion": "1.0.0",
        "ReleaseNumber": 1,
        "Type": "N4Pro"
    }
}

Event Description:

  • event: Event type, fixed as "deviceDidDisconnect"
  • path: Unique identifier of the disconnected device
  • payload: Contains detailed information of the disconnected device

Usage Recommendations:

  • After receiving this event, you should stop operations on this device
  • You can update the UI state to notify the user that the device has been disconnected

read

Key events and knob events (reading will only start after sending a read event)

Key events

{
    "event": "read",
    "path": "path",
    "payload": {
        "keyId": 5,
        "keyUpOrKeyDown": "keyDown"
    }
}
MemberDescription
eventread
pathDevice path (unique identifier)
payloadjson

The payload object contains the following members:

payloadDescription
keyIdKey number (starts from 1)
keyUpOrKeyDownKey press (keyDown) or release (keyUp)

Knob rotation events

{
    "event": "read",
    "path": "path",
    "payload": {
        "knobId": 1,
        "direction": "left"
    }
}
MemberDescription
eventread
pathDevice path (unique identifier)
payloadjson

The payload object contains the following members:

payloadDescription
knobIdKnob number (starts from 1)
directionRotation direction ("left" or "right")

Knob press events

{
    "event": "read",
    "path": "path",
    "payload": {
        "knobId": 1,
        "state": "pressed"
    }
}
MemberDescription
eventread
pathDevice path (unique identifier)
payloadjson

The payload object contains the following members:

payloadDescription
knobIdKnob number (starts from 1)
stateState ("pressed")

Swipe events

{
    "event": "read",
    "path": "path",
    "payload": {
        "direction": "left"
    }
}
MemberDescription
eventread
pathDevice path (unique identifier)
payloadjson

The payload object contains the following members:

payloadDescription
directionSwipe direction ("left", "right")

getFirmVersion

Return value of getFirmVersion

{
    "event": "getFirmVersion",
    "path": "path",
    "payload": {
        "firmVersion": "firmVersion"
    }
}
MemberDescription
eventgetFirmVersion
pathDevice path (unique identifier)
payloadjson

The payload object contains the following members:

payloadDescription
firmVersionDevice firmware version number
Last Updated:
Contributors: JKWTCN
Prev
Events Sent
Next
Source Code