01304 827609 info@use-ip.co.uk Find us

DS-2CD2146G2-ISU Intrusion Detection Notification via emails

George-H

Well-Known Member
Messages
50
Points
8
I've just bought a DS-2CD2146G2-ISU (from Use-IP) for testing on a remote outdoor site (which belongs to a friend). My first experience with Hikvision and not a CCTV "pro" - the day job is IT/networks. So forgive me if I'm a "newbie". Not a complete "newbie" to IP CCTV though (see below).

The site is already equipped with a 7 camera plus NVR Foscam system which has been working reasonably well for the past 3+ years. It started out with 4 cameras (and 9 channel NVR) and has grown as the site has been developed. There was no point going for anything more "up market" to begin with as for a long time it was limited to standard ADSL (it only had EO phone lines - 20 of them). That was resolved at the start of this year when we managed to persuade BT Openreach to re-route the copper for one of the lines the nearest FTTC cabinet. It now has full 80/20 FTTC and gives virtually max speed for 80/20.

That now all works great, complete with 24-hour recording, live remote monitoring through the firewall to the NVR (and via VPN for network access) and email notificaitons. Even added an Axis C1310-E with both recorded annoucements (triggered via the web UI) and live "Oi you!" via peer2peer SIP.

Being an outdoor site, basic motion detection can generate a storm of emails, especially during bad weather. The primary reason for looking at doing a gradual uprade from Foscam to Hikvision for Acusense. Checked with Hikvision UK before buying to check that all the smart stuff is done "in camera" and not depenant on the NVR. Essential at this stage. At the moment we just need the camera to send email notifications when it detects "human" activity via Smart Events.

The DS-2CD2146G2-ISU arrived last Monday and didn't take long to get it up and running on the local LAN on site via PoE. Even managed to get the Foscam NVR to do the video recording via ONVIF - after tweaking the main and substream video settings to match the FI9961EP Foscams, enabling ONVIF in the Intergration settings and setting up an ONVIF user.

Have done all the network settings in line with rest of the system (fixed IP, changed the default ports used for HTTP, HTTPS and ONVIF. All well and good. It gets the time via NTP and so DNS resolution is working.

Couldn't get past "Failed" when testing the email settings until I upgraded the firmware from the 2018 it came installed to the current release:

Hik-1.JPG

After doing that emails worked and could send test emails.

Event notifications, however, have proven very difficult. So far I've only managed to get it to send one email (with attached pic) for via "Scene Change". And that was triggered when it switched from day to night vision. So it CAN send emails with attached pics.

What I really want to get working is Intrusion Detection.

As far as I can this should be a matter of setting up the dectection zones, min and max target sizes, enabling it, ensuring scheduling is set and linking it to send emails.

I turned on "Rules" so I can see what it is doing in the live view and it appears to detect targets - boxes going red etc.

Hik-2.JPG


Does it log anything in the logs? NO
Does it send any emails? NO.

I'm at a complete loss as to figure out why.

Just in case it might have been one of those weird settings issues that sometimes happen after a significant firmware upgrade (as I had with the C1310-E), I've this morning done a full "Restore Defaults" and reconfigured everything from scratch. No change.

Any suggestions would be much appreciated.

George

*** Update ***

Just had a really good chat with one of the (extremely helpful) guys at Use-IP and most likely down to the fact that because the camera is operating "stand-alone", i.e. not hooked up to a Hikvision NVR for event management, it needs local storage (micro SD card) for them to work properly. Also goes a long way to explain the lack of event log entries.

I shall put in a 16GB card (it isn't doing video recording on it, just events) and see how I get on.

I knew it would be something to do with becoming familiar with the vastly more sophisticated Hikvision kit :)

One learns by getting things wrong ;)
 
Last edited:
Time for an update....

With a lot of input from Kyle and the guys at Use-IP, a lot of testing has been going on to try and figure this one out.

I'll pick up at the point when I put in a 128GB microSD card. It was going to be a 16GB as I just happened to have around, as one does. But I thought, if I can can it before I'm next with the camera, I may as well but in a decent sized on - so 128GB it was.

