[RELEASE] Hikvision Alarm (HTTP Listening/Data Streaming/Alarm Server)

You should see more than just "Camera IP Address" in the Preferences section. Did you try to copy-paste the code again?

Hi, I've added this to my hubitat and it didn't work as event comes as duration.

<EventNotificationAlert version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
<ipAddress>192.168.12.2</ipAddress>
<portNo>39501</portNo>
<protocol>HTTP</protocol>
<macAddress>e8:a0:ed:91:c8:70</macAddress>
<channelID>1</channelID>
<dateTime>2024-10-03T12:16:01+08:00</dateTime>
<activePostCount>1</activePostCount>
<eventType>duration</eventType>
<eventState>active</eventState>
<eventDescription>duration alarm</eventDescription>
<channelName>Front Door</channelName>
<DurationList>
<Duration>
<relationEvent>fielddetection</relationEvent>
</Duration>
</DurationList>
<isDataRetransmission>false</isDataRetransmission>
</EventNotificationAlert>

I've added the following code after String eventDateTime = body.dateTime.text() to make it work

    if ( eventType == "duration" ) {
        eventType = body.DurationList.Duration.relationEvent.text()
    }