How to Configure Gmail for Device Notifications - DVRCMS.Com

How to Configure Gmail for Device Notifications

How to Configure Gmail for Device Notifications ,Why does my Gmail email address no longer work for receiving email notifications from my equipment? How to create an App for your Gmail account so that your CCTV equipment can send email notifications

As of the 30th May 2022, Google has removed the for use of third-party apps or devices which can use your Gmail address using only your normal username and password.

Google's statement about it is here:

 

1654871563903.png

As CCTV equipment is a third-party device, you will have probably found that email notifications are no longer being sent from your Gmail account because of this.

If you were previously using a Gmail account for your email notifications, then there are a couple of options to get your notifications working again.

How to Configure Gmail for Device Notifications

Read More :

  1. How do I use Internet Explorer mode in Microsoft Edge
  2. Dahua Password Reset Instructions
  3. Milesight VMS Enterprise Setup Guide

Option 1:​

Set up an “app password” in your Google account for your device, which will be different to your normal password.​
This guide explains how to do this:​

Option 2:​

A quick (and perhaps obvious) fix is just to use another email account from a different provider for sending your notifications instead – Outlook accounts seem to work well for this.​
NB – If you are using a Hikvision camera or recorder to send your email notifications, then make sure that the total length of your Outlook email address does not exceed 31 characters, as the notifications will not work properly otherwise.
Here are the SMTP you need when setting up email notifications with an Outlook account:​
SMTP server name: smtp.office365.com​
SMTP port number: 587​
Encryption: TLS​
STARTTLS: Enable​
To use a Gmail account to send you CCTV equipment's email notifications, you now need to set up a unique third-party app password for it. Most other email providers still allow third-party apps or devices to use your account with your normal password for it, but Google no longer permits this as a new security feature.

It's a relatively simple thing to set up in your Google account settings, which the steps below explain.


Step 1:​

Go to your Google Account and click Security in the left-hand pane.​
1655221507727.jpeg

Step 2:​

In the Signing in to Google section, turn on 2-Step Verification if you haven't already by clicking on it and following the on-screen .​
1655221591371.jpeg

Step 3:​

Follow the on-screen instructions to enable 2-Step verification.​
1655288520065.jpeg

Step 4:​

You should now see App passwords underneath 2-Step Verification, click on this.​
1655222187370.jpeg

Step 5:​

Enter the password for your Google account when prompted.​

Step 6:​

Select Other (Custom name) in the Select app dropdown, set a name to identify the app password by, and then click GENERATE.​
1655222270453.jpeg
1655222296161.jpeg

Step 7:​

You will be shown the unique 16-letter password that Google has created for your device.​
You will only need to enter this in your NVR's email settings, so copy this, but keep the page open for now in case you need to refer back to it.​
1655222315106.jpeg

Step 8:​

to your CCTV camera or recorder in a , paste / enter the new password, and save the changes.​
You will normally be asked for a username too, which is just your email address.​
The Gmail SMTP server is smtp.gmail.com, and the use-IP sender SMTP port is 465 (for SSL encryption) and 587 (for TLS encryption) – if you are not given the option to use either SSL or TLS, then both port numbers should work fine.​
For example, if you are setting up email notifications to be sent from a Hikvision device, navigate to:​
→ Network → Advanced Configuration → Email
Then, complete the settings as explained above, but also specify which email addresses you would like to receive the notifications.​
Use the option to send a test email if you have it, this should arrive in your Gmail inbox if your new password and settings are accepted.​
1655288795481.jpeg

Step 9:​

That's it – your new app password is working and allowing your CCTV device to send emails via Gmail.​
You can find a record of all of the passwords that you've created in the App passwords section of your Google account's Security settings.​
However, you will not be able to see the password itself again, so if you need to enter this again on your CCTV camera or recorder then you will need to delete the existing password and create a new one here.​
1655288870180.jpeg
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…

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 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 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.

Print Friendly, PDF & Email

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.