brb..

.... some while later

Interrupted by PAT testing at work and had to shut everything down while it was done.

... back to the memory card.

Ok put the card in, logged into the web interface and formatted the card. As it would now have local storage I enabled scheduled
recording. Even though main 24 hour recording was being done by the Foscam NVR via ONVIF, there was no reason NOT to turn it on. That proved very wise!

Verified the settings and then did a bit of "walk testing".....

I'll add more later as I don't have access to the numerous pics I did.

TBC....;)

Ok it's 18:44 and I'll continue.

After doing some "walk-testing" and leaving it runnig for a while with "excessive" intrusion detection zones set up - after I actualy WANT it to trigger a lot just to make it do something - I eagerly kept an eye on one of two email accounts used to receive notification emails from the main Foscam system. This makes it a lot easier to seperate CCTV emails from others.

Time passed and.... Nothing. No Emails.

First thing that was obvious when I logged back in was plenty of log entries! YEAH!

Now this is where the decision to turn on 24/7 scheduled recording to the microSD card paid dividends. I could now correlate everu Alarm event log entry with the recorded video using the log entry time. Even better, because I turned "Rules" on, all detection stuff was also on the images:

Hik-Log-01.JPG


And the video which triggerd them:

Hik-ID-Video-01.JPG
Hik-ID-Video-02.JPG
Hik-ID-Video-03.JPG


So that categorically proved Intrusion Detection was working, and working very nicely. So there must be something else causing the abscense of notification emails...

After feeding all this back to Kyle - there was lot more being testeed which didn't add anything other "it's not that" - he came back with further suggestions relating us the video being recorded by our Foscam FN3109H NVR via ONVIF. Just in case the NVR is trying to fiddle with the camera's configuration in ways it is not supposed to, not being a Hikviison NVR. A perfectly sound suggestion and one which could only be eliminated by testing. So I did.

Without putting all the "gory" detais up this was done first by removing the camera feed from the NVR and disabling ONVIF on the camera (under Intergration Protocols). No change withe the emails.

Just to be sure, and because I started out with a "less than standard" configuration, I did a full factory reset on the camera and configured it just enough so tha it SHOULD generate emails without anything else being done. Not port changes, no main and sub stream changes, no ONIVIF no anything other the minimum.

No emails.... Hmmm

Correctio no emails EXCEPT the test emails. They always came through our Outlook.com mail account setup for the CCTV system to send notifications out through.

Since that "minimal change" configuration test didn't result in any change in the emails, I reconfigured it back to our "desired" configuration with LOADS of stuff changed. No emails, but we had eveything else working includig our existing NVR happily recording!

The side benefit of doing this was that through the NVR's web interfaece - which is accessible remotely through our firewall - we can happily monitor all 8 cameras simultaenously using the NVRs 9-up view. We can also, do the usual such pick a single camera stream, make it full screen. digitally zoom in and out etc. All done just by logging into the NVR.

That was just over a week ago and a few well deserved days off work...
 
Last edited:
Upvote 0
I thought I would do this bit as a seperate post.

I was on my way home the 30th May when a thought occurred as what else I hadn't tried - and, with Kyle's help and guidence, I've a LOT.

Hmmm... So far we'd stuck with or Outllook.com mail account as the email provider for send all the notifications. It has been working perfectly well for over 3 years with the Foscam stuff.

Well, when I say "perfectly well" that is discounting the daily "send limit" which Microsoft imposes of "around" 300 emails in a 24-hour period. Chicken feed compared to the number of emails several outdoor cameras with "crude motion detection" can generate in bad weather. Contrary to what Microsoft imply, paying for an "ad-free" Outlook.com subscriptionl, has ZERO effect on that limit. I know. I've done it!

If anyone would like me to share my experience with that - using Office.com - I'm more than happy.

Anyway, just for the hell of it I created a Gmail account to try.

At first it the camera's test emails failed. Not huge problem as I'd seen posts about having to change some setting on Gmail accounts along the lines of "Allow less secure apps". Did that and test emails started working.

