Closed E1cid closed 10 months ago
Hi Tomorrow i’ll take a look!
OK, cheers. Here is the response to the flow posted For events motion ,video loss and tamper,. Removed most data for ease of viewing. It would seem that motion alarm events is the only alarm event that is only outputting channelID 3. I triggered all 5 cameras with motion events and video loss events, i only triggered 2 cameras with tamper events.
{
"Motion alarm": {
"camera_front": {
"channelID": 3,
}
},
"videoloss alarm": {
"spare_5": {
"channelID": 5,
},
"camera_garden": {
"channelID": 2,
},
"camera_side": {
"channelID": 4,
},
"camera_front": {
"channelID": 3,
},
"camera_rear": {
"channelID": 1,
}
},
"shelteralarm alarm": {
"spare_5": {
"channelID": 5,
},
"camera_garden": {
"channelID": 2,
}
}
}
Hi i've tested yet again with my Hikvision NVR and it works correctly. I've saw, you wrote .channelID in camel case, but you should use lowercase. Please see this screenshot:
Please change channelID to channelid in all your nodes and retry.
I copied and pasted the incoming alarm from raw node, and it is camel case. It strange as the video loss alarms are correct, as are the tamper alarms. This may be an issue in the Annke software, thought I would check with you before raising it with Annke.
[edit] The event node has channelid. The raw event node has payload.channelID.
Both only ever state 3 no matter which camera gives motion alarm.
Hi, the RAW node, outputs the raw data coming from your NVR or Camera. If you enable the debug log, you can wiew it in your console and maybe paste it here, so i can understand, what the Annke told us. Please add a banana here, and restart node-red.
Thanks.
Adding 192.168.1.12banana result
"Hikvision-config: FETCH ERROR: request to http://192.168.1.12banana/ISAPI/Event/notification/alertStream failed, reason: getaddrinfo ENOTFOUND 192.168.1.12banana"
without banana and debug set
<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.1.12</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>3c:1b:f8:09:88:85</macAddress>
<channelID>0</channelID>
<dateTime>2024-01-22T11:46:3100:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>
"BANANA SBANANATO XML -> JSON {"EventNotificationAlert":{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":0,"dateTime":"2024-01-22T11:46:3100:00","activePostCount":0,"eventType":"videoloss","eventState":"inactive","eventDescription":"videoloss alarm"}}"
BANANA PROCESSING
Content-Type: application/xml; charset="UTF-8"
Content-Length: 465
<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.1.12</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>3c:1b:f8:09:88:85</macAddress>
<channelID>0</channelID>
<dateTime>2024-01-22T11:46:4100:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>
22/01/2024, 11:46:41
msg : string[304]
"BANANA SBANANATO XML -> JSON {"EventNotificationAlert":{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":0,"dateTime":"2024-01-22T11:46:4100:00","activePostCount":0,"eventType":"videoloss","eventState":"inactive","eventDescription":"videoloss alarm"}}"
22/01/2024, 11:44:36
msg : string[161]
"Hikvision-config: FETCH ERROR: request to http://192.168.1.12banana/ISAPI/Event/notification/alertStream failed, reason: getaddrinfo ENOTFOUND 192.168.1.12banana"
22/01/2024, 11:45:16
msg : string[161]
"Hikvision-config: FETCH ERROR: request to http://192.168.1.12banana/ISAPI/Event/notification/alertStream failed, reason: getaddrinfo ENOTFOUND 192.168.1.12banana"
22/01/2024, 11:45:58
msg : string[161]
"Hikvision-config: FETCH ERROR: request to http://192.168.1.12banana/ISAPI/Event/notification/alertStream failed, reason: getaddrinfo ENOTFOUND 192.168.1.12banana"
22/01/2024, 11:46:32
msg : string[555]
string[555]
BANANA PROCESSING
Content-Type: application/xml; charset="UTF-8"
Content-Length: 465
<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.1.12</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>3c:1b:f8:09:88:85</macAddress>
<channelID>0</channelID>
<dateTime>2024-01-22T11:46:3100:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>
22/01/2024, 11:46:32
msg : string[304]
"BANANA SBANANATO XML -> JSON {"EventNotificationAlert":{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":0,"dateTime":"2024-01-22T11:46:3100:00","activePostCount":0,"eventType":"videoloss","eventState":"inactive","eventDescription":"videoloss alarm"}}"
22/01/2024, 11:46:41
msg : string[555]
string[555]
BANANA PROCESSING
Content-Type: application/xml; charset="UTF-8"
Content-Length: 465
<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.1.12</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>3c:1b:f8:09:88:85</macAddress>
<channelID>0</channelID>
<dateTime>2024-01-22T11:46:4100:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>
22/01/2024, 11:46:41
msg : string[304]
"BANANA SBANANATO XML -> JSON {"EventNotificationAlert":{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":0,"dateTime":"2024-01-22T11:46:4100:00","activePostCount":0,"eventType":"videoloss","eventState":"inactive","eventDescription":"videoloss alarm"}}"
22/01/2024, 11:46:50
msg : string[555]
string[555]
BANANA PROCESSING
Content-Type: application/xml; charset="UTF-8"
Content-Length: 465
<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.1.12</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>3c:1b:f8:09:88:85</macAddress>
<channelID>0</channelID>
<dateTime>2024-01-22T11:46:5000:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>
22/01/2024, 11:46:50
msg : string[304]
"BANANA SBANANATO XML -> JSON {"EventNotificationAlert":{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":0,"dateTime":"2024-01-22T11:46:5000:00","activePostCount":0,"eventType":"videoloss","eventState":"inactive","eventDescription":"videoloss alarm"}}"
22/01/2024, 11:47:00
msg : string[555]
string[555]
BANANA PROCESSING
Content-Type: application/xml; charset="UTF-8"
Content-Length: 465
<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.1.12</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>3c:1b:f8:09:88:85</macAddress>
<channelID>0</channelID>
<dateTime>2024-01-22T11:46:5900:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>
22/01/2024, 11:47:00
msg : string[304]
"BANANA SBANANATO XML -> JSON {"EventNotificationAlert":{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":0,"dateTime":"2024-01-22T11:46:5900:00","activePostCount":0,"eventType":"videoloss","eventState":"inactive","eventDescription":"videoloss alarm"}}"
22/01/2024, 11:47:04
msg : string[544]
"BANANA PROCESSING↵Content-Type: application/xml; charset="UTF-8"↵Content-Length: 454↵↵<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">↵<ipAddress>192.168.1.12</ipAddress>↵<portNo>80</portNo>↵<protocol>HTTP</protocol>↵<macAddress>3c:1b:f8:09:88:85</macAddress>↵<channelID>3</channelID>↵<dateTime>2024-01-22T11:47:0300:00</dateTime>↵<activePostCount>1</activePostCount>↵<eventType>VMD</eventType>↵<eventState>active</eventState>↵<eventDescription>Motion alarm</eventDescription>↵</EventNotificationAlert>↵"
22/01/2024, 11:47:04
msg : string[293]
"BANANA SBANANATO XML -> JSON {"EventNotificationAlert":{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":3,"dateTime":"2024-01-22T11:47:0300:00","activePostCount":1,"eventType":"VMD","eventState":"active","eventDescription":"Motion alarm"}}"
22/01/2024, 11:47:04
msg : string[544]
"BANANA PROCESSING↵Content-Type: application/xml; charset="UTF-8"↵Content-Length: 454↵↵<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">↵<ipAddress>192.168.1.12</ipAddress>↵<portNo>80</portNo>↵<protocol>HTTP</protocol>↵<macAddress>3c:1b:f8:09:88:85</macAddress>↵<channelID>3</channelID>↵<dateTime>2024-01-22T11:47:0400:00</dateTime>↵<activePostCount>2</activePostCount>↵<eventType>VMD</eventType>↵<eventState>active</eventState>↵<eventDescription>Motion alarm</eventDescription>↵</EventNotificationAlert>↵"
22/01/2024, 11:47:04
msg : string[293]
"BANANA SBANANATO XML -> JSON {"EventNotificationAlert":{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":3,"dateTime":"2024-01-22T11:47:0400:00","activePostCount":2,"eventType":"VMD","eventState":"active","eventDescription":"Motion alarm"}}"
22/01/2024, 11:47:06
msg : string[544]
string[544]
BANANA PROCESSING
Content-Type: application/xml; charset="UTF-8"
Content-Length: 454
<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.1.12</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>3c:1b:f8:09:88:85</macAddress>
<channelID>3</channelID>
<dateTime>2024-01-22T11:47:0500:00</dateTime>
<activePostCount>3</activePostCount>
<eventType>VMD</eventType>
<eventState>active</eventState>
<eventDescription>Motion alarm</eventDescription>
</EventNotificationAlert>
"BANANA SBANANATO XML -> JSON {"EventNotificationAlert":{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":3,"dateTime":"2024-01-22T11:47:0500:00","activePostCount":3,"eventType":"VMD","eventState":"active","eventDescription":"Motion alarm"}}"
Motion alarm output from raw node
{"ipAddress":"192.168.1.12","portNo":80,"protocol":"HTTP","macAddress":"3c:1b:f8:09:88:85","channelID":3,"dateTime":"2024-01-22T11:47:0500:00","activePostCount":3,"eventType":"VMD","eventState":"active","eventDescription":"Motion alarm"}
BANANA PROCESSING
Content-Type: application/xml; charset="UTF-8"
Content-Length: 465
<EventNotificationAlert version="1.0" xmlns="http://www.std-cgi.com/ver20/XMLSchema">
<ipAddress>192.168.1.12</ipAddress>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>3c:1b:f8:09:88:85</macAddress>
<channelID>0</channelID>
<dateTime>2024-01-22T11:47:1500:00</dateTime>
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
</EventNotificationAlert>
Hi, thank you for the very detailed infos.
This is only an "heartbeat" signal, used to monitor the NVR status.
<activePostCount>0</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
The other event: Motion alarm has always the channelID = 3. If you get the channelID = 3 by testing the motion event of each camera, that means that the NVR sends a wrong channel ID.
Ok that's what I thought. Cheers for your time. Looks like I need to contact Annke support. I will close the issue if you have not done so already
Hi, this is my first look at your Hikvision node, Just set it up with Annke DW8KD, Set up was easy thank you for you work and effort.
Describe the bug All messages received have a channelID of 3. The NVR is set up with 5 cameras and receive push notifications to App(Annke vission) with the correct channels.
not sure if this is a node bug or an Annke issue. To Reproduce
This is the flow i am running in Node-red that should show bug,
This is always the payload received from raw node no matter the camera that triggers event