Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HomeAssistant 'Problem finding attribute: 'duration'' in logging #76

Closed
callifo opened this issue Jul 21, 2021 · 3 comments
Closed

HomeAssistant 'Problem finding attribute: 'duration'' in logging #76

callifo opened this issue Jul 21, 2021 · 3 comments

Comments

@callifo
Copy link

callifo commented Jul 21, 2021

I'm finding with my new ColorVu outdoor cameras they fill the HA logs with these errors when they are generating events sent to HA. E.g. it only happens when I or someone/something is moving in front of the camera.

https://www.hikvision.com/en/products/IP-Products/Network-Cameras/colorvu-series/ds-2cd2347g2-l-u-/

2021-07-21 10:41:08 ERROR (Thread-7) [pyhik.hikvision] Problem finding attribute: 'duration'

I've got this from curl http://YOUR_CAM_IP/ISAPI/Event/triggers --digest

<?xml version="1.0" encoding="UTF-8"?>
<EventTriggerList version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<EventTrigger>
<id>VMD-1</id>
<eventType>VMD</eventType>
<eventDescription>VMD Event trigger Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>tamper-1</id>
<eventType>tamperdetection</eventType>
<eventDescription>shelteralarm Event trigger Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>diskfull</id>
<eventType>diskfull</eventType>
<eventDescription>exception Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>diskerror</id>
<eventType>diskerror</eventType>
<eventDescription>exception Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>nicbroken</id>
<eventType>nicbroken</eventType>
<eventDescription>exception Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>ipconflict</id>
<eventType>ipconflict</eventType>
<eventDescription>exception Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>illaccess</id>
<eventType>illaccess</eventType>
<eventDescription>exception Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>linedetection-1</id>
<eventType>linedetection</eventType>
<eventDescription>Linedetection Event trigger Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
<EventTriggerNotification>
<id>center</id>
<notificationMethod>center</notificationMethod>
<notificationRecurrence>beginning</notificationRecurrence>
</EventTriggerNotification>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>fielddetection-1</id>
<eventType>fielddetection</eventType>
<eventDescription>fielddetection Event trigger Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
<EventTriggerNotification>
<id>center</id>
<notificationMethod>center</notificationMethod>
<notificationRecurrence>beginning</notificationRecurrence>
</EventTriggerNotification>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>badvideo</id>
<eventType>badvideo</eventType>
<eventDescription>exception Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>regionEntrance-1</id>
<eventType>regionEntrance</eventType>
<eventDescription>RegionEntrance Event trigger Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
<EventTriggerNotification>
<id>center</id>
<notificationMethod>center</notificationMethod>
<notificationRecurrence>beginning</notificationRecurrence>
</EventTriggerNotification>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>regionExiting-1</id>
<eventType>regionExiting</eventType>
<eventDescription>RegionExiting Event trigger Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>storageDetection-1</id>
<eventType>storageDetection</eventType>
<eventDescription>storageDetection Event trigger Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
</EventTriggerNotificationList>
</EventTrigger>
<EventTrigger>
<id>faceSnap-1</id>
<eventType>faceSnap</eventType>
<eventDescription>faceSnap Event trigger Information</eventDescription>
<videoInputChannelID>1</videoInputChannelID>
<dynVideoInputChannelID>1</dynVideoInputChannelID>
<EventTriggerNotificationList>
<EventTriggerNotification>
<id>center</id>
<notificationMethod>center</notificationMethod>
<notificationRecurrence>beginning</notificationRecurrence>
</EventTriggerNotification>
<EventTriggerNotification>
<id>FTP</id>
<notificationMethod>FTP</notificationMethod>
<notificationRecurrence>beginning</notificationRecurrence>
</EventTriggerNotification>
</EventTriggerNotificationList>
</EventTrigger>
</EventTriggerList>

I tried this, curl --digest -N http://192.168.100.131/ISAPI/Event/notification/alertStream and then went and moved in front of it (generating those errors in HA log above). It filled my terminal window with garbage, and then some readable text.

<?xml version="1.0" encoding="UTF-8"?>
<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:53:15+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
<channelName>Camera 01</channelName>
<Extensions>
<serialNumber>DS-2CD2347G2-LU20210311AAWRF64923035</serialNumber>
<eventPush>DS-2CD2347G2-LU20210311AAWRF64923035,2021-07-21T15:53:15+09:30,1.0</eventPush>
</Extensions>
</EventNotificationAlert>

