Hi guys, I'm a newbie in this field. I am a college student doing my thesis on a queue and capacity control system.
The question is that I have two cameras:
-DS-2CD6825G0 for people counting.
-IDS-2CD7146G0-IZS for queue management.
So far I have used a python http server that generated a json to get the information from the cameras. But I would like to work with APIs.
My doubt is how can I extract from DS-2CD6825G0
{
"EventNotificationAlert":{
"@version": "1.0",
"@xmlns": "urnsialliance-org",
"ipAddress":"192.168.1.64",
"protocolType": "HTTP",
"macAddress":"58:50:ed:66:f5:ce",
"channelID": "1",
"dateTime":"2022-03-16T10:16:50+01:00",
"activePostCount": "1",
"eventType": "PeopleCounting",
"eventState": "active",
"eventDescription": "peopleCounting alarm",
"channelName": "Camera 01",
"peopleCounting":{
"statisticalMethods": "realTime",
"realTime":{
"time":"2022-03-16T10:16:50+01:00"
},
"enter": "93",
"exit": "3",
"regionsID": "1"
},
"childCounting":{
"enter": "0",
"exit": "0"
}
}
}
I know that http://"ip"/ISAPI/Event/notification/alertStream gives me a continuous XML stream, but I don't know how to get that information using php or python.
On the other hand, I need to obtain from IDS-2CD7146G0-IZS
{
"ipAddress": "192.168.1.65",
"portNo": "8080",
"protocol": "HTTP",
"macAddress": "58:50:ed:64:05:ef",
"channelID": "1",
"dateTime": "2022-03-11T15:50:53+00:00",
"activePostCount": 1,
"eventType": "personQueueRealTime",
"eventState": "active",
"eventDescription": "personQueueRealTimeData",
"personQueueRealTimeData": {
"targetID": 786,
"ruleID": 1,
"personState": "leave",
"waitTime": 1,
"enterTime": "2022-03-11T15:50:51+00:00",
"peopleNum": 0
}
}
But in this case I don't even know what address to call to get that.
The question is that I have two cameras:
-DS-2CD6825G0 for people counting.
-IDS-2CD7146G0-IZS for queue management.
So far I have used a python http server that generated a json to get the information from the cameras. But I would like to work with APIs.
My doubt is how can I extract from DS-2CD6825G0
{
"EventNotificationAlert":{
"@version": "1.0",
"@xmlns": "urnsialliance-org",
"ipAddress":"192.168.1.64",
"protocolType": "HTTP",
"macAddress":"58:50:ed:66:f5:ce",
"channelID": "1",
"dateTime":"2022-03-16T10:16:50+01:00",
"activePostCount": "1",
"eventType": "PeopleCounting",
"eventState": "active",
"eventDescription": "peopleCounting alarm",
"channelName": "Camera 01",
"peopleCounting":{
"statisticalMethods": "realTime",
"realTime":{
"time":"2022-03-16T10:16:50+01:00"
},
"enter": "93",
"exit": "3",
"regionsID": "1"
},
"childCounting":{
"enter": "0",
"exit": "0"
}
}
}
I know that http://"ip"/ISAPI/Event/notification/alertStream gives me a continuous XML stream, but I don't know how to get that information using php or python.
On the other hand, I need to obtain from IDS-2CD7146G0-IZS
{
"ipAddress": "192.168.1.65",
"portNo": "8080",
"protocol": "HTTP",
"macAddress": "58:50:ed:64:05:ef",
"channelID": "1",
"dateTime": "2022-03-11T15:50:53+00:00",
"activePostCount": 1,
"eventType": "personQueueRealTime",
"eventState": "active",
"eventDescription": "personQueueRealTimeData",
"personQueueRealTimeData": {
"targetID": 786,
"ruleID": 1,
"personState": "leave",
"waitTime": 1,
"enterTime": "2022-03-11T15:50:51+00:00",
"peopleNum": 0
}
}
But in this case I don't even know what address to call to get that.