So far we were now in the same position only using a different email provider.

Then it happend - a shed of notification emails started coming through from the Gmail account!

B****r Me! It's working!!!! And with everything configured as we'd like, Foscam NVR and all!

The only concrete conclusion that can taken from that is there is some fundamental issue between the Hikvision DS-2CD2146G2-ISU and Outlook.com. What I have no idea.

Microsoft don't help a great deal. They used to send a notification email when you hit the "daily limit" to say that is what has happened and that outgoing where subsequently blocked, They stopped that well over a year ago. The only way you know they blocked sending emails is when you notice motion detections showing on the "live view" but not a single email.

So unlike Gmail, where they helpfully tell your ougoing emails are being blocked, Microsoft tell you nothiing.

So the situation as of today is I've raised a supprt case with Microsoft - the ONLY benefit of the paid Office.com subscription - asking for extracts from outgoing mailflow logs for our mailbox for specific days. That is going to be the best way of trying to figure out why the Hikvisions notifications are being blocked 100%. Really weird given the fact the test emails work!

When (more like IF) Microsoft caugh any useful information, I will of course do and update.

:)
George
 
Upvote 0
Another update in the saga of the "Oulook.com Email Swallowing Black Hole" :)

A fair amount of back-and fort with Oulook.com support. Supplying them with various screen snips of the camera's SMTP email settings, camera event logs (precise indicators for when emails should have been sent), test emails sent from the camera, and the "source" of the received emails (the View Source option Outlook.com webmail - shows all the internet headers) copied to Word documents and forwarded

This has been done for the Outlook.com mailbox I'm trying to send from, where only the test emails get sent and event notifications disappear into the black hole and out of existence. Oddly the ones from the 7 Foscam camera have always been ok being sent through the same mailbox.

Also did the same tests using a Gmail account I setup as a test. Unlike the Outlook.com one, Gmail (afer enabling "Allow less secure apps") had no issus at all sending test and even notification emails from the Hikvision. I think my "test" Gmail account is going to be used for some while LOL.

Anyway, the idea was Oulook.com frontline support would escalate this up the chain so that someone with the necessary back-end server access could check the server logs and find out what is happening to the event notifications, where these emails are going as they not being sent. They've had those for a few days now (since Wednesday) and I had reply late Thursday:

1623525298304.png


Hmmm... Try an "alternate Microsoft Account"? Did they mean setup another Outlook.com account, or any mailbox as long as it is a Microsoft one?

As I was pretty certain that using a different Outlook.com account isn't going to show much - although it might - I thought I'd throw them a curve ball! ;)

In the day job I run my empoyers IT systems (I AM the IT department, all of it LOL) which means I also manage all of their Microsoft 365 (used to be called Office 365) subscriptions. Included in that are some Exchange Online (Kiosk) licences - these are basically just mailboxes. I use a few of them for such things as sending server backup notifications, server UPS notificaions and server hardware issue notifications (RAID array drive failures etc) from Dell iDRAC remote server management cards. All sent via these Exhcange Online mailboxes using SMTP.

So, I created a new one for the camera use as a test. Put all the SMTP account details into the Hikvision camera and clicked on Test - success and a few seconds later the test email came through. Did a second just to be sure - yep all appears Ok.

Now for the acid test - Intrusion Detection notification emails.

Arranged for my friend who owns the site to do a couple of walk tests, which he never got around to.

He didn't need to as a passer by did it for us only a few minutes after doing the test emails and triggered the event. I only knew that because - lo and behold - I received an Intrusion Detection event notification!!!

Well that settles it.

I'm pretty certain that it is not some fundamental issue with the camera's SMTP mail client when trying use Microsoft account mailboxes using STARTTLS. It is something else. Probably the (overly) aggressive spam detection and filtering.

Whatever Outlook.com is doing with the emails - and it is specific to Outlook.com - I don't think it is anything to do with the camera itself. If it were I would have expected to encounter problems with Exchange Online. After all, that basically provides the back-end for Outlook.com - Exchange Online.

I'll do another update when (IF) I get any replies from Microsoft Outlook.com Support. However, while I may get replies, I can't make any promises that what I do receive from them will not be totally and utterly devoid of "answers" LOL.

George
 
Upvote 0
More back-and-forth with Microsoft's Outlook.com "so-called" support.

Now they are back to "increasing your account sending reputation" and that I should add the sending account as a "trusted sender" on the receiving email accounts.. DOHHH WHY?????

These emails are being blocked from being sent by Outlook.com and they are not the least bit interested in doing any serious investigation of why.

I'm close to giving up on this and cancelling my Outlook.com subscription - it serves no purpose if they can't even figure (or even attempt to figure out) why these aren't being sent.

My STRONG advice to anyone using Hikvision kit - DO NOT USE Outlook.com mail accounts for sending notifications. They MAY work, but my experience is they won't and Microsoft will not do a thing to tell you why.

Free GMail works fine, with the "Allow less secure apps" setting turned on.

Exchange Online (Kiosk) email accounts also work fine, but usually need to be added on to existing Microsoft 365 (formerly Office 365) subscriptions. One word of advice on that - DO NOT GET THEM THROUGH GoDaddy. Go direct to Microsoft.

The camera - absolutely brilliant!!!!!

As a final snippet, how is this for "spooky"?

Any alternative suggestions as to what this may be, would be much appreciated:

Originally picked up via Intrusion Detection early this morning. Almost no wind and only intermittent rain. The camera itself mounted in a reasonably sheltered position under the "significant" over hanging eaves (over 2 feet deep) of the building roof:

1624102928752.png


Attached are screen snips taken from the video recorded by the camera itself - as it has the "rules" visible.

What ever it is takes several seconds to (relatively) slowly go from right to left, near horizontally.

Where's that Yvette Fielding and "Most Haunted" when you need them ;):) LOL
 

Attachments

  • Pic4.png
    Pic4.png
    1.3 MB · Views: 310
  • Pic5.png
    Pic5.png
    1.2 MB · Views: 315
  • Pic6.png
    Pic6.png
    1.3 MB · Views: 308
Upvote 0
Those "floaters" in the images that trigger your rules are very common, I see them all of the time on two of my cameras. Not sure what they are - very small insect or something that's blown off a plant, a cobweb floating around the camera. There was a story in a North East paper recently where a grieving mother believed the "orbs" were the spirit of her recently lost son - absolutely tragic and somewhat despicable that the newspaper reported it and no one had the heart to tell her...
 
Upvote 0
Those "floaters" in the images that trigger your rules are very common, I see them all of the time on two of my cameras. Not sure what they are - very small insect or something that's blown off a plant, a cobweb floating around the camera. There was a story in a North East paper recently where a grieving mother believed the "orbs" were the spirit of her recently lost son - absolutely tragic and somewhat despicable that the newspaper reported it and no one had the heart to tell her...

I think in our case it has to be something, at least partially, to do with that camera's specific location and orientation. There are 7 other cameras (Foscam) on the site - you can see the IR illumation from two of them around the gate area. Four have been there for over 3-4 years now and haven't seen that sort of effect. I'm definitely convinced that it is something natural - it is an outdoor site - rather than "supernaturnal" which just happens to show up on that camera due to position.

Off to the right, out of shot, are another three cameras, one of which is potentially well positioned to provide "back IR illumination" to what ever the "patch" is. No doubt increasing the effect.

It is interesting though and makes a change from the "squabbling pigeons", "patrolling local cats", and deer. :)

Also beats the gazillion things which trigger the Foscams - anything from rain, flying bugs, spiders (AAGGGHHH!), just anything that can change a few pixels at night.
 
Upvote 0
*** Update on Outlook.com ***

Here's another update in the lonnng running saga of getting email notifications from this camera working via Outlook.com.

First thing to say is that I NOW HAVE IT WORKING! Albeit being sent from a different and newly created Outlook.com account to the existing one used by the Foscams. Hmmmm

Clearly, something about the way the emails are formatted by the Foscams and the Hikvision are triggering some form of "spam suppression" with Outlook.com and blocking the Hikvision ones being sent.

Best guess is the "sender" details just seem too different to Outlook.com, causing it throw a "hissy fit".

This is how emails from the Foscams appear (certain details may be "redacted" for security reasons):

1624381728590.png


Where as ones sent from the Hikvision (currently) appear as:

1624381794052.png


I'm just wondering if changing the sender in the Hikvision SMTP settings to "NVR" may overcome the issue. I just get the feeling that the emails appearing as two different senders - one "NVR" the other "WRS Camera 8" it is causing the "newer" "WRS Camera 8" to be treated as a "spoofing/spamming" attempts and sent into the "black hole".

I'll give it a try, changing the "sender" to NVR and see what happens.

I think the moto of this is - one learns a lot more trying to do things in strange, weird ways (even if they seem perfectly sensible to me) than by doing them in the (obivous?) straight forward way.

Anyway - I shall give it a try and report back.

;)
George

Later.....

Nope. Still didn't like it. No notifications from the Hikvision via the original Outlook.com mail account after changing the "sender" to "NVR" were sent. Test emails yes, notifications NO.

Changing SMTP server between smtp.outlook.com and smpt.office65.com (both work for the test emails on both the existing and new Outlook.com accounts) also didn't make a difference.

It is something more subtle.

For the moment I'm going to run the Hikvision emails through the new Outlook.com account (which works) to see if it continues working...

Stranger and stranger.....
 
Last edited by a moderator:
Upvote 0
Been a while since I did an update on this.

Bottom line - No idea why my original Outlook.com email account refused to send notification emails, while happily sending Foscam notifications, other emails and the HikVision test emails.

Microsoft Outlook.com support I have to say are a total waste of space. After receiving absolutely dreadful (even childish) support from Microsoft I escalated this via one of their PR contacts and it was supposedly investigated by someone senior at Microsoft in the US.

All looked promising until after a while that case - the investigation into rubbish level of support - was suddenly closed and the email address discontinued. I never did get a believable answer.

So Outlook.com CAN work, but if you encounter problems don't expect Microsoft to help even if you are PAYING for it ("ad free" Outlook.com). Easier to create a new (free!) Outlook.com mailbox and try that.

If that doesn't work, use GMail (which seems to work fine) or Exchange Online (part of what is now called Microsoft 365 but used to be called Office 365) which also works fine and is not encumber with the ~300 per 24 hours sending limit Outlook.com has (whether "free" or paid for).

Anyway - I have now bought the next two cameras (both DS-2CD2146G2-ISU) as part of our rolling upgrade of the site from Foscam to HikVision.

I installed the first today as a direct replacement for one of the Foscams.

Using the experience gained with that first "trial" camera, we had this second one up and running within a couple of hours with EVERYTHING working - this includes Smart Event Notification emails (via the same mail account as our first HikVision), the Foscam NVR happily recording the main stream via ONVIF (in addition to each HikVision doing onboard recording on the microSD, very useful for identifying event triggers) and both HikVisions availble in live remote viewing along with the Foscams on my mobile in TinyCam Pro. I now can view all 8 cameras from anywhere on my mobile without using any 3rd party services. :)

No doubt helped by installing a 128GB SanDisk Ultra microSD before doing anything else LOL.

There was a hitch in getting the HikVisions to work with TinyCam - you MUST forward not just the HTTPS port but also the RTSP port thorugh the site firwarewall. Otherwise it doesn't work.
 
Last edited:
Upvote 0
Cheers for the like Kyle - much appreciated.

Current update, the second of the two new cameras has now been installed (a couple of weeks ago). Both of the second new cameras replacing existing Foscam ones.

The second (making 3 Hikvisions in total) took a little faffing about to physically install - the comments from my friend who owns the site generally being along the lines of "they are really good cameras, so why do the supply such crap screws?"

I think he was referring to the ones used for securing the junction box in place which seem to be neither posidrive nor Philips and (again in his words) "made of lead".

Anyway, once in place it took less than 20 minutes to do all the software configuration and have EVERTYTHING, and I mean EVERYTHING working beautifully. Even with live monitoring using TinyCam Pro on my (Android) phone - of all 8 cameras - in mixed Foscam/Hikvision environment. I do like a "challenge" :)

All three new HikVisions doing 24 hour recording to the Foscam NVR (via ONVIF) as well as their installe micro SD cards - very useful for checking what has triggered a event notification with "Rules" enabled.

Notifications from the Hikvisions are still being sent via a secondary Outlook.com account, which I am gradually becoming deeply unstrusting off - it was "blocked for suspicious activity" after sending barely 17 emails in 24 hours and the email saying it had been blocked contained a link to the "Term and Condition" which I allegedly may have contravened. Except it didn't take me to the Ts&Cs but to a bloody great Window 11 ad. Superb own goal by Mickeysoft. Are Microsoft now randomly blocking Outlook.com accounts just to push Windows 11 ads? Hmmmm

Speaking of which, being a persistant so and so, I resurrected my Support Case via the usual channels (aim very high and let the s**t flow down from on high - it hurts those it hits more lower down prompting more vigerous action.

After a few direct calls from the USA, supposedly from the 3rd level support, I was told yesterday during the update call that the problem was "fixed". According to their engineering teams.

In my **** years doing IT technical support (I have to look up my personal history in the libary under paleontology, Precambrian), it has been a generally accepted principal that a problem is not "fixed" until the customer/end user has tested it and confirmed it fixed. Apparently not in the world of Microsoft. They can just declare something as "fixed" and it is so...

In which case Microsoft, please declare that my bank account now contains £10bn and that I'm now immortal and a minor deity. What? You can't? Why not? You can declare a problem fixed without even bothering to test it. So why not this?

Me being me decided to put their "hypothesis" to the test. I reconfigured one of my (now three) HikVisions to go through the original Outlook.com account and even did a site visit today to wander about triggering cameras.

The result for Microsoft? EPIC FAIL!!!! Not a SINGLE email from that camera.

Sorry Microsoft 3rd level support and Outlook.com "engineering teams". I'm sure you found something and honestly believe that you have fixed A problem. Unfortunately, you have not fixed THE problem.

Try again... And this time, try TRY HARDER....

;):)
 
Last edited:
Upvote 0
Time for another update on what has become something of a saga.....

So what has happened since September 15th?

Well after several weeks of "We are making progress with the investigation" but nothing in the way of feedback from the (alleged) guy in Mirosoft Tier 3 support, I received an email asking me to confirm what mail client protocol the camera uses - Exchange/POP/IMAP?

So I said "SMTP".

That didn't compute as that particular bit of Microsoft thought SMTP was not a mail protocal.... REALLY????

So I cleared up that bit of misconception for them.

More time passes and I receive another nonsense request. So I point blank refused and explained why. I also infomed them I'm doing anything more they request without them providing some feedback on what this "progress" they claimed to have been making actually was.

That went down like a proverbial lead ballon and they closed the case again on the 23rd October.

I used my "universal case opening tool" and got it reopened again - it is amazing what a few choicely worded email to the CEO, and the main marketing contact emails can do LOL.

Fresh set of emails began with my new technical support contact began -this time in the UK - on the 26th October.

Now this is where things get interesting!

I received a phone call from my new contact, Daniel, on 28th October (last Thursday). This guy was the real deal with the in-depth technical knowledge and experience to match. FInally!!

A very interesting series of phone calls and emails during which Daniel was able to check and verify that two Outlook.com accounts that I'm using for sending camera event notification are the same in all the important areas which could be relevant. He was very puzzled why one account worked and the other one didn't.

Best of all, loads of feedback from him of what has been done, checked, etc.

----------------------
Quick summary:


The Outlook.com mail account all of our Foscams have been sending alarm notification event emails via for a few years, works fine this Hikvision camera sending test emails. Real alarm event notificatios simply disappear into some black hole - none are receivd and there is no trace of them ever being sent.

