You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just received a new camera which should support Onvif. It does, but initially an error is triggered.
I did some digging around and found a workaround by patching node_modules/onvif/lib/events.js.
Apparently the package "onvif" does not correctly parse the response and not parse date.
This patch worked:
function _terminationTime(response) {
if (typeof response.currentTime === "string") {
response.currentTime = new Date(Date.parse(response.currentTime));
}
if (typeof response.terminationTime === "string") {
response.terminationTime = new Date(Date.parse(response.terminationTime));
}
return new Date(Date.now() - response.currentTime.getTime() + response.terminationTime.getTime());
}
The text was updated successfully, but these errors were encountered:
Hi,
I just received a new camera which should support Onvif. It does, but initially an error is triggered.
I did some digging around and found a workaround by patching
node_modules/onvif/lib/events.js
.Apparently the package "onvif" does not correctly parse the response and not parse date.
This patch worked:
The text was updated successfully, but these errors were encountered: