Subscribe to WebSocket events

SUB /socket

WebSocket channel for events

Accepts one of the following messages.

SUBSCRIBE /socket

Simple Event Response

Payload

  • Response object
    Hide Response attribute Show Response attribute object
    • Event string

      The event name

      Values are API-CAPTURE-FINISHED, AUTOFOCUS-FINISHED, CAMERA-CONNECTED, CAMERA-DISCONNECTED, CAMERA-DOWNLOAD-TIMEOUT, DOME-CONNECTED, DOME-DISCONNECTED, DOME-SHUTTER-CLOSED, DOME-SHUTTER-OPENED, DOME-HOMED, DOME-PARKED, DOME-STOPPED, DOME-SLEWED, DOME-SYNCED, FILTERWHEEL-CONNECTED, FILTERWHEEL-DISCONNECTED, FLAT-CONNECTED, FLAT-DISCONNECTED, FLAT-LIGHT-TOGGLED, FLAT-COVER-OPENED, FLAT-COVER-CLOSED, FOCUSER-CONNECTED, FOCUSER-DISCONNECTED, FOCUSER-USER-FOCUSED, GUIDER-CONNECTED, GUIDER-DISCONNECTED, GUIDER-START, GUIDER-STOP, GUIDER-DITHER, IMAGE-PREPARED, MOUNT-CONNECTED, MOUNT-DISCONNECTED, MOUNT-BEFORE-FLIP, MOUNT-AFTER-FLIP, MOUNT-HOMED, MOUNT-PARKED, MOUNT-UNPARKED, MOUNT-CENTER, PROFILE-ADDED, PROFILE-CHANGED, PROFILE-REMOVED, ROTATOR-CONNECTED, ROTATOR-DISCONNECTED, ROTATOR-SYNCED, SAFETY-CONNECTED, SAFETY-DISCONNECTED, SEQUENCE-STARTING, SEQUENCE-FINISHED, SWITCH-CONNECTED, SWITCH-DISCONNECTED, WEATHER-CONNECTED, WEATHER-DISCONNECTED, ERROR-AF, or ERROR-PLATESOLVE.

  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "API-CAPTURE-FINISHED"
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

Image Save Event

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string
    • ImageStatistics object
      Hide ImageStatistics attributes Show ImageStatistics attributes object
      • ExposureTime number
      • Index number
      • Filter string
      • RmsText string
      • Temperature number
      • CameraName string
      • Gain number
      • Offset number
      • Date string
      • TelescopeName string
      • FocalLength number
      • StDev number
      • Mean number
      • Median number
      • Stars number
      • HFR number
      • IsBayered boolean
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "IMAGE-SAVE",
    "ImageStatistics": {
      "ExposureTime": 42.0,
      "Index": 42.0,
      "Filter": "string",
      "RmsText": "string",
      "Temperature": 42.0,
      "CameraName": "string",
      "Gain": 42.0,
      "Offset": 42.0,
      "Date": "string",
      "TelescopeName": "string",
      "FocalLength": 42.0,
      "StDev": 42.0,
      "Mean": 42.0,
      "Median": 42.0,
      "Stars": 42.0,
      "HFR": 42.0,
      "IsBayered": true
    }
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

Filter Changed Event

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string
    • Previous object
      Hide Previous attributes Show Previous attributes object
      • Name string
      • Íd integer
    • New object
      Hide New attributes Show New attributes object
      • Name string
      • Íd integer
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "FILTERWHEEL-CHANGED",
    "Previous": {
      "Name": "Filter 1",
      "Íd": 1
    },
    "New": {
      "Name": "Filter 2",
      "Íd": 2
    }
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

Flat Brightness Changed Event

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string
    • Previous integer

      Brightness in percent

      Minimum value is 0, maximum value is 100.

    • New integer

      Brightness in percent

      Minimum value is 0, maximum value is 100.

  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "FLAT-BRIGHTNESS-CHANGED",
    "Previous": 0,
    "New": 100
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

Safety Changed Event

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string
    • IsSafe boolean
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "SAFETY-CHANGED",
    "IsSafe": true
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

Live stack updated (requires Livestack >= 1.0.0.9)

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string
    • Filter string
    • Target string
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "STACK-UPDATED",
    "Filter": "RGB",
    "Target": "M31"
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

TS Wait Start Event

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string
    • WaitStartTime string
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "TS-WAITSTART",
    "WaitStartTime": "string"
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

TS (New) Target Start Event

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string

      Values are TS-NEWTARGETSTART or TS-TARGETSTART.

    • TargetName string
    • ProjectName string
    • Coordinates object
      Hide Coordinates attributes Show Coordinates attributes object
      • RA number
      • RAString string
      • RADegrees number
      • Dec number
      • DecString string
      • Epoch string

        Values are JNOW, B1950, J2000, or J2050.

      • DateTime object
        Hide DateTime attributes Show DateTime attributes object
        • Now string
        • UtcNow string
    • Rotation number
    • TargetEndTime string
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "TS-NEWTARGETSTART",
    "TargetName": "string",
    "ProjectName": "string",
    "Coordinates": {
      "RA": 42.0,
      "RAString": "string",
      "RADegrees": 42.0,
      "Dec": 42.0,
      "DecString": "string",
      "Epoch": "JNOW",
      "DateTime": {
        "Now": "string",
        "UtcNow": "string"
      }
    },
    "Rotation": 42.0,
    "TargetEndTime": "string"
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

Send WebSocket Event Instruction

Payload

  • Response string
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": "Test event",
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

Send Error to WebSocket Trigger

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string
    • Entity string
    • Error string
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "SEQUENCE-ENTITY-FAILED",
    "Entity": "Dew Heater",
    "Error": "Camera not connected"
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

Rotator moved

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string
    • From number
    • To number
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "ROTATOR-MOVED",
    "From": 0,
    "To": 100
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}

Rotator moved mechanical

Payload

  • Response object
    Hide Response attributes Show Response attributes object
    • Event string
    • From number
    • To number
  • Error string
  • StatusCode integer
  • Success boolean
  • Type string
Payload examples
{
  "Response": {
    "Event": "ROTATOR-MOVED-MECHANICAL",
    "From": 0,
    "To": 100
  },
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "Socket"
}