▒B▒▒.▒ы▒o6▒▒▒▒Mg▒▒Q)▒▒_▒▒u0▒▒:%X▒▒▒-▒L▒q▒V▒ ▒&▒▒▒▒\#▒r?j▒d:d#▒=▒▒ok▒U1ni{c3ѯȍI[▒▒!E&
▒▒<▒r▒▒߫/▒ٶ߰u▒Y▒9ݛEya▒qSd▒[▒▒Y▒jp▒DTj̓▒9▒N▒dx▒▒▒v▒▒▒IM▒(+▒cA▒▒▒N▒▒R▒▒;▒▒c(▒b▒]V+▒p)aǵ!▒rΓ6.▒▒9▒
▒▒▒h▒▒▒[7▒▒▒sk▒▒5▒▒f▒▒▒▒▒%▒p%M(▒▒▒▒r▒▒▒nw▒:▒V/
                                              W;▒t!▒▒I▒/
▒▒ĂJd▒▒c:GƨkOt▒▒▒BNɛ▒>▒=$▒▒▒▒YX▒e▒Z▒,▒+▒▒▒m▒▒▒5▒▒`▒▒▒▒▒c▒▒▒9V▒}n▒l-▒    B▒▒z▒Q▒▒Y▒mo▒M▒WŦj▒U▒f▒V▒_▒
>▒▒▒]▒kk8<I▒C▒▒|▒▒▒I▒▒▒
▒<▒▒D▒▒N▒▒X#▒x▒A▒6▒[b▒▒▒▒ ▒▒艜ox▒▒\▒a*▒▒4~U▒▒;▒6▒▒zC▒▒,6▒J▒l▒▒$eeLŻ▒ڴ▒▒6▒▒D▒~Ț  H▒np^e▒▒=▒▒j▒_tlpzcj
                                          ▒▒▒Wύe▒▒J
                                                   M▒▒Qt▒▒b▒|▒▒H8▒X▒D▒s▒/▒5~▒▒▒J#FKĞ▒P▒▒DPR▒▒}▒▒<&▒p`▒4▒QQ▒ a▒▒;▒▒▒▒sg▒▒w▒u▒g▒:p▒▒$▒(Wa▒fQmR
l▒▒▒"7▒iP▒▒W\ߞ▒▒▒볚▒▒y▒i▒2▒I▒z▒vsDQ▒<w+ܧ▒▒)▒▒▒▒▒fvS▒k▒ؓ▒%▒,^▒▒▒▒':?▒T"[▒▒▒ٞ▒▒JX▒▒▒u▒_▒▒$▒▒F▒▒w▒▒U▒▒▒ř▒ᔸy▒O▒▒B8tu7▒▒^▒▒<▒▒▒L▒B▒8 Z՗=▒Wf▒ԍ▒▒▒ы=▒▒▒Q1▒▒▒p▒-Q▒▒▒'#V▒R{▒
▒▒#▒9▒>"▒▒▒4
▒3▒▒<▒{<n▒▒+&Lo▒0▒4▒▒Dh_·=▒▒.▒▒▒)7▒1I▒#ϴ.▒S▒F▒X<▒▒XCj3
                                                      F▒6X%:B▒▒▒▒▒▒▒g▒Ml▒-▒$▒▒2▒A▒▒▒▒▒▒M▒▒▒▒▒w1*▒▒▒Z▒^駉KO(6<#▒!?ߜ[▒▒Ya▒▒/ӓx▒▒▒mtL▒▒.▒+0▒▒▒&▒ē▒^Xx▒▒▒*Z▒▒▒n8#▒d▒5i▒▒▒▒M▒x3<▒▒▒▒▒p▒I▒Ӭ▒▒▒▒7#8d▒▒▒ά;▒▒▒W▒▒UA▒▒gdˁ2▒▒q{PrL]▒"▒?▒Pv▒▒▒x▒▒▒q,▒▒ZFb▒▒▒W▒▒▒▒Y▒ bh▒▒;P'6▒,i▒P▒`ƓJ▒▒/▒kj▒▒R▒▒>▒#▒m▒▒?[▒▒"▒x▒%▒{▒Y▒7▒T▒x▒}!▒K{y <▒E▒اX▒=-▒/▒]f▒61▒Sy▒▒q7▒▒▒p@_▒▒싒▒▒9▒▒▒▒
▒{▒▒j▒<u▒▒[.v؊Զ▒▒+▒x▒-▒2▒FgJ▒*p▒▒$▒v▒l*A▒▒0%▒▒▒J▒▒#▒
                                                    5u▒▒Ҏ▒▒▒▒H▒
                                                               լ~▒▒▒i7'8▒3▒▒X7嗑]▒<i`T▒+k(@▒ 0EBF▒
▒▒^▒▒▒
      Da▒!▒▒▒1}▒O`#▒▒▒▒▒E5▒▒▒▒▒Ύ▒▒▒▒▒▒▒▒▒▒▒p▒▒▒kx▒▒G%▒v▒▒▒▒d▒5T▒▒▒▒F▒
▒0*▒>▒h▒<J▒▒}Խ▒a▒▒▒"▒▒▒5G▒▒▒▒▒<▒{▒zo▒▒▒Q▒▒▒▒/G▒▒▒▒9h▒C▒▒Y▒▒0x'<G,(K▒▒▒3▒▒▒ȋ7▒#N▒▒n▒F72F▒-▒T▒]▒▒b▒▒▒▒▒gCh\▒C׭▒▒▒b▒R▒=9▒22▒▒y▒▒֨▒vm▒▒g▒▒▒:▒▒a▒>▒▒▒▒8▒▒w▒▒▒A▒Z$V▒e▒+$▒c▒~▒▒▒▒▒3I▒▒7▒(▒D▒▒▒Z[L▒▒L
3▒dvwI▒a▒▒Hy▒▒▒}▒wl▒▒J▒a^O▒A▒▒▒
▒▒*▒ٕ▒*4Q▒+▒T▒2Q(j▒▒ρ▒▒FIEY▒▒PF▒=▒cX▒(*▒#▒KZ▒l▒̬<▒▒▒▒I▒CBf~▒▒▒r\1▒t▒▒▒SX▒Pt▒w0VI8▒P
P▒#0N▒▒▒▒▒▒.qz▒▒▒
▒▒▒▒▒▒▒▒▒/▒▒▒▒"▒ꀥ▒▒▒>▒▒▒.▒B▒▒Z▒▒Y▒▒"V
l▒▒▒6▒^▒▒h`▒▒E▒zW-▒\▒*▒qf>▒O^>▒▒▒5V
                                   .▒fq
:Q▒▒▒{▒ْ▒▒Xt4▒:"▒▒!▒▒V▒\QvG▒_Ĥ▒▒I~Z▒▒▒[▒<▒Ma▒v'7▒@n▒2▒zqc▒,Ϊ~▒^bW▒d▒J▒▒f▒▒▒q▒2▒▒▒V▒▒Dk▒_▒▒▒t▒e▒ê▒!▒Ť▒:▒▒~,▒▒ D▒▒▒P~r@o▒▒▒▒▒lJOk▒rr▒#C~▒/▒[1▒▒▒^?2"Є▒▒`+v▒c2=▒~O7▒▒,▒▒8▒▒%I▒1M▒▒^Q▒▒mt3▒▒▒▒E▒▒▒SϳRR▒w▒▒L▒▒b%▒▒#▒Y▒-Pm
▒F▒a▒pw▒▒▒▒▒\U▒
R▒@ME▒▒۩▒▒~$Bc`d]1▒廧n▒▒<U▒▒I▒▒▒ѬK▒▒K▒▒M▒!o▒▒▒▒l▒▒ Y▒'▒▒&#▒▒▒Py▒▒|B▒Gpb▒▒1▒®[YMu▒▒▒Fs]#▒▒tX▒▒▒Y▒ߥ▒+m▒▒8▒▒▒t▒,a9▒▒▒창▒▒*▒iUw|=▒▒▒BtF-Z5ݦs@g▒cK▒▒Vx▒▒S▒0▒▒AbG3▒?|▒▒4▒y[▒▒▒e▒YU▒w▒Dͻ▒JL4V▒$▒g4'▒F▒_▒▒|_
▒!▒s▒▒Z▒▒▒▒▒D▒!eZg׉eu▒v:▒▒j▒tlY\[▒ݧ▒Z▒~l▒
eD▒5▒t▒n
ԏ▒1▒Ƅ▒fX▒▒m▒p}

´▒▒▒'▒▒ j▒F▒`▒P▒▒▒n▒▒▒!ҕ▒▒ވX▒▒  X▒▒▒
▒XB▒/▒▒@ك;I▒6U▒▒▒▒Nڜo ▒▒t;.▒=▒^▒h▒đ_Bᵇ4▒U.▒-5▒,▒?Q▒▒嵀▒9d▒y▒d[Jܠm▒▒▒}▒ä▒vȚ▒՜▒▒▒▒▒▒4▒▒▒▒#▒"▒▒▒▒▒▒▒=▒p▒.'▒oĸ▒ˎl▒▒▒▒28▒▒▒▒Hͯ▒*jm▒M▒l{
EѫaV▒]x'Z▒▒8#▒▒Xˊ▒▒:$▒▒▒▒▒▒V7|▒G▒I▒▒0▒▒▒S▒▒Q▒▒▒S6Y▒ K_▒T▒▒▒▒▒}߃▒^▒$▒▒~K▒▒B▒▒▒w  t<`▒,$▒i▒FG6▒0F▒▒ž?H▒R▒D▒1cx8M▒
                                                                                                               ▒▒FI▒▒1▒▒7▒▒<▒▒'▒▒el▒▒▒냼▒▒'4▒
▒a%r▒|▒R.▒▒▒▒▒=S▒6
▒Y$▒▒8m▒▒▒Y▒▒DH▒▒▒\▒@▒l ▒
h'Eꠎs▒▒▒▒▒▒▒▒Z▒▒▒i▒▒▒B▒9E▒sٸ▒▒▒▒"▒▒i▒ե▒P4▒t▒    q▒+▒N▒▒o▒$P>▒▒V▒▒#▒▒`▒▒=W\Z▒ٵ▒"▒g▒ZU▒@▒>▒h▒▒▒▒i▒[▒▒B▒&Y▒D)D▒▒KԠ~▒;▒▒▒▒[<h▒~▒▒▒▒z▒u▒zR▒▒▒▒Ⱥ▒▒c▒ȒT▒<▒▒h▒▒▒▒K▒▒Ƞ"▒▒G▒▒▒d:▒▒▒<▒=▒▒>O8▒?"▒2z▒▒͓▒-▒&TS▒▒▒V   ▒*.▒zr▒d▒▒z▒VAv(▒ⷞS#X▒d?*▒\b^r▒▒y▒eW▒▒▒▒:▒▒b▒▒$z▒o>▒▒▒M▒s▒Z▒=.<.<▒▒Z▒O▒W'
                               q͎▒▒<Է▒▒0e^9=
-݃Z▒▒X▒@▒]w./▒▒  B▒P >▒^HxuKS7▒▒;▒yzȸ▒Ó▒▒▒N(ݾ▒▒xx▒L▒▒N▒T▒▒R▒D▒▒`|"¹▒W▒2~▒▒▒▒Sf▒▒▒(▒▒u2▒▒;▒▒a▒.▒▒18 ▒S▒y▒▒E▒n▒F▒▒▒A5HixT|h,▒0▒S~+:▒▒m▒▒▒▒▒@j'▒r[nw΅▒▒C▒ڈiPQ▒▒o▒o'BDS▒▒8p▒▒S▒▒▒OuR▒0▒<\▒▒▒X▒)
+▒▒_▒b▒k
zj▒*▒D▒▒'aAu▒▒▒▒ۅ▒▒Q▒▒+▒o4▒▒▒I▒vQ▒▒U>▒▒w▒~U/▒&▒{k▒▒▒j^▒▒▒▒^▒n&▒t*▒▒▒▒'▒9O▒^▒▒:p▒#▒3▒]▒\zp_▒'▒▒▒▒▒+Gy▒▒▒m7S▒Y▒5E▒)▒
մŎ▒ɡ!Y▒y4▒{p▒
             W▒▒▒,▒8▒F▒~▒▒ZTΦ▒_4
▒▒▒<▒▒▒▒K▒▒ܷC▒w▒▒?(]+T▒▒R▒Zn1▒▒▒w▒▒q▒@Γ$▒▒▒%▒`w▒▒=J▒y▒l▒▒m▒w
▒$▒-▒\B▒bF▒qf▒▒XЄ▒   N▒▒▒▒                                 ▒▒▒▒▒Z
                          W▒▒▒zTa▒B▒▒▒▒1
▒▒▒▒FE▒▒▒▒▒Ҧ▒,,▒ð;1vd▒▒}▒▒Uoi}▒'I▒
r▒▒PY▒▒SI8▒(▒▒▒6i▒▒▒▒2▒▒}▒?7;1▒▒Q▒R<6▒▒`£▒▒T▒▒▒▒~2▒1P▒▒▒^;▒▒u▒▒▒;)▒     ▒▒,▒r▒tn$
                                                                                 ▒▒▒<▒d▒/▒▒▒"'▒>G▒▒}/   ▒!;▒▒f▒▒▒uh▒:▒▒po▒#▒▒bh▒▒▒O▒▒▒k▒▒W▒V▒▒kC▒▒S▒▒▒W▒b▒!*▒!▒!▒
▒?▒▒▒▒<▒▒▒L"▒
▒▒VM▒▒▒▒▒▒E▒Gq
▒▒▒▒7▒▒lw▒�▒▒j@߶P0!Xϓ▒3~▒▒▒#▒▒▒0▒▒▒WM▒@T▒~▒/N▒I▒▒S▒Udđ▒▒▒x▒▒▒x▒▒E▒▒▒gW▒▒xL%▒Ż▒~Zw▒▒nL▒6▒▒+{▒H▒m▒▒▒F>#ճ▒4▒▒▒
                                                                                                          ▒▒▒   `▒▒V▒▒▒aPI+▒▒v▒▒▒▒z▒▒▒▒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YPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTYPuTTY--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 582

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:35+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>fielddetection</eventType>
<eventState>inactive</eventState>
<eventDescription>fielddetection alarm</eventDescription>
<channelName>Camera 01</channelName>
</EventNotificationAlert>


--boundary
--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 779

<?xml version="1.0" encoding="UTF-8"?>
<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:39+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
<channelName>Camera 01</channelName>
<Extensions>
<serialNumber>DS-2CD2347G2-LU20210311AAWRF64923035</serialNumber>
<eventPush>DS-2CD2347G2-LU20210311AAWRF64923035,2021-07-21T15:42:39+09:30,1.0</eventPush>
</Extensions>
</EventNotificationAlert>
--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:40+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:41+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:42+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:43+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:44+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:45+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:46+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:47+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:47+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:48+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 779

<?xml version="1.0" encoding="UTF-8"?>
<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:49+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
<channelName>Camera 01</channelName>
<Extensions>
<serialNumber>DS-2CD2347G2-LU20210311AAWRF64923035</serialNumber>
<eventPush>DS-2CD2347G2-LU20210311AAWRF64923035,2021-07-21T15:42:49+09:30,1.0</eventPush>
</Extensions>
</EventNotificationAlert>
--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 725

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:49+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Camera 01</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 582

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::ffff:192.168.100.131</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:54+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>fielddetection</eventType>
<eventState>inactive</eventState>
<eventDescription>fielddetection alarm</eventDescription>
<channelName>Camera 01</channelName>
</EventNotificationAlert>


--boundary
--boundary
Content-Type: application/xml; charset="UTF-8"
Content-Length: 779

<?xml version="1.0" encoding="UTF-8"?>
<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.100.131</ipAddress>
<ipv6Address>::</ipv6Address>
<portNo>80</portNo>
<protocol>HTTP</protocol>
<macAddress>08:a1:89:6d:c1:9b</macAddress>
<channelID>1</channelID>
<dateTime>2021-07-21T15:42:59+09:30</dateTime>
<activePostCount>1</activePostCount>
<eventType>videoloss</eventType>
<eventState>inactive</eventState>
<eventDescription>videoloss alarm</eventDescription>
<channelName>Camera 01</channelName>
<Extensions>
<serialNumber>DS-2CD2347G2-LU20210311AAWRF64923035</serialNumber>
<eventPush>DS-2CD2347G2-LU20210311AAWRF64923035,2021-07-21T15:42:59+09:30,1.0</eventPush>
</Extensions>
</EventNotificationAlert>

I tried it twice and it did the same both times. I cut the amount of garbage down as there would have been like 20 pages of it.

@Mincka
Copy link

Mincka commented Sep 7, 2021

This issue was also troubleshot here:
Supergiovane/node-red-contrib-hikvision-ultimate#16

The exception is thrown here because the duration eventType is unknown from sensor map.

This is a special event type to notify the beginning and ending of the target moving inside the zone for Intrusion Detection (aka FieldDetection). Its parsing is more complicated since the linked events are in a list:

<DurationList>
  <Duration>
    <relationEvent>fielddetection</relationEvent>
  </Duration>
</DurationList>

Maybe it's useful if you catch up the feed in the middle of an event. The receiver knows there are some kind of events still in progress.

From what I see in the linked issue, it should not be useful for HA since there are already fielddetection events with the states active then inactive. In this case, the easy fix would be to add duration to the sensor map but ignore its processing (return directly in process_stream.

@mezz64
Copy link
Owner

mezz64 commented Sep 11, 2021

I'm short on time these days to implement fixes, but can usually make time to review and merge a PR if someone wants to take a stab at it.

@mezz64
Copy link
Owner

mezz64 commented Oct 26, 2021

Fixed with PR #79.

@mezz64 mezz64 closed this as completed Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants