How to handle multipart boundary in xml connection (DomoticzEx framework)? Looking for help.

Python and python framework

Moderator: leecollings

Post Reply
EscApe
Posts: 528
Joined: Thursday 02 April 2015 8:46
Target OS: Linux
Domoticz version: 2020+
Location: The Netherlands
Contact:

How to handle multipart boundary in xml connection (DomoticzEx framework)? Looking for help.

Post by EscApe »

I am trying to write a plugin that reads the XML alertstream of a Hikvision security camera and I want to use the connection object offered by the plugin framework to do so.
I know how to solve this using requests, but I want to see if plugins behave better if they avoid using additional modules like that.

So far I can connect to the camera and receive messages from it. However, the datastream includes boundary's and I suspect these are not (correctly) handled by the connection. If I select XML as the connection protocol the connection terminates upon receiving the first data (see below).

self.alertstream = DomoticzEx.Connection(Name="HikCamConn", Transport="TCP/IP", Protocol="XML", Address="192.168.19.205", Port="80")

Code: Select all

2024-02-11 14:46:45.244 Queued asynchronous read aborted (192.168.19.205:80), [2] End of file.
2024-02-11 14:46:45.294 Hik: Disconnect event received for '192.168.19.205:80'.


If I select HTTP as the connection protocol it throws an error, but at least shows the content of the data received.
self.alertstream = DomoticzEx.Connection(Name="HikCamConn", Transport="TCP/IP", Protocol="HTTP", Address="192.168.19.205", Port="80")

Code: Select all

2024-02-11 14:45:03.138 Hik: onMessage called for connection: 'HikCamConn'
2024-02-11 14:45:03.138 Hik: onMessage data: {'Verb': '--boundary', 'URL': '', 'Headers': {'Content-Type': 'application/xml; charset="UTF-8"', 'Content-Length': '579'}, 'Data': b'<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">\r\n<ipAddress>192.168.19.205</ipAddress>\r\n<ipv6Address>2a02:a45f:c5e:1:82be:afff:fe97:e2bf</ipv6Address>\r\n<portNo>80</portNo>\r\n<protocol>HTTP</protocol>\r\n<macAddress>80:be:af:97:e2:bf</macAddress>\r\n<channelID>1</channelID>\r\n<dateTime>2024-02-11T14:44:59+01:00</dateTime>\r\n<activePostCount>1</activePostCount>\r\n<eventType>videoloss</eventType>\r\n<eventState>inactive</eventState>\r\n<eventDescription>videoloss alarm</eventDescription>\r\n<channelName>Tuin</channelName>\r\n</EventNotificationAlert>\r\n'}
2024-02-11 14:45:03.138 Error: malformed request response received (verb: --boundary/--boundary)
With the result above I can built the functionality I want, since all the data I need is there and can be parsed. It will however show an error in the Domoticz log on every message received. An unnecessary errormessage every 10 seconds is... let's call it: "undesirable behavior" for my plugin ;)

An example of the datastream:

Code: Select all

| --boundary
| Content-Type: application/xml; charset="UTF-8"
| Content-Length: 579
| 
| <EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
| <ipAddress>192.168.19.205</ipAddress>
| <ipv6Address>xxxx:xxxx:xxxx:x:xxxx:xxxx:xxxx:xxxx</ipv6Address>
| <portNo>80</portNo>
| <protocol>HTTP</protocol>
| <macAddress>80:be:af:97:e2:bf</macAddress>
| <channelID>1</channelID>
| <dateTime>2024-02-11T14:55:21+01:00</dateTime>
| <activePostCount>1</activePostCount>
| <eventType>videoloss</eventType>
| 
| <eventState>inactive</eventState>
| <eventDescription>videoloss alarm</eventDescription>
| <channelName>Tuin</channelName>
| </EventNotificationAlert>
| --boundary
| Content-Type: application/xml; charset="UTF-8"
| Content-Length: 579
| 
| <EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
| <ipAddress>192.168.19.205</ipAddress>
| <ipv6Address>xxxx:xxxx:xxxx:x:xxxx:xxxx:xxxx:xxxx</ipv6Address>
| <portNo>80</portNo>
| <protocol>HTTP</protocol>
| <macAddress>80:be:af:97:e2:bf</macAddress>
| <channelID>1</channelID>
| <dateTime>2024-02-11T14:55:31+01:00</dateTime>
| <activePostCount>1</activePostCount>
| <eventType>videoloss</eventType>
| <eventState>inactive</eventState>
| <eventDescription>videoloss alarm</eventDescription>
| <channelName>Tuin</channelName>
| </EventNotificationAlert>
| --boundary
| Content-Type: application/xml; charset="UTF-8"
| Content-Length: 579
| 
| <EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
| <ipAddress>192.168.19.205</ipAddress>
| <ipv6Address>xxxx:xxxx:xxxx:x:xxxx:xxxx:xxxx:xxxx</ipv6Address>
| <portNo>80</portNo>
| <protocol>HTTP</protocol>
| <macAddress>80:be:af:97:e2:bf</macAddress>
| <channelID>1</channelID>
| <dateTime>2024-02-11T14:55:41+01:00</dateTime>
| <activePostCount>1</activePostCount>
| <eventType>videoloss</eventType>
| <eventState>inactive</eventState>
| <eventDescription>videoloss alarm</eventDescription>
| <channelName>Tuin</channelName>
| </EventNotificationAlert>
| --boundary
Is there a connection option I have overlooked?
Last edited by EscApe on Wednesday 14 February 2024 6:27, edited 1 time in total.
EscApe
Posts: 528
Joined: Thursday 02 April 2015 8:46
Target OS: Linux
Domoticz version: 2020+
Location: The Netherlands
Contact:

Re: How to handle multipart boundary in xml connection (DomoticzEx framework)? Help needed.

Post by EscApe »

After looking at a more detailed debug log I noticed that (at least in the log) the onconnect sent content is different when you select xlm of http as the protocol (other protocols I tested look the same as the xml protocol below, so it is the http that is different from the rest). When configuring anything else than http the sent message contains curly brackets (looks more like json).

My previous assessment was wrong. The connection is not broken by the first message received. According to the log there are no messages received at all when selecting anything else than the http protocol.

I was under the impression that the protocol would only affect the way incoming messages are parsed, but is not the case(?)
If http is the correct protocol for the hikvision alertstream, then how do I get rid of the error message caused by the boundary 'verb'?

Example log for failing xml protocol (None or json look the same):

Code: Select all

2024-02-12 14:20:27.535 Hik: Processing 'onConnectCallback' message
2024-02-12 14:20:27.535 Hik: Acquiring GIL for 'onConnectCallback'
2024-02-12 14:20:27.536 Hik: Calling message handler 'onConnect' on 'module' type object.
2024-02-12 14:20:27.536 Hik: Successful connect. Login with:xxxxxxxxxxxxxxx
2024-02-12 14:20:27.536 Hik: {'Verb': 'GET', 'URL': '/ISAPI/Event/notification/alertStream', 'Headers': {'Authorization': 'Basic xxxxxxxxxxxxxx', 'Content-Type': 'multipart/mixed'}}
2024-02-12 14:20:27.536 Hik: Pushing 'WriteDirective' on to queue
2024-02-12 14:20:27.536 Hik: checkconn: Name: 'HikCamConn', Transport: 'TCP/IP', Protocol: 'None', Address: '192.168.19.205', Port: '80', Baud: -1, Timeout: 0, Bytes: 0, Connected: True, Last Seen: 2024-02-12 14:20:27, Parent: 'None' -- 0 -- Success
2024-02-12 14:20:27.536 Hik: Acquiring GIL for 'onConnectCallback'
2024-02-12 14:20:27.536 Hik: Processing 'WriteDirective' message
2024-02-12 14:20:27.536 Hik: Acquiring GIL for 'WriteDirective'
2024-02-12 14:20:27.536 Hik: Sending 158 bytes of data
2024-02-12 14:20:27.536 Hik: 7b 27 56 65 72 62 27 3a 20 27 47 45 54 27 2c 20 27 55 52 4c {'Verb':.'GET',.'URL
2024-02-12 14:20:27.536 Hik: 27 3a 20 27 2f 49 53 41 50 49 2f 45 76 65 6e 74 2f 6e 6f 74 ':.'/ISAPI/Event/not
2024-02-12 14:20:27.536 Hik: 69 66 69 63 61 74 69 6f 6e 2f 61 6c 65 72 74 53 74 72 65 61 ification/alertStrea
2024-02-12 14:20:27.536 Hik: 6d 27 2c 20 27 48 65 61 64 65 72 73 27 3a 20 7b 27 41 75 74 m',.'Headers':.{'Aut
2024-02-12 14:20:27.536 Hik: 68 6f 72 69 7a 61 74 69 6f 6e 27 3a 20 27 42 61 73 69 63 20 horization':.'Basic.
2024-02-12 14:20:27.536 Hik: 59 57 52 74 61 57 34 36 56 54 68 51 59 6a 4a 62 5a 47 67 34 xxxxxxxxxxxxxxxxx
2024-02-12 14:20:27.536 Hik: 27 2c 20 27 43 6f 6e 74 65 6e 74 2d 54 79 70 65 27 3a 20 27 ',.'Content-Type':.'
2024-02-12 14:20:27.536 Hik: 6d 75 6c 74 69 70 61 72 74 2f 6d 69 78 65 64 27 7d 7d .. .. multipart/mixed'}}
2024-02-12 14:20:27.536 Hik: Acquiring GIL for 'WriteDirective'
2024-02-12 14:20:27.002 Status: Hik: Started.
2024-02-12 14:20:27.002 Status: Hik: Entering work loop.
2024-02-12 14:20:27.002 Status: NotificationSystem: thread started...
2024-02-12 14:20:27.003 Status: EventSystem: reset all events...
2024-02-12 14:20:27.003 Status: EventSystem: reset all device statuses...
2024-02-12 14:20:27.027 Status: Python EventSystem: Initializing event module.
2024-02-12 14:20:27.027 Status: EventSystem: Started
2024-02-12 14:20:27.027 Status: EventSystem: Queue thread started...
2024-02-12 14:20:27.084 Status: Hik: Initialized
2024-02-12 14:20:27.484 Status: PluginSystem: 1 plugins started.
2024-02-12 14:20:36.078 Hik: Acquiring GIL for 'CPluginTransportTCP::handleRead'
2024-02-12 14:20:36.078 Queued asynchronous read aborted (192.168.19.205:80), [2] End of file.
2024-02-12 14:20:36.078 Hik: Pushing 'DisconnectedEvent' on to queue
2024-02-12 14:20:36.105 Hik: Processing 'DisconnectedEvent' message
2024-02-12 14:20:36.105 Hik: Acquiring GIL for 'DisconnectedEvent'
2024-02-12 14:20:36.105 Hik: Disconnect event received for '192.168.19.205:80'.
2024-02-12 14:20:36.106 Hik: Pushing 'onDisconnectCallback' on to queue
2024-02-12 14:20:36.106 Hik: Acquiring GIL for 'DisconnectedEvent'
Log when using http protocol (with the unnecessary error message upon every received message)

Code: Select all

2024-02-12 14:22:55.391 Status: TCPServer: shared server started...
2024-02-12 14:22:55.391 Status: RxQueue: queue worker started...
2024-02-12 14:22:55.372 Error: Default admin password has NOT been changed! Change it asap!
2024-02-12 14:22:57.883 Hik: {'Verb': 'GET', 'URL': '/ISAPI/Event/notification/alertStream', 'Headers': {'Authorization': 'Basic xxxxxxxxxxxxxx', 'Content-Type': 'multipart/mixed'}}
2024-02-12 14:22:57.883 Hik: Pushing 'WriteDirective' on to queue
2024-02-12 14:22:57.883 Hik: checkconn: Name: 'HikCamConn', Transport: 'TCP/IP', Protocol: 'HTTP', Address: '192.168.19.205', Port: '80', Baud: -1, Timeout: 0, Bytes: 0, Connected: True, Last Seen: 2024-02-12 14:22:57, Parent: 'None' -- 0 -- Success
2024-02-12 14:22:57.883 Hik: Acquiring GIL for 'onConnectCallback'
2024-02-12 14:22:57.883 Hik: Processing 'WriteDirective' message
2024-02-12 14:22:57.883 Hik: Acquiring GIL for 'WriteDirective'
2024-02-12 14:22:57.883 Hik: Sending 154 bytes of data
2024-02-12 14:22:57.883 Hik: 47 45 54 20 2f 49 53 41 50 49 2f 45 76 65 6e 74 2f 6e 6f 74 GET./ISAPI/Event/not
2024-02-12 14:22:57.883 Hik: 69 66 69 63 61 74 69 6f 6e 2f 61 6c 65 72 74 53 74 72 65 61 ification/alertStrea
2024-02-12 14:22:57.883 Hik: 6d 20 48 54 54 50 2f 31 2e 31 0d 0a 55 73 65 72 2d 41 67 65 m.HTTP/1.1..User-Age
2024-02-12 14:22:57.883 Hik: 6e 74 3a 20 44 6f 6d 6f 74 69 63 7a 2f 31 2e 30 0d 0a 41 75 nt:.Domoticz/1.0..Au
2024-02-12 14:22:57.883 Hik: 74 68 6f 72 69 7a 61 74 69 6f 6e 3a 20 42 61 73 69 63 20 59 thorization:.Basic.x
2024-02-12 14:22:57.883 Hik: 57 52 74 61 57 34 36 56 54 68 51 59 6a 4a 62 5a 47 67 34 0d xxxxxxxxxxxxxxxxxxx.
2024-02-12 14:22:57.883 Hik: 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 6d 75 6c 74 69 .Content-Type:.multi
2024-02-12 14:22:57.883 Hik: 70 61 72 74 2f 6d 69 78 65 64 0d 0a 0d 0a .. .. .. .. .. .. part/mixed....
2024-02-12 14:22:57.883 Hik: Acquiring GIL for 'WriteDirective'
2024-02-12 14:22:57.392 Status: Hik: Entering work loop.
2024-02-12 14:22:57.392 Status: Hik: Started.
2024-02-12 14:22:57.392 Status: NotificationSystem: thread started...
2024-02-12 14:22:57.392 Status: EventSystem: reset all events...
2024-02-12 14:22:57.392 Status: EventSystem: reset all device statuses...
2024-02-12 14:22:57.417 Status: Python EventSystem: Initializing event module.
2024-02-12 14:22:57.417 Status: EventSystem: Started
2024-02-12 14:22:57.417 Status: EventSystem: Queue thread started...
2024-02-12 14:22:57.481 Status: Hik: Initialized
2024-02-12 14:22:57.874 Status: PluginSystem: 1 plugins started.
2024-02-12 14:22:58.567 Hik: Acquiring GIL for 'CPluginTransportTCP::handleRead'
2024-02-12 14:22:58.567 Hik: Pushing 'ReadEvent' on to queue
2024-02-12 14:22:58.569 Hik: Acquiring GIL for 'CPluginTransportTCP::handleRead'
2024-02-12 14:22:58.569 Hik: Pushing 'ReadEvent' on to queue
2024-02-12 14:22:58.585 Hik: Processing 'ReadEvent' message
2024-02-12 14:22:58.585 Hik: Acquiring GIL for 'ReadEvent'
2024-02-12 14:22:58.585 Hik: Received 107 bytes of data
2024-02-12 14:22:58.585 Hik: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 4d 49 4d HTTP/1.1.200.OK..MIM
2024-02-12 14:22:58.585 Hik: 45 2d 56 65 72 73 69 6f 6e 3a 20 31 2e 30 0d 0a 43 6f 6e 6e E-Version:.1.0..Conn
2024-02-12 14:22:58.585 Hik: 65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 43 6f 6e 74 65 ection:.close..Conte
2024-02-12 14:22:58.585 Hik: 6e 74 2d 54 79 70 65 3a 20 6d 75 6c 74 69 70 61 72 74 2f 6d nt-Type:.multipart/m
2024-02-12 14:22:58.585 Hik: 69 78 65 64 3b 20 62 6f 75 6e 64 61 72 79 3d 62 6f 75 6e 64 ixed;.boundary=bound
2024-02-12 14:22:58.585 Hik: 61 72 79 0d 0a 0d 0a .. .. .. .. .. .. .. .. .. .. .. .. .. ary....
2024-02-12 14:22:58.585 Hik: Pushing 'onMessageCallback' on to queue
2024-02-12 14:22:58.585 Hik: Acquiring GIL for 'ReadEvent'
2024-02-12 14:22:58.585 Hik: Processing 'ReadEvent' message
2024-02-12 14:22:58.585 Hik: Acquiring GIL for 'ReadEvent'
2024-02-12 14:22:58.585 Hik: Received 662 bytes of data
2024-02-12 14:22:58.585 Hik: 2d 2d 62 6f 75 6e 64 61 72 79 0d 0a 43 6f 6e 74 65 6e 74 2d --boundary..Content-
2024-02-12 14:22:58.585 Hik: 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 6d Type:.application/xm
2024-02-12 14:22:58.585 Hik: 6c 3b 20 63 68 61 72 73 65 74 3d 22 55 54 46 2d 38 22 0d 0a l;.charset="UTF-8"..
2024-02-12 14:22:58.585 Hik: 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 35 37 39 0d Content-Length:.579.
2024-02-12 14:22:58.585 Hik: 0a 0d 0a 3c 45 76 65 6e 74 4e 6f 74 69 66 69 63 61 74 69 6f ...<EventNotificatio
2024-02-12 14:22:58.585 Hik: 6e 41 6c 65 72 74 20 76 65 72 73 69 6f 6e 3d 22 32 2e 30 22 nAlert.version="2.0"
2024-02-12 14:22:58.585 Hik: 20 78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 68 .xmlns="http://www.h
2024-02-12 14:22:58.585 Hik: 69 6b 76 69 73 69 6f 6e 2e 63 6f 6d 2f 76 65 72 32 30 2f 58 ikvision.com/ver20/X
2024-02-12 14:22:58.585 Hik: 4d 4c 53 63 68 65 6d 61 22 3e 0d 0a 3c 69 70 41 64 64 72 65 MLSchema">..<ipAddre
2024-02-12 14:22:58.585 Hik: 73 73 3e 31 39 32 2e 31 36 38 2e 31 39 2e 32 30 35 3c 2f 69 ss>192.168.19.205</i
2024-02-12 14:22:58.585 Hik: 70 41 64 64 72 65 73 73 3e 0d 0a 3c 69 70 76 36 41 64 64 72 pAddress>..<ipv6Addr
2024-02-12 14:22:58.585 Hik: 65 73 73 3e 32 61 30 32 3a 61 34 35 66 3a 63 35 65 3a 31 3a ess>xxxx:xxxx:xxx:1:
2024-02-12 14:22:58.585 Hik: 38 32 62 65 3a 61 66 66 66 3a 66 65 39 37 3a 65 32 62 66 3c xxxx:xxxx:xxx:xxxx<
2024-02-12 14:22:58.585 Hik: 2f 69 70 76 36 41 64 64 72 65 73 73 3e 0d 0a 3c 70 6f 72 74 /ipv6Address>..<port
2024-02-12 14:22:58.585 Hik: 4e 6f 3e 38 30 3c 2f 70 6f 72 74 4e 6f 3e 0d 0a 3c 70 72 6f No>80</portNo>..<pro
2024-02-12 14:22:58.585 Hik: 74 6f 63 6f 6c 3e 48 54 54 50 3c 2f 70 72 6f 74 6f 63 6f 6c tocol>HTTP</protocol
2024-02-12 14:22:58.585 Hik: 3e 0d 0a 3c 6d 61 63 41 64 64 72 65 73 73 3e 38 30 3a 62 65 >..<macAddress>80:be
2024-02-12 14:22:58.585 Hik: 3a 61 66 3a 39 37 3a 65 32 3a 62 66 3c 2f 6d 61 63 41 64 64 :af:97:e2:bf</macAdd
2024-02-12 14:22:58.585 Hik: 72 65 73 73 3e 0d 0a 3c 63 68 61 6e 6e 65 6c 49 44 3e 31 3c ress>..<channelID>1<
2024-02-12 14:22:58.585 Hik: 2f 63 68 61 6e 6e 65 6c 49 44 3e 0d 0a 3c 64 61 74 65 54 69 /channelID>..<dateTi
2024-02-12 14:22:58.585 Hik: 6d 65 3e 32 30 32 34 2d 30 32 2d 31 32 54 31 34 3a 32 32 3a me>2024-02-12T14:22:
2024-02-12 14:22:58.585 Hik: 35 35 2b 30 31 3a 30 30 3c 2f 64 61 74 65 54 69 6d 65 3e 0d 55+01:00</dateTime>.
2024-02-12 14:22:58.585 Hik: 0a 3c 61 63 74 69 76 65 50 6f 73 74 43 6f 75 6e 74 3e 31 3c .<activePostCount>1<
2024-02-12 14:22:58.585 Hik: 2f 61 63 74 69 76 65 50 6f 73 74 43 6f 75 6e 74 3e 0d 0a 3c /activePostCount>..<
2024-02-12 14:22:58.585 Hik: 65 76 65 6e 74 54 79 70 65 3e 76 69 64 65 6f 6c 6f 73 73 3c eventType>videoloss<
2024-02-12 14:22:58.585 Hik: 2f 65 76 65 6e 74 54 79 70 65 3e 0d 0a 3c 65 76 65 6e 74 53 /eventType>..<eventS
2024-02-12 14:22:58.585 Hik: 74 61 74 65 3e 69 6e 61 63 74 69 76 65 3c 2f 65 76 65 6e 74 tate>inactive</event
2024-02-12 14:22:58.585 Hik: 53 74 61 74 65 3e 0d 0a 3c 65 76 65 6e 74 44 65 73 63 72 69 State>..<eventDescri
2024-02-12 14:22:58.585 Hik: 70 74 69 6f 6e 3e 76 69 64 65 6f 6c 6f 73 73 20 61 6c 61 72 ption>videoloss.alar
2024-02-12 14:22:58.585 Hik: 6d 3c 2f 65 76 65 6e 74 44 65 73 63 72 69 70 74 69 6f 6e 3e m</eventDescription>
2024-02-12 14:22:58.585 Hik: 0d 0a 3c 63 68 61 6e 6e 65 6c 4e 61 6d 65 3e 54 75 69 6e 3c ..<channelName>Tuin<
2024-02-12 14:22:58.585 Hik: 2f 63 68 61 6e 6e 65 6c 4e 61 6d 65 3e 0d 0a 3c 2f 45 76 65 /channelName>..</Eve
2024-02-12 14:22:58.585 Hik: 6e 74 4e 6f 74 69 66 69 63 61 74 69 6f 6e 41 6c 65 72 74 3e ntNotificationAlert>
2024-02-12 14:22:58.585 Hik: 0d 0a .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..
2024-02-12 14:22:58.585 Hik: Pushing 'onMessageCallback' on to queue
2024-02-12 14:22:58.585 Hik: Acquiring GIL for 'ReadEvent'
2024-02-12 14:22:58.585 Hik: Processing 'onMessageCallback' message
2024-02-12 14:22:58.585 Hik: Acquiring GIL for 'onMessageCallback'
2024-02-12 14:22:58.585 Hik: Calling message handler 'onMessage' on 'module' type object.
2024-02-12 14:22:58.585 Hik: onMessage called for connection: 'HikCamConn'
2024-02-12 14:22:58.585 Hik: onMessage data: {'Status': '200', 'Headers': {'MIME-Version': '1.0', 'Connection': 'close', 'Content-Type': 'multipart/mixed; boundary=boundary'}}
2024-02-12 14:22:58.585 Hik: >>> iets=Status -> 200
2024-02-12 14:22:58.585 Hik: >>> iets=Headers -> {'MIME-Version': '1.0', 'Connection': 'close', 'Content-Type': 'multipart/mixed; boundary=boundary'}
2024-02-12 14:22:58.585 Hik: Acquiring GIL for 'onMessageCallback'
2024-02-12 14:22:58.585 Hik: Processing 'onMessageCallback' message
2024-02-12 14:22:58.585 Hik: Acquiring GIL for 'onMessageCallback'
2024-02-12 14:22:58.585 Hik: Calling message handler 'onMessage' on 'module' type object.
2024-02-12 14:22:58.585 Hik: onMessage called for connection: 'HikCamConn'
2024-02-12 14:22:58.585 Hik: onMessage data: {'Verb': '--boundary', 'URL': '', 'Headers': {'Content-Type': 'application/xml; charset="UTF-8"', 'Content-Length': '579'}, 'Data': b'<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">\r\n<ipAddress>192.168.19.205</ipAddress>\r\n<ipv6Address>xxxx:xxxx:xxx:1:xxxx:xxxx:xxxx:xxxx</ipv6Address>\r\n<portNo>80</portNo>\r\n<protocol>HTTP</protocol>\r\n<macAddress>80:be:af:97:e2:bf</macAddress>\r\n<channelID>1</channelID>\r\n<dateTime>2024-02-12T14:22:55+01:00</dateTime>\r\n<activePostCount>1</activePostCount>\r\n<eventType>videoloss</eventType>\r\n<eventState>inactive</eventState>\r\n<eventDescription>videoloss alarm</eventDescription>\r\n<channelName>Tuin</channelName>\r\n</EventNotificationAlert>\r\n'}
(I masked the authentication strings and ip6 addresses in the logs)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests