NHV Control v1

NHV Control v1 · GPT-Aktionen

Patlite Demo API

API for controlling LED units and buzzer output.

  • POST /nhvNH LED Speech Device Control

    Sends commands to control the LED units, buzzer, and text speech.

Ursprüngliches API-Schema
{
  "openapi": "3.0.0",
  "info": {
    "title": "Patlite Demo API",
    "description": "API for controlling LED units and buzzer output.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://next.2023-08-patlite-demo.ap30.ssdev2.com/api"
    }
  ],
  "paths": {
    "/nhv": {
      "post": {
        "operationId": "nhv_led_speech_device_control",
        "summary": "NH LED Speech Device Control",
        "description": "Sends commands to control the LED units, buzzer, and text speech.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "led_red": {
                    "type": "string",
                    "description": "LED unit (red).",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5",
                      "9"
                    ]
                  },
                  "led_yellow": {
                    "type": "string",
                    "description": "LED unit (yellow).",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5",
                      "9"
                    ]
                  },
                  "led_green": {
                    "type": "string",
                    "description": "LED unit (green).",
                    "enum": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5",
                      "9"
                    ]
                  },
                  "buz_pattern": {
                    "type": "string",
                    "description": "Buzzer output.",
                    "enum": [
                      "0",
                      "9"
                    ]
                  },
                  "speech": {
                    "type": "array",
                    "description": "Array of objects for text speech.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "maxLength": 400,
                          "description": "Text to be played."
                        },
                        "lang": {
                          "type": "string",
                          "enum": [
                            "jp",
                            "en"
                          ],
                          "description": "Language of the text."
                        },
                        "voice": {
                          "type": "string",
                          "enum": [
                            "male",
                            "female"
                          ],
                          "description": "Voice gender."
                        },
                        "speed": {
                          "type": "integer",
                          "minimum": -5,
                          "maximum": 5,
                          "description": "Speed of the voice."
                        },
                        "tone": {
                          "type": "integer",
                          "minimum": -5,
                          "maximum": 5,
                          "description": "Tone of the voice."
                        },
                        "notify": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10,
                          "description": "Notification sound before speech."
                        },
                        "notify_tail": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10,
                          "description": "Notification sound after speech."
                        },
                        "lineout": {
                          "type": "string",
                          "enum": [
                            "0",
                            "1"
                          ],
                          "description": "Line out output."
                        }
                      }
                    }
                  },
                  "clear": {
                    "type": "string",
                    "description": "Execute clear command.",
                    "enum": [
                      "1"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful operation"
          },
          "400": {
            "description": "Bad request"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    }
  }
}