Howen VSS Web API V1.7R1 en 20210723
Howen VSS Web API V1.7R1 en 20210723
Howen VSS Web API V1.7R1 en 20210723
3.11 Video file query interface, add a new function: search center
video files
V1.7R1 2021.7.23
5.5 Server alarm small video playback web page URL, added:
playback server recording clip
Howen VSS Web API
1. Integration Guideline
Architecture 1: Forward data to the FMS client through the FMS backend
Note: With this solution, because the browser and VSS Web Server prohibit cross-domain access by default, you need
to contact VSS technical support to open the Nginx proxy service. Note: Websocket doesn’t have this issue
1. Before the Websocket client connects to the websokcet server, it must obtain the session token and pid
parameters through the login interface in the http api.
2. Initiate a connection to the websocket server and establish a websocket communication link
3. Client initiates a login instruction to the web server, action=80000
4. Client initiates a message subscription instruction to the web server, action=80001, after completing the message
subscription, it waits for the server to actively push gps/alarms and other messages to the client
2. Transmission Protocol
This interface includes two transmission protocol: HTTP Post and WebSocket.
The interface service: HTTP is provided by the VSS platform and follows the HTTP standard
protocol (RFC2626)
Howen VSS Web API
(2) JSON
"token":"2a545efadfpqoweirsdfs",
"para1":"value1",
"para2":"value2"
2. For Get method, the request parameters are involved in the URL, as
below:
http://192.168.1.2:9966/vss/login.action?
callback=_getDataFromVss&token=2a545efadfpqoweirsdfs¶1=value1¶2=value2
Max
Name Type Necessary Details
length
JSON type
For the domain access ,the JSON data returned in the Message Body. MIME
type: Content-type: text/html; charset=utf-8
JSON data follow the "RFC 4627"
Max
Name Type Necessary Details
length
{
"status": 10000,
"msg": "Success",
"data": {
"para1":"value1",
"para2":"value2"
}
}
Both the request data and the returned data adopts UTF-8
2.1.6. HTTPS
The https server default port is 443 port, and the other request format is the same as http.
All type of the message subscription and the real-time message pushing interfaces adopt the "WebSocket"
protocol (RFC6455). In addition, the transmission data adopts JSON format. (The messages described in
this document mainly refer to device GPS message, Alarm message, Online /Offline message and so
on)
Howen VSS Web API
Password
password string yes 3392e4fccc7d748b04a7046b897d75as
md5 string
{
"username":"admin",
"password":"3392e4fccc7d748b04a7046b897d75as"
}
{
"status": 10000, // Return status code, refer to return code table
"msg": "Success", // Indication message
"data": { //Return data
"token": "3df52ffe70314f69e7ecad41350eb78e" //token for api request
"pid":
"b9c7f86sdeg6f7e4799cefgaaeed465dc1cc704cb1db207bdab9c1758ad39bd187d350fa949b2ff9ddda8436
467b1" //pid, used to subscribe to WebSocket request for real-time messages
}
}
Cookie:
JSESSIONID=DB8E82C963EC
9EC0E9E92C864FC1B0AB
{
"status": 10003, // Status code, refer to the return code table
"msg": "Server error", //Indication
"data": null
}
{
"status": 10000, // Return status code, refer to return code table
"msg": "Success", //Return Indication
"data": null
}
{
"status": 10003,
"msg": "Server Error",
//Indication
"data": null
}
{
"token":"2sdfgfytwret2asdfhgyh",
"deviceID":"99990001",
"deviceName":"90001",
"deviceType":"Hero-ME41-04",
"channelName":"ch1;ch2;ch3;ch4",
}
{
"status": 10000,
"msg": "Success",
"data": null
}
{
"status": 10003,
"msg": "Server error", //Indication
"data": null
}
{
"token":"2sdfgfytwret2asdfhgyh",
"deviceID":"99990001",
"deviceName":"90001",
"channelName":"ch1;ch2;ch3;ch4",
}
{
"status": 10000,
"msg": "Success",
"data": null
}
{
"status": 10003,
"msg": "Server error", //Indication
"data": null
}
{
"token":"2sdfgfytwret2asdfhgyh",
"deviceID":"99990001",
}
{
"status": 10000,
"msg": "Success",
"data": null
}
{
"status": 10003,
"msg": "Server error", //Indication
"data": null
}
"keyword":""
]
}
{
"token":"2sdfgfytwret2asdfhgyh",
"deviceID":"99990001",
}
Example
Parameters Type Length Necessary Details
Value
{
"status": 10000,
"msg": "Success",
"data":
{
"queryTime":"2020-07-06 12:12:12",
"accessMode": -1,
"lastOnlineTime":"2020-07-06 12:12:12",
"lastOfflineTime":"2020-07-06 14:12:12"
}
{
"status": 10003, "msg": "Server Error",
"data": null
}
"data": [
{
"guid": "D02B567A-3ACD4C80-A1FC05C6-38F8BB29",
"deviceguid": "10001",
"deviceName": "10001",
"longitude": 113.946609,
"latitude": 22.5581837,
"altitude": 52.0,
"createtime": "2021-03-02 11:19:38",
"speed": "0",
"precision": "1",
"direct": "36",
"satellites": "3",
"mode": "1",
"urgency": "0",
"stateJson": "{\"mileage\":...}", //all State raw data json
"overSpeed": "0",
"accState": "1",
"lowSpeed": "0",
"recordState": "255",
"ioState": "1",
"oilVolume": 0.0,
"videoMaskState": "0",
"videoLostState": "252",
"tempeAndHumidity": [
"0",
"0",
"0",
"0",
"0",
"0"
],
"isLater": 0,
"reportTime": "2021-03-02 11:19:39",
},
]
}
Example
Parameters Type Length Necessary Details
Value
2017-01-
beginTime string
yes Begin time 23
12:12:12
2017-01-
endTime string
yes End time 23
13:12:12
{
"token":"2sdfgfytwret2asdfhgyh",
"deviceID":"99990001",
"pageNum":"1",
"pageCount":"200",
"beginTime":"2017-01-23 12:12:12",
"endTime":"2017-01-23 12:12:12"
}
In the return JSON data object, include all GPS location object and Mileage object array.
Example
Parameters Type Length Necessary Details
Value
degrees. The
direct number yes north is 0
degree, increasing
clockwise.
Example
Parameters Type Length Necessary Details
Value
{
"status": 10003,
"msg": "Server Error",
"data": null
}
{
"status": 10000,
"msg": "Success",
"data": {
"totalCount": 1985,
"pageCount": 100,
"fromCount": 1,
"toCount": 100,
"totalNum": 20,
"pageNum": 1,
"dataList": [
{
"guid": "D02B567A-3ACD4C80-A1FC05C6-38F8BB29",
"deviceguid": "10001",
"deviceName": "10001",
"longitude": 113.946609,
"latitude": 22.5581837,
"altitude": 52.0,
"createtime": "2021-03-02 11:19:38",
"speed": "0",
"precision": "1",
"direct": "36",
"satellites": "3",
"mode": "1",
"urgency": "0",
"stateJson": "{\"mileage\":...}", //status raw data
"overSpeed": "0",
"accState": "1",
"lowSpeed": "0",
"recordState": "255",
"ioState": "1",
"oilVolume": 0.0,
"videoMaskState": "0",
"videoLostState": "252"
"tempeAndHumidity": [
"0",
"0",
Howen VSS Web API
"0",
"0",
"0",
"0"
],
"isLater": 0,
"reportTime": "2021-03-02 11:19:39",
},
]
}
Examples of returned data in other cases
{
"status": 10003,
"msg": "server error",
"data": null
}
Example
Parameters Type Length Necessary Details
Value
2017-01-
2017-01-
{
"token":"2sdfgfytwret2asdfhgyh",
"deviceID":"99990001",
"pageNum":"1",
"pageCount":"200",
"beginTime":"2017-01-23 12:12:12",
"alarmType":""
}
In the return JSON data object, include the Paging parameters and Alarm object array.
Example
Parameters Type Necessary Details
Value
Example
Parameters Type Necessary Details
Value
AlarmGps String
GPS coordinates when the alarm occurs
113.946564,22.5
Speed String The speed of the vehicle at the time the
582962
warning occurred
Islater Number
Whether to retransmit dataor not
2021-03-02
repoerTime String Time for reporting to the platform
11:19:38
Howen VSS Web API
Request succeed return data example:
{
"status": 10003,
"msg": "Server Error",
"data": null
}
Example
Parameters Type Length Necessary Details
value
Number of per
2017-01-
2017-01-
{
"token":"2sdfgfytwret2asdfhgyh",
"deviceID":"99990001",
"pageNum":"1",
"pageCount":"200",
"beginTime":"2017-01-23 12:12:12",
"alarmType":""
}
In the return JSON data object, include the paging parameters and online/offline object array.
Example
Parameters Type Necessary Details
value
Example
Parameters Type Necessary Details
value
{
"status": 10000, // Return status code, refer to return code table
"msg": "Success", //Return info
"data":
{
"totalCount": 12, //Total count
"pageCount":10, //count on each page,-1 mean check all
"fromCount": 11, //Count starting from current page
"toCount": 12, // Count ending to current page
"totalNum": 2, //Total page count
"pageNum":2, //Current page number
"dataList":
[
{
"guid":"0E4732CB-59D74CDA-B410C76D-D3268B65",
"deviceID":"999908",
"accessmode":"-1", "createtime":"2020-08-04
15:49:56"
},
]
}
}
{
"status": 10003,
"msg": "Server Error",
"data": null
}
Howen VSS Web API
Example
Parameters Type Length Necessary Details
value
2017-12-
2017-12-
1-Device
location Int yes 1
2-Automatic Download Server
4-Alarm small video server
(including hftp small video and
platform alarm triggered small
video)
5-Server recording files
scheme string no Video download address https
protocol type.
It can only be http or https,
default http
{
"token":"2sdfgfytwret2asdfhgyh",
"deviceID":"99990001",
"startTime":"2017-12-20 00:00:00",
"endTime":"2017-12-20 21:00:00",
"channelList":"1;2",
"fileType":"1",
"location":"1"
}
In the return JSON array object: Files and array element object parameters show as below:
Example
Parameters Type Length Necessary Details
value
{
"status": 10003,
"msg": "Server Error",
"data": null
}
],
}
Other conditions
{
"status": 10003,
"msg": "Server Error",
"data": null
}
Example
Parameters Type Length Necessary Details
value
1--restart
action number yes 2--Restore factory settings
3--Pan-tilt
4--Image capture
5--Restore the oil circuit
6--cut off the oil circuit
7--Restore circuit
8--cut off the circuit
9--G-Sensor Calibration
Detailed parameters of image capture command
64 1;3;5;6
channelList string Channel list, pass; split, start
from 1. Only valid for snapshot
"username": "",
"deviceNo": "girlfriend",
"channel": "1",
"resDeviceFileName": "",
"fileFormat": "mp4",
"token": "f02cfa1cd21138ac89f7f1a32f8339be",
"lang": "zh_CN"
"data":
"taskId":"20198002_20201212102810_20201212103810_1_mp4",
Howen VSS Web API
"fileServerHost":"http://172.16.50.210:9988",
"resWebPath":"/vssFiles/webdown/20198002/20201212102810_20201212
103810_1.mp4",
"repeat":0
}
}
Returned data object parameters:
Parameters Type Leng Necessary Details Example value
th
"status": 10003, //status code, refer to Error code for HTTP interface
"data": null
token
taskId String 128 yes Task UUID
resWebPath string 256 yes The web address
of the final video
file.
Howen VSS Web API
"status": 10000, //Return code, refer to Error code for HTTP interface
"data":
"taskId":"20198002_20201212102810_20201212103810_1_mp4",
"downState":-1,
"progress":81,
}
}
Returned data object parameters:
Parameters Type Leng Necessary Details Example value
th
"data": null
token
username string 32 yes Download user 1
...
"data": null
}
"data": null
Request parameter
Parameters Type Len Necess Details Example value
gth ary
"data": {
"dataList": [
Howen VSS Web API
{
"guid":"20198002_20201212102810_20201212103810_1_m
p4"
"deviceNo":"20198002", //device id
"createTime":"2020-11-01 12:22:11",//Task
creation time
"resDeviceFilePath":"/mnt/123/345/3456/67/1221323.avi",
"resWebPath":"/vssFiles/webdown/20198002/202012121028
10_20201212103810_1.mp4",
"downUrl":"http://172.16.50.210:9988/api/fileDown.php?file
Path=RDovc29mdHdhcmUvaHRkb2NzL3Zzc0ZpbGVzL3dlYmRvd24vMjAxOTgwM
DJfMjAyMTAzMTYwMDAwMDBfMjAyMTAzMTYwMDA4MDBfMS5tcDQ=&to
ken=b791530c09905a8ef421e3a1c1b92521",
downUrl composition:
1 filePath is a string (filePathBase64) after the base64 of the file path. The path supports
full absolute path and web absolute path;
2 token,should be md5(privatekey+filePathBase64)
"data": null
Subscribe to real-time information including device online or offline, alerts/events, GPS status, and
more.
0~359°
location.speed Number Yes Speed, unit: KM/H
location.altitude String Yes
Altitude(meter)
location.precision Number Yes Positioning
precision(meter)
location.longitude String Yes longitude 114.106476
location.latitude String Yes latitude 22.5767326
payload.module Module state object
module.mobile Number
Mobile Network
module status, (0:the
unknown,1:work,2:abn
ormal,3:not exist)
"action": "80003",
"payload": {
"longitude": "114.106476",//Longitude
"latitude": "22.5767326"//Latitude
},
"mobile": "1",
"location": "1",
"wifi": "1",
"gsensor": "1",
"record": "0xf" //Channel recording state, BIT0 corresponds to the first video,
and so on
},
"basic":{
{
Howen VSS Web API
"index" : "0", //Serial number
],
}
}
"action": "80005",
"payload": {
Json example:
"action": "80004",
"payload": {
"payload": {
"det": { //detail
},
"location":
"mode":"1",
"dtu":"2021-01-25 17:31:59",
"direct":"0",
"satellites":"0",
"speed":"19",
"altitude":"1833",
"precision":"5",
"longitude":"114.111992",
"latitude":"22.5380726"
},
}
}
Howen VSS Web API
(1) token, required parameter ,Yes the string of tokens returned after successful login through the HTTP API
login interface
(4) stream, required parameter,Stream code,1 represents the main-stream,0 represents the first sub-stream
(5) wnum, optional parameter , Default window number (Required is one of 1/4/6/9/16) , when less than the
(6) panel,optional parameter,whether to display the window layout panel. 1.display(default), 0 not display.
Note: if needs to control multiple screens by yourself, you can open one channel at a time, and make a
configuration wnmu=1,panel=0。
(7) buffer, optional parameter, video buffer time, in milliseconds, default 2000. For mobile app, it is
recommended to set to 0
Note: If needs to control multiple channels, you can open one channel at a time and set wnmu=1,panel=0
(1) Token parameter,the string of tokens returned after successful login through the HTTP API login interface
All of them are the same except that the port is different (using the default port of 443),as follows:
(4) token, required parameter,The string of tokens returned after successful login through the HTTP API login
interface
(5) deviceId, required parameter,the device ID of the device which needs to play
(6) chs, required parameter,A list of channels, with each channel number separated by an underscore "_"
(8) wnum, optional parameter , Default window number (Required is one of 1/4/6/9/16) , when less than the
(9) panel , optional parameter , Whether to display the window layout panel.1, displayed (default), 0 not
displayed
(10) Speed, fast-forwarding parameter, could be 2/4/8/16
(11) buffer, optional parameter, video buffer time, in milliseconds, default 2000. For mobile app, it is
recommended to set to 0
Howen VSS Web API
All of them are the same except that the port is different (using the default port of 443),as follows:
5.5. Web URL of playback of small alarm video and Server Recording clips
The small alarm video in server refers to the small video clip generated by the alarm linkage, which is
finally stored on the VSS server. This webpage can only play one server video file, and does not
support multiple channel play at the same time.
Server video clips: The video server actively grabs the real-time video of the device and saves it on the
VSS server. The video is sliced and stored by time. This interface supports playing a certain clips of
video. The video path can be obtained using the http video file search interface.
Server video playback http URL address
Example:
http://vssServerIp:9966/vss/apiPage/ReplayAlarmServerVideo.html?token=abcdefg&d
eviceId=20191122&chs=1&fpath=RSUzQSU1Q0hvd2VuJTVDRG93bmxvYWQlNUM
yMDIwLTA4LTExJTVDMjAxOTgwMDIlNUNjaDAxXzIwMjAwODExXzAwMzAw
MF8wMDUzMDJfMDEuYXNm
The parameters are defined as follows:
(1) The token parameter is the token string returned after successful login through the
http api login interface
(2) deviceId parameter, the device id of the device to be played
(3) chs parameter, channel list, each channel number is separated by underscore "_"
(4) The fpath parameter, the full path of the server video file obtained through the http
video search interface, needs to be passed in after base64 encoding
(1) Token parameter,the string of tokens returned after successful login through the HTTP API login interface
(2) deviceId parameter, the device ID of the device which needs to play
(3) chs parameter, A list of channels, with each channel number separated by an underscore "_"
(4) fpath parameter , the full path of the server video file obtained through the HTTP video search interface,
Howen VSS Web API
need to be encoded by base64 and then write.
https URL address
All of them are the same except that the port is different (using the default port of 443)
The Vss platform provides a streaming media request service based on the flv over http standard
protocol for H.264 video access, and the audio uses AAC encoding. Third-party platforms can request
playback through common open source players such as flvjs and vlc.
1) Device real-time video request url
http://vssServerIp:33122/live?token_deviceId_channel_stream
Service port 33122, service type flag is "live"
The url needs to carry the following parameters, and each parameter is separated by underscore:
token, Token obtained after logging in through the http web api login interface
deviceId,Device ID
channel, Channel number, starting from 1.
stream, The requested stream type, 1 represents the main stream, 0 represents the sub stream
Example:
Request the first channel sub-stream audio and video stream with the device id of 666888:
http://172.16.50.210:33122/live?a1512bf437d6c0a086d9881ba277d7fc_666888_1_0
7. Code sheet
7.1. Error code for HTTP interface
Error code Description
10000 Operation successful
10018 No authority
10025 No record
10034 The number of audio coding channel does not match the number of channel name.
-1 Offline
0 Unknown
1 Ethernet
2 WIFI
3 2G
4 3G
5 4G
6 5G
0 Invalid
1 Main Stream(H264)
2 Virtual stream(H264)
0
Invalid
1
Management
2
Gateway
3 Storage
4
Flow media
Howen VSS Web API
7.5. Device status
Value Description
-1 Offline
0 Unknown
Value Description
0 Unknown
1 Ordinary video
2 Alarm video
5 Update file
6 Log file
7 Configuration file
8 Black box
0 Unknown
1 Up
2 Down
3 Left
4 Right
5 Upper left
6 Lower left
7 Upper right
Howen VSS Web API
8 Lower right
12 Big aperture
13 Small aperture
14 Zoom out
15 Zoom in
16 Focus near
17 Focus far
18 Auto pan
19 Start wiper
20 Stop wiper
21 Cruise on
22 Cruise off
23 Light on
24 Light off
0 Unknown
1 Video lost
2 Motion detection
3 Video overshadowed
Howen VSS Web API
4 Alarm input triggered
5 Alarm of emergency
10 Alarm of humidity
11 Park overtime
12 Alarm of vibration
13 Electronic fence
14 Electronic route
16 Storage abnormal
17 Fatigue driving
19 Illegal ignition
22 RFID tagged
23 IBUTTON
24 Rapid acceleration
25 Rapid deceleration
28 Voltage alarm
29 Population statistics
video loss, motion detection, video blind, input trigger, emergency alarm
content filed name description
channel ch trigger channel, starting from 1
Input trigger
Content Field Description
Channel ch Triggered channel, starting from 1
Howen VSS Web API
Number num 0- MDVR box open.
1- Emergency/ Panic
2- F-door
3- M- door
4- B-door
5- Near light
6- Far light
9- R-Turn (right turn)
10- L-Turn (left turn)
11- Braking,
12- Reverse
13- Reservered 1
14- F-door close
15- M-Door Close
16- B-door close
17- Talk (start the intercom)
18- Raise up
19- Airtight
20- Load
31-IBT2
low speed alarm, over speed alarm, low speed warning, high speed warning, harsh acceleration, harsh
braking, low temperature alarm, high temperature alarm
content filed name description
trigger threshold vt conditional value, if >90 is over speed, then the trigger threshold is
90
time threshold tt if > 90 over 5 second is over speed, then the time threshold is 5
second
maximum value max Maximum value during the alarm
minimum value min Minimum value during the alarm
average avg Average value during the alarm
current value cur Current value when reporting
Previous second Pre The value of one second before
Overtime parking
content filed name Description
trigger value vt
parking time st second
storage abnormal
content filed name description
numbering num For example: sd1, sd2, hdd1, hdd2
status st 0—loss, 1—broken, 2— cannot overwrite, 3—Write block fail, 4—
disk broken
People counting
content filed name description
Front door onbus Up0 The number of onbus people, <0 means invalid
people number
Front door offbus Dw0 The number of offbus people, <0 means invalid
people number
Back door onbus Up1 The number of onbus people, <0 means invalid
people number
back door offbus Dw1 The number of offbus people, <0 means invalid
people number
longitude lon
latitude lat
Pat 0-real time 1-stored and forward (data was resent after network
works)
time tm Format: “ yyyy-mm-dd hh:mm:ss”
Va Current onbus people number byte is valid or not (device calculated),
0-invalid , 1-valid
Cur the current number of people onbus
Howen VSS Web API
Voltage
Content Field name Description
High/low voltage dt 1—low voltage 2—high voltage
80000
The client will request login verification after successful connection, and automatically
start subscription after successful connection
80001
Subscribe to real-time messages
80003
The server pushes device status information to the client
80004
The server pushes device alarm event to the client
80005
The server pushes device online/offline information to the client
Howen VSS Web API
80009
The client sends heartbeat information to server at regular intervals