Barrier
Get the BarrierState
This returns the BarrierState.
URL parameters
hostIp: Ip address of the API host.
deviceId: id of the barrier.
- GET https://{hostIp}:7081/hal/devices/{deviceId}/barrier
Example request:
GET /hal/devices/smartonemodule1/barrier HTTP/1.1 Accept: application/json Authorization: Bearer eyJhbGciOiJS...
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 4
- Status Codes:
200 OK – OK
400 Bad Request – Bad Request. A descriptive error comes along with this error.
401 Unauthorized – Unauthorized. Something is wrong with the Authorization header of the request
403 Forbidden – Forbidden. Something is wrong with the claims of the user.
500 Internal Server Error – Internal Server Error
- Response Headers:
Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)
- Response JSON Object:
barrierStatus (int) – see Barrier status
Pulse actions
PulseOpen
This will open and close the barrier. It will close after it is safe to close (if configured to close automatically).
URL parameters
hostIp: Ip address of the API host.
deviceId: id of the barrier.
- POST https://{hostIp}:7081/hal/devices/{deviceId}/barrier/pulseopen
Example request:
POST /hal/devices/smartonemodule1/barrier/pulseopen HTTP/1.1 Accept: application/json Authorization: Bearer eyJhbGciOiJS... Content-Type: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
- Status Codes:
200 OK – OK
401 Unauthorized – Unauthorized. Something is wrong with the Authorization header of the request
403 Forbidden – Forbidden. Something is wrong with the claims of the user.
500 Internal Server Error – Internal Server Error
PulseClose
This call will close the barrier, after it is opened by PulseOpen.
This call is analogue to PulseOpen.
- POST https://{hostID}:7081/hal/devices/{deviceId}/barrier/pulseclose
Force to continuous position
Continue Open
A barrier can be locked in the “open” position:
When continue open is set, the PulseOpen and PulseClose methods, will not have any affect and the barrier will stay open.
To release the barrier from the open position, reset the continu open status.
Get Continue Open
URL parameters
hostIp: Ip address of the API host.
deviceId: id of the barrier.
- GET https://{hostIp}:7081/hal/devices/{deviceId}/barrier/continueopen
Example request:
GET /hal/devices/smartonemodule1/barrier/continueopen HTTP/1.1 Accept: application/json Authorization: Bearer eyJhbGciOiJS...
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 false
- Status Codes:
200 OK – OK
400 Bad Request – Bad Request. A descriptive error comes along with this error.
401 Unauthorized – Unauthorized. Something is wrong with the Authorization header of the request
403 Forbidden – Forbidden. Something is wrong with the claims of the user.
500 Internal Server Error – Internal Server Error
- Response Headers:
Content-Type – defines the serialization format for the response body (this depends on the Accept header of the request)
- Response JSON Object:
value (boolean) – true is set, false is reset.
Set Continue Open
When the Continu Open is set:
The barrier will open and remain open.
The PulseOpen and PulseClose will have no effect.
URL parameters
hostIp: Ip address of the API host.
deviceId: id of the barrier.
- PUT https://{hostIp}:7081/hal/devices/{deviceId}/barrier/continueopen
Example request:
PUT /hal/devices/smartonemodule1/barrier/continueopen HTTP/1.1 Accept: application/json Authorization: Bearer eyJhbGciOiJS... Content-Type: application/json true
- JSON Parameters:
value (bool) – true or false can be used. Not {true} and not {false}. Don’t use curly brackets in the body of the call.
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
- Status Codes:
200 OK – OK
401 Unauthorized – Unauthorized. Something is wrong with the Authorization header of the request
403 Forbidden – Forbidden. Something is wrong with the claims of the user.
500 Internal Server Error – Internal Server Error
Continue Closed
When Continue Closed is set:
The barrier will close.
The PulseOpen and PulseClose will have no effect.
When Continue Closed is reset, the PulseOpen and PulseClose commands will function as expected.
Get Continue Closed
This call is analog with Get Continue Open.
- GET https://{hostIp}:7081/hal/devices/{deviceId}/barrier/continueclosed
Set Continue Closed
This call is analogue with Set Continue Open.
- PUT https://{hostID}:7081/hal/devices/{deviceId}/barrier/continueclosed
Enumeration values
Enumeration Barrier States
This indicates the position or motion of a barrier.
Unknown = 0
Open = 1
Opening = 2
Closing = 3
Closed = 4
Error = 5
Events
Barrier Events
The websocker server will send BarrierState updates to a registered websocket client. The websocket - method name will be “receiveBarrierState”.
Example of an event after a BarrierState change:
"messageType":1,
"data":
{
"methodName":"receiveBarrierState",
"arguments":[
{
"barrierState": 2,
"deviceId": "smartonemodule1",
"version": "1.0"
}
]
}