Inputs

Get all device inputs

Returns all available inputs and their (logical) state. See SupportedDevices to learn more about what inputs are available.

URL parameters

  • hostIp: Ip address of the API host.

  • deviceId: id of the device.

GET https://{hostIp}:7081/hal/devices/{deviceId}/inputs

Example request:

GET /hal/devices/smartonemodule1/inputs HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[
  {
      "value": 0,
      "name": "in_continuous_close"
  },
  {
      "value": 0,
      "name": "in_continuous_open"
  },
  {
      "value": 0,
      "name": "in_pulse_open"
  },
  {
      "value": 0,
      "name": "in_pulse_close"
  },
  {
      "value": 0,
      "name": "in_security_1"
  },
  {
      "value": 0,
      "name": "in_security_2"
  }
]
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:
  • inputs (array) – array with inputs and their logical values (0 or 1)

Get one or more inputs

Returns all desired inputs and their (logical) state.

URL parameters

  • hostIp: Ip address of the API host.

  • deviceId: id of the device.

  • inputName1 / inputName2: See SupportedDevices to learn more about what inputs are available.

GET https://{hostIp}:7081/hal/devices/{deviceId}/inputs?inputName={inputName1}&inputName={inputName2}

Example request:

GET /hal/devices/smartonemodule1/inputs?inputName=in_continuous_close&inputName=in_continuous_open HTTP/1.1
Accept: application/json
Authorization: Bearer eyJhbGciOiJS...

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[
  {
      "value": 0,
      "name": "in_continuous_close"
  },
  {
      "value": 0,
      "name": "in_continuous_open"
  }
]
Status Codes:
Response Headers:
  • Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)

Response JSON Object:
  • inputs (array) – array with inputs and their logical values (0 or 1)

Events

Input Events

The websocket server will send input state change updates to a registered websocket client. The websocket - method name will be “receiveInputs”.

See SupportedDevices to learn more about what inputs are available.

Example of an event after an input state change:

"messageType": 1,
"data":
{
    "methodName": "receiveInputs",
    "arguments": [
    {
        "inputs": [
        {
            "deviceId": "smartonemodule1", //do not use this property, will be removed soon!
            "name": "in_security_1",
            "value": 0
        }],
        "deviceId": "smartonemodule1",
        "version": "1.0"
    }
]}