def getPastRecordingsForID(server: utils.HikVisionServer, ChannelID, startTime="", endTime=""): dictdata = utils.xml2dict(b"""<CMSearchDescription version="1.0" xmlns="http://www.isapi.org/ver20/XMLSchema"> <searchID>{812F04E0-4089-11A3-9A0C-0305E82C2906}</searchID> <trackIDList> <trackID>9</trackID> <trackID>22</trackID> <trackID>43</trackID> </trackIDList> <timeSpanList> <timeSpan> <startTime>2013-06-10T12:00:00Z</startTime> <endTime>2013-06-10T13:30:00Z</endTime> </timeSpan> </timeSpanList> <contentTypeList> <contentType>video</contentType> </contentTypeList> <maxResults>40</maxResults> <metadataList> <metadataDescriptor>recordType.meta.hikvision.com/motion</metadataDescriptor> </metadataList> </CMSearchDescription>""") dictdata['CMSearchDescription']['trackIDList']['trackID'] = ChannelID (dictdata['CMSearchDescription']['timeSpanList'] ['timeSpan']['startTime']) = startTime (dictdata['CMSearchDescription']['timeSpanList'] ['timeSpan']['endTime']) = endTime data = utils.dict2xml(dictdata) return utils.getXML(server, "ContentMgmt/search", data)
def getConfigurationData(server: utils.HikVisionServer): """ Get device’s configuration data. """ return utils.getXML(server, "System/configurationData")
def getDeviceInfo(server: utils.HikVisionServer): """ Returns the device info as a dictionary """ return utils.getXML(server, "System/deviceInfo")
def getCapabilities(server: utils.HikVisionServer): """ It is used to get device capability. """ return utils.getXML(server, "System/capabilities")
def getChannelByID(server: utils.HikVisionServer, ChannelID): """ It is used to get the properties of a particular streaming channel for the device """ return utils.getXML(server, "Streaming/channels/" + ChannelID)
def status(server: utils.HikVisionServer): """ It is used to get a device streaming status """ return utils.getXML(server, "Streaming/status")
def getChannels(server: utils.HikVisionServer): """ It is used to get the properties of streaming channels for the device """ return utils.getXML(server, "Streaming/channels")