7. Lightware REST API Reference
UCX series – User's Manual
99
Applied firmware package: v1.2.0b9 | LDC software: v2.5.10b1
7.18. OCS Port Configuration
7.18.1. Querying the Input Level of an OCS Pin
Request and Response
#ocs
ɯ
header:
GET·http://
<ip>
/api/V1/MEDIA/OCS/P1/InputLevel·HTTP/1.1
ɮ
header: 200·OK
ɮ
body:
<value>
Parameters
Parameter
Parameter description
Value
Value description
<value>
The input value of the OCS pin.
High
high level
Low
low level
Example
ɯ
header:
GET http://192.168.0.50/api/V1/MEDIA/OCS/P1/InputLevel HTTP/1.1
ɮ
header:
200 OK
ɮ
body:
Low
7.18.2.
Set the Sensor Type
Request and Response
ɯ
header:
POST·http://
<ip>
/api/V1/MEDIA/OCS/P1/SensorType·HTTP/1.1
ɯ
body:
<sensor_type>
ɮ
header:
200 OK
ɮ
body:
<sensor_type>
Parameters
Parameter
Parameter description
Value
Value description
<sensor_type>
It defines that the low or high
input level means the occupancy.
Active low
Occupancy status is
'Occupied' when the
input level is low.
Active high
Occupancy status is
'Occupied' when the
input level is high
(default value).
Example
ɯ
header:
POST http://192.168.0.50/api/V1/MEDIA/OCS/P1/SensorType HTTP/1.1
ɯ
body:
Active low
ɮ
header:
200 OK
ɮ
body:
Active low
7.18.3. Querying the Reported OCS State
Request and Response
ɯ
header:
GET·http://
<ip>
/api/V1/MEDIA/OCS/P1/State·HTTP/1.1
ɮ
header: 200·OK
ɮ
body:
<status>
Parameters
Parameter
Parameter description
Value
Value description
<status>
It reports the occupancy
state of the room depending
on the sensor type.
Free
When the SensorType=Active high and the
Inputlevel=Low or
when SensorType=Active low and Inputlevel=High
Occupied
When the SensorType=Active high and the
Inputlevel=High or
when SensorType=Active low and Inputlevel=Low
Example
ɯ
header:
GET http://192.168.0.50/api/V1/MEDIA/OCS/P1/State HTTP/1.1
ɮ
header:
200 OK
ɮ
body: Free