DigKick (Backend) 1.0.0

Digital system for kicker tables.

Servers

  • mqtt://kicker.local/mqttemqx

    The MQTT broker for development and production.

    Security:
    • User/Password

      Simple user password login to the broker.

Operations

  • RECEIVE /table/register

    Operation for a registration of a table with an id

    Operation IDkickerTableRegister

    Available only on servers:

    Accepts the following message:

    registerMessage

    A message which contains the information for a table registration.

    Message IDregisterMessage
    object

    Information for a table registration.

    Examples

  • RECEIVE /table/{tableName}/game/team/{teamColor}/button/{buttonId}

    Action on button press

    Operation IDbuttonPress

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"
    buttonId
    required
    string

    Identifier of a button.

      Examples values:
    • "1"
    • "2"
    • "3"

    Accepts the following message:

    pinOutMessage

    Action triggered by a pin output change.

    Message IDpinOutMessage
    object

    Defines the status of an analog or digital pin.

    Examples

  • RECEIVE /table/{tableName}/game/team/{teamColor}/light_barrier/{lightBarrierId}

    Action on a detection of the light barrier

    Operation IDlightBarrierDetect

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"
    lightBarrierId
    required
    string

    Identifier of a light barrier.

      Examples values:
    • "1"
    • "2"

    Accepts the following message:

    pinOutMessage

    Action triggered by a pin output change.

    Message IDpinOutMessage
    object

    Defines the status of an analog or digital pin.

    Examples

  • RECEIVE /table/{tableName}/game/team/{teamColor}/nfc-reader

    Read nfc chip serial number for player registration.

    Operation IDnfcReaderSerialUpdate

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    nfcReaderMessage

    Information from the nfc reader about the chip.

    Message IDnfcReaderMessage
    object

    Examples

  • RECEIVE /table/{tableName}/game/team/{teamColor}/changename

    Action to update the name of the player who registrated last to the table.

    Operation IDplayerNameUpdate

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    newPlayerNameMessage

    The new requested name for the last registered player.

    Message IDnewPlayerNameMessage
    object

    Examples

  • SEND /table/{tableName}/game

    Information about the game status.

    Operation IDgameStatus

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"

    Accepts the following message:

    gameStatusMessage

    All information about a team.

    Message IDgameStatusMessage
    object

    Describes all information about a game.

    Examples

  • SEND /table/{tableName}/game/team/{teamColor}

    Information about the team.

    Operation IDteamStatus

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    teamMessage

    All information about a team.

    Message IDteamMessage
    object

    Describes all information about a team.

    Examples

  • SEND /table/{tableName}/game/team/{teamColor}/color$

    Information about the team color.

    Operation IDteamColorStatus

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    teamColorMessage

    Information about the score of a team.

    Message IDteamColorMessage
    Payload
    string
      Allowed values:
    • "white"
    • "black"

    Examples

  • SEND /table/{tableName}/game/team/{teamteamColorId}/score$

    Information about the team score.

    Operation IDteamScoreStatus

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    teamScoreMessage

    Information about the score of a team.

    Message IDteamScoreMessage
    Payload
    integer
    >= 0

    Examples

  • SEND /table/{tableName}/game/team/winner

    Information about the score status of the winner team. Payload is empty when there is no winner at the moment.

    Operation IDwinnerTeamStatus

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    teamMessage

    All information about a team.

    Message IDteamMessage
    object

    Describes all information about a team.

    Examples

  • SEND /table/{tableName}/game/team/winner/color$

    Information about the score status. Payload is empty when there is no winner at the moment.

    Operation IDwinnerTeamColorStatus

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    scoreStatusMessage

    Information about the score of a team.

    Message IDscoreStatusMessage
    Payload
    string
      Allowed values:
    • "white"
    • "black"

    Examples

  • SEND /table/{tableName}/game/team/winner/score$

    Information about the score status. Payload is empty when there is no winner at the moment.

    Operation IDwinnerTeamScoreStatus

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    scoreStatusMessage

    Information about the score of a team.

    Message IDscoreStatusMessage
    Payload
    integer
    >= 0

    Examples

  • SEND /table/{tableName}/game/team/{teamColor}/display

    Display update

    Operation IDdisplayUpdate

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    displayMessage

    Updates the display with the given parameters.

    Message IDdisplayMessage
    object

    Describes where to put which text on the OLED display

    Examples

  • SEND /table/{tableName}/game/team/{teamColor}/leds

    LED(s) update

    Operation IDledUpdate

    Available only on servers:

    object
    tableName
    required
    string

    Identifier of a table.

      Examples values:
    • "table1"
    • "kjb14123b1jk"
    teamColor
    required
    string

    Identifier of a team.

      Examples values:
    • "white"
    • "black"

    Accepts the following message:

    ledMessage

    Updates the LEDs strip.

    Message IDledMessage
    object

    Describes how many LEDs are turned in which color(s). Also defines the transmission animation.

    Examples

  • SEND /api/player/all

    Publishes all the players here.

    Operation IDplayerScoreBoard

    Available only on servers:

    Accepts the following message:

    playerList

    List of all players sorted by elo score.

    Message IDplayerList
    array<object>

    Examples

Messages

  • #1tableRegisterMessage

    A message which contains the information for a table registration.

    Message IDtableRegisterMessage
    object

    Information for a table registration.

  • #2gameMessage

    All information about a team.

    Message IDgameMessage
    object

    Describes all information about a game.

  • #3teamMessage

    All information about a team.

    Message IDteamMessage
    object

    Describes all information about a team.

  • #4teamColorMessage

    Information about the score of a team.

    Message IDteamColorMessage
    Payload
    string
      Allowed values:
    • "white"
    • "black"
  • #5teamScoreMessage

    Information about the score of a team.

    Message IDteamScoreMessage
    Payload
    integer
    >= 0
  • #6pinStatusMessage

    Action triggered by a pin output change.

    Message IDpinStatusMessage
    object

    Defines the status of an analog or digital pin.

  • #7displayUpdateMessage

    Updates the display with the given parameters.

    Message IDdisplayUpdateMessage
    object

    Describes where to put which text on the OLED display

  • #8ledUpdateMessage

    Updates the LEDs strip.

    Message IDledUpdateMessage
    object

    Describes how many LEDs are turned in which color(s). Also defines the transmission animation.

  • #9nfcReaderMessage

    Information from the nfc reader about the chip.

    Message IDnfcReaderMessage
    object
  • #10newPlayerNameMessage

    The new requested name for the last registered player.

    Message IDnewPlayerNameMessage
    object
  • #11playerEntityListMessage

    List of all players sorted by elo score.

    Message IDplayerEntityListMessage
    array<object>

Schemas

  • gameMode
    string
      Allowed values:
    • "DEFAULT"
  • pinOut
    string
      Allowed values:
    • "HIGH"
    • "LOW"
  • object

    Defines the status of an analog or digital pin.

  • object

    Describes all information about a game.

  • object

    Describes all information about a team.

  • score
    integer
    >= 0
  • color
    string
      Allowed values:
    • "white"
    • "black"
  • object
  • object
  • object

    Describes where to put which text on the OLED display

  • object

    Describes how many LEDs are turned in which color(s). Also defines the transmission animation.

  • id
    number

    Identifier of the entity

  • createdAt
    string

    Holds the date as string when this entity got created

  • updatedAt
    string

    Holds the date as string when this entity got updated the last time

  • object
  • array<object>