A second Outlook.com mail account I set up a month or two ago work fine - it sends everything from this model Hikvision. So why not the other account.
---------------------

On Friday Daniel was doing some further checking on the backend systems by Microsoft and at accidentally put the "problem" email account address into the wrong field and it got truncated causing what ever it was he was trying to checl to fail.

Then a lightbulb went on and a flash of inspirational genius!

On the basis of that Daniel asked if I could add and particular mail alias to the problem mail acoumt and see the camera could send notificaiton emails through the problem account using that alias for both the SMTP "Senders address" and "Username".

BINGO!!!!

IT WORKED!!!!


The "problem" email account is 32 characters long - "xxxxxxxxxxxxxxxxxxxx@outlook.com".

Putting that into the "Sender's address" and "User name" fields under SMTP email settings works for sending camera test emails but never works for sending event notificatios.

The alias address setup on the same "problem" account is 23 characters long - "xxxxxxxxxxx@outlook.com" - which is identical in length to the email address of the other ccount whch I set up for testing and which works.

Putting that alias into the "Sender's address" and "User name" fields under SMTP email settings works for both sending camera test emails AND works for sending event noticaitons as well. All through an Outlook.com email account which, up to that point, had NEVER worked for sending Hivision event notifications.

It appears that when the camera tries to send event notification emails using entries in "Sender's address" and "User name" fields which are 32 characters long, one or both gets truncated when sent to the SMTP mail server causing them to be not recognised and the send request to fail.

Fundamental Question for Hikvision:

Is there a differnece in the way the code that sends test emails, and the code which send event notications handles the data in thos two fields?

Specifically can the code which sends event notifications NOT handle the same length data as the test email code so that entries which work for test emails DO NOT work for event notifications because they are too long?


Over to Hikvision
 
Upvote 0
I've just had a response from Hikvision's R&D team on this, sorry that it's taken so long!

R&D has confirmed that there is a coding command that causes the limit to the email address to be 32 characters.
Users can test successfully using the 32+ character addresses, but it cannot be used in real-time event notification due to the limited stability of the mail server and it gets truncated during sending, even if the full address can be seen on the web page. In some of the older firmware versions, users were not able to enter an email address that is longer than 32 characters and there would be an error prompt when the length is exceeded.
I've got no idea why this error prompt was removed, or why you're still able to input and test the longer addresses, but it seems to confirm your findings and suspicions.
 
Upvote 0
Hi Kyle,

I really appreciate you getting a definitive answer from Hikvision on this, and it makes logical sense.

I think the removal of the input validation check is something which probably made sense to someone at time LOL.

It could even be they started work on increasing the permissable email address length but for some reason it was not followed through at that time, and the validation check removal slipped through into released firmware

They did mention something about "limited stability of the mail server". So perhaps issues with the mail server "component" made increasing the email address length a much bigger job than anticipited - maybe needing a major upgrade or rewrite of the mail server - and in the grand scheme of things they will have had much higher priority firmware issues to concentrate on.

I very much doubt I'm the first to come across this, but I suspect those who have came across it before have resolved it by trial and error - simply trying different email addresses until they found one which worked. Then having found one which works, moved on. LOL.

I just couldn't do that. I had to get the bottom why it didn't work, and we've got there!

I don't think Hikvision will be assigning much of a priority to putting email length validation check back in, which doesn't bother me at all. The key outcome of this is that the problem has been identified which should give anyone else coming across this a somewhat easier time with a simple check:

- If test emails are sent ok but event notification emails are NOT sent and leave no trace of being sent, check the length of the email address is < 32 characters.

It being fixed in the firmware will be a "nice to have in the fullness of time" LOL

That's the other useful thing that came out of this. I've tried looking, but just could not find specified anywhere the max length of the email address allowed by the camera. Now we know it is 31 characters.

I know Hikvsion said 32 in their response, but I think they are including an "end of string" character (typically NULL) in that making the actual limit 31. The reason I think that is the email that was the cause of the issue just happens to be exactly 32 characters, and yet it was still being truncated.

What a journey!!! LOL
 
Upvote 0
Back
Top