Action Maps (Alerts)

Articles based on common support questions.
Post Reply
varghesesa
Posts: 52
Joined: Thu Jul 11, 2019 9:52 pm

Action Maps (Alerts)

Post by varghesesa » Fri Sep 03, 2021 9:45 pm

Introduction

Not really sure what this article will become. Right now, I am using it as a placeholder for gotchas based on tickets associated with the action map and creating alerts.

Gotchas

Gotcha 4: Push notifications

Update to the latest version or the latest stable version of the BI server. Update to the latest version of the app.
Features/functionality on the mobile app are not guaranteed to run with older versions of the server.

Divide the problem into server vs mobile app.
Did the BI Server send the Push alert?

Confirm alerts are being sent from server

Must understand the logs to know what is going on.
status log confirmation.png
status log confirmation.png (21.95 KiB) Viewed 3106 times

Furthermore, confirm the Alert is sent soon after BI senses Motion. The gap between the MOTION event and the Alert should not be more than 1-2s.

motion-alert-trace.png
motion-alert-trace.png (20.46 KiB) Viewed 3106 times

Logs state the Push notification was NOT sent.

If the logs state the Push notification was sent, scroll down to Log states alerts are sent section.

You know something with the server (or server settings) is the issue.

Something is very likely broken between Cameras -> Trigger settings -> Alert settings.
Or your server settings are incorrect.

Cameras
Are the cameras working?
See Camera Stream Optimization article.

Permissions / Global Settings
If you have multiple users on phones and some Push notifications work for some users on their phones but does not work for others, then you very probably have a permissions issue.

Check the below permissions for the user / phone that is not working.

Global settings -> Users tab
The Users tab sets permissions for the user logged into the mobile app.
Accessible times and profiles
Make sure the user is allowed remote access. LAN only is unchecked.
Make sure the user is allowed access to BI during the appropriate profiles.

users access.png
users access.png (12.47 KiB) Viewed 3100 times

Camera groups
If you are using camera groups, the user must have access to a group that contains the camera executing the Push.

alert map_camera groups.png
alert map_camera groups.png (8.2 KiB) Viewed 1530 times

Push notifications
Confirm Push notifications are active in the user's profile for the appropriate profiles.

mobile push profiles.png
mobile push profiles.png (11.58 KiB) Viewed 1543 times


Global settings -> Mobile devices tab
You can also set permissions on a mobile device.
Maybe executives receive certain alerts.
Maybe security staff receive other alerts.
This is another reason why Push notifications may not be going to your device.
Push notifications
Confirm Push notifications are enabled for the user's phone.

mobile push enabled.png
mobile push enabled.png (17.34 KiB) Viewed 1537 times

Mobile Tags
If you are using tags make sure the mobile phone in question has the tag associated with the alert.
action map_tags1.png
action map_tags1.png (8.95 KiB) Viewed 445 times
action map_tags2.png
action map_tags2.png (35.99 KiB) Viewed 445 times

Legacy GCM
Make sure Legacy GCM is unselected.
mobile gotchas legacy GCM.png
mobile gotchas legacy GCM.png (2.18 KiB) Viewed 1537 times
Firewall settings
Maybe your firewall is blocking ports for Push notifications?
Highly unlikely. Most firewalls never prevent outbound traffic.
mobile push ports.png
mobile push ports.png (18.41 KiB) Viewed 1537 times
Trigger settings
Are you still receiving motion triggers? The Alerts tab in the Clips List will tell you! If not, there is a problem with the Trigger tab.

clip list_alert.PNG
clip list_alert.PNG (20.62 KiB) Viewed 3106 times

Alerts tab - Action Map
If the motion trigger is present, there is a problem with the Alerts tab.

I would look closely at my Push notification settings.
One common mistake is the Profiles for the alert are NOT active for the Profile you are testing.
Camera settings -> Alerts tab -> On Alert.

mobile gotchas action map profiles.png
mobile gotchas action map profiles.png (115.03 KiB) Viewed 3106 times

If you do not know how to debug alerts, watch the Triggers and Alerts webinar. The information is also available in the Alerts and Actions section of Help (Testing the Action Set).

Alerts tab
Alerts are turned off (accidentally) on the camera.

Revisit the Camera settings -> Alerts tab.
A common mistake is you accidentally turned off Alerts.

mobile devices gotchas_recent alerts.png
mobile devices gotchas_recent alerts.png (50.67 KiB) Viewed 1537 times

One user accidentally switched Any to All. With all the Zones checked you are effectively telling BI the Motion had to cross ALL zones for an alert to trigger.
I have yet to see a use case where a user had all zones set. Basically, he turned all motion alerts from the motion sensor OFF.

Log states alerts are sent

Send alternative alerts
Leverage BI functionality to test further.
If all of the above permissions are set correctly and Push notifications are still NOT working, then create/test an Email / SMS alert.
If those alerts work, then you know the issue probably does NOT reside with your Server permissions or motion trigger settings.
This is a strong hint that something is wrong with mobile phone settings or the mobile app.

Mobile phone settings:
1. Mobile phone settings: If the Push Alert is sent based on the logs, check the mobile phone settings.
Are Push notifications allowed for the mobile app? See Server settings section.

2. BI Server - Mobile Devices tab: Maybe a permission issue associated with your phone and the BI server setup exists? The BI server is not sending alerts to your phone, but may be sending alerts to other phones. See the BI Server activation section.

3. BI Server - Other user permissions: Review the Permissions/Global settings section above as well.
Maybe your user account does not have access to the camera sending the Push alert.
Maybe the alert requires a security tag that is NOT set for your camera.

Apple / Android Push servers
It's very possible, the issue could reside with Apple/Android Notification Servers, your mobile device or maybe even your cellular provider.
If you created an SMS alert as stated above and the SMS alert is responsive, you can assume BI sent the Push correctly as well.
Network settings
The network setup is critical for push notifications. Debugging port forwarding and network issues is the responsibility of the user.
We recommend using NGROK or other DDNS services because the utility bypasses all the complexity associated with networking. The Networking section of the Mobile Devices article walks through setting up NGROK correctly.

If issue is still not resolved, include mobile app info to the ticket for BI engineering to review.
See Next steps / Submitting a ticket section in Mobile devices article.


Gotcha 3: Push notifications - Alert Images
Push notifications also include an Alert image by default.
If you receive the Push notification, however the Thumbnail image is not included, pay attention to this section.
The mobile app needs to request the image from the BI server once a notification is received from Apple/Android.
Update to the latest version of the app and the BI server to see if issue still persists. Features/functionality on the mobile app are not guaranteed to run with older versions of the server.


action map_alert image.png
action map_alert image.png (43.21 KiB) Viewed 220 times

LAN or WAN or Both

WAN:
When you don't get the image, are you able to login with the app?
Test: Unselect Send rich push (3D) notifications
Do the alerts come through instantly on the cellular network? If so, the mobile app has a connectivity issue back to the server.

Other WAN symptoms: The alerts take almost a minute to come through and the notification does not show the preview image.
Works fine if the phone is connected to Wi-Fi. Notifications are instant and the image is included.

The network setup is critical to getting the apps working on the WAN.
Double check your network setup.
Revisit the Server settings on your mobile app.

LAN: If the issue resides with the LAN, see customer anecdotes below to help troubleshoot your network.

Both: If you can never get thumbnails, then the network setup is not correct. Follow same steps as stated for the WAN.


Debug logs

When the next notification arrives on your phone without an alert image, go to the app (do not select notification) -> ? tab -> Debug log.
Scroll to the bottom of the log and look for downloadTaskWithURL commands associated with your recent alerts.

Code: Select all

2021-09-08 7:55:10: handleRemoteNotification: 'ADF7' (MOTION_A) triggered on 'Mabury Square' at 7:54:39 AM, long-chime-sound.wav 264
2021-09-08 7:55:10: Server now Mabury Square --> 4 server=Mabury Square, cam=ADF7, wanip=(null)
// *********************
2021-09-08 7:57:40: downloadTaskWithURL http://10.0.0.5:7000/thumbs/alert.2057329278.jpg?session=54d67b8a1a3b65880775655e0eb1098d fails The request timed out.

2021-09-08 7:57:40: Requesting image from http://xxxx.ngrok.io/thumbs/alert.4118562208.jpg?session=2e4742d111f37fc81f1b3e2a25ee13d6
// *********************
2021-09-08 7:57:40: downloadTaskWithURL http://xxxx.ngrok.io/thumbs/alert.4118562208.jpg?session=2e4742d111f37fc81f1b3e2a25ee13d6 fails The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

2021-09-08 7:58:39: didDetermineState: 1
2021-09-08 7:58:39: http://xxxx.ngrok.io --> {
    cmd = geofence;
    inside = 1;
    session = 00a939f740fe6f735b582ded29ce028d;
}
2021-09-08 7:58:39: http://xxxx.ngrok.io/json <-- {"result":"success","session":"00a939f740fe6f735b582ded29ce028d"}
2021-09-08 7:59:20: downloadTaskWithURL http://10.0.0.5:7000/thumbs/alert.4118562208.jpg?session=2e4742d111f37fc81f1b3e2a25ee13d6 fails The request timed out.
If you are using a DDNS/VPN service like NGROK or ZeroTier, what is important is whether the URL is populated with IP addresses or URL links. Confirm URL links from your DDNS/VPN service are being used (Line 5). If not, check your Global settings -> Web Server tab in the PC software to make sure the NGROK/VPN address is set and not the WAN address, e.g. 99.x.x.x address. You can then uncheck the option to automatically refresh this so that it sticks on the NGROK/VPN address.
web server ngrok.png
web server ngrok.png (10.83 KiB) Viewed 14 times

There are 2 requests per notification (Line 3 and 5) because the app automatically checks the LAN and WAN addresses.

Line 5 as you scroll right already states the WAN URL failed because of TLS issues.
The fix is to go to your mobile app server settings and set the WAN address to https instead of http. Fortunately, NGROK includes encryption (https) with their free version.
Line 9 (last line) states the LAN request timed out.
In this example, both requests failed and the notification was sent without an image.



Customer Anecdotes (all network configuration issues)
Maybe triggers ideas as to what is wrong with your network setup.

Anecdotal 1:
Issue from a user where Push notifications worked on the WAN but not the LAN.
  • User switched to dynamic DNS (e.g. NGROK) from port forwarding. Changed mobile app WAN server settings accordingly.
  • Modified his local dns server to map the dynamic dns hostname to the internal IP. This user had a DNS server, perhaps company deployment. Most homeowners do not.
  • BI Server was not using the LAN interface associated with above DNS server, so ddns URL was not being resolved to correct IP address. (oops)
The above is complicated for the average user and I doubt many have a local dns server.

Anecdotal 2:
It was a local IP issue. My WiFi LAN router assigned somehow assisted devices on the WiFi network a 192.156.**.*** oddly it assigned things plugged in via cable a 10.0.0.***. It was acting like a double NAT inside the same router/WiFi box. Oddly it had separated the WiFi and wired connections on separate LANs.

I put the WiFi side into bridge mode and let only one side assign the IP addresses. This forced both the wired and wireless devices on to the same IP setup 10.0.0.***. It took a few minutes for the network to rediscover everything. I rebooted everything.

Boom. It works.

Anecdotal 3: ZeroTier deployment
I think that I have the issue with the thumbnails resolved. I use ZeroTier to remote connect my devices together when away from home. It sets up a virtual networking adapter on the PC. I had the BI web server set to use that adapter, which worked great but seems to be preventing the thumbnails from working. I have the WAN IP set to the ZeroTier IP. In the past that was the only way I could get it to connect when both at home and travelling. When I switched BI back to the default adapter and restarted I started getting thumbnails again. Not sure if or what has changed. I tested it on cellular using the ZeroTier service and I also got thumbnails. Hopefully this will still work when I travel.

What's confusing is that I was able to log in from the app with either adapter set just fine. But somehow it makes the thumbnails stop working. I've attached the app debug with both settings in case that helps you.

The delayed push notifications also seems to be resolved for now. I won't know for sure until I've had a few days. It was seeming to be reasonably quick when I directly tested it but then start to get slow after time. Hopefully it was related to the above issue. But if it returns I will let you know.

If still cannot resolve the issue, when the next Push notification goes out, wait 30s, then go to Next steps / Submitting a ticket section below to submit a ticket.


Gotcha 2: Email/SMS alerts are not working

Global settings -> Users tab
Similar to above for Push notifications, check permissions.

Global settings -> Users tab
Make sure the user is allowed access to BI during the appropriate profiles.
users access.png
users access.png (12.47 KiB) Viewed 3100 times

Confirm alerts are being sent from the server

status log confirmation.png
status log confirmation.png (21.95 KiB) Viewed 3106 times

Furthermore, confirm the Alert is sent soon after BI senses motion. The gap between the MOTION event and the Alert should not be more than 1-2s.

motion-alert-trace.png
motion-alert-trace.png (20.46 KiB) Viewed 3106 times
Log states alerts are sent
If the log states alerts are NOT being sent, scroll down to Log states alerts are NOT sent section.

If the logs state alerts are being sent, then you can be confident your global permissions and motion triggers are set correctly to generate an alert.
The issue must reside with your alert settings.

Send alternative alerts
If you are only sending one type of alert, e.g. an email notification, create an SMS alert to try and isolate the issue. Does the other alert work?
If only the SMS notification is working, I would look very closely at my email alert settings.
If only the email notification is working, I would look very closely at my SMS alert settings.
If both alerts are not working, the issue is probably with the email server setup since both alerts rely on the email server.
Global settings -> Email servers.

Email process: BI Server -> Email server -> Email notification
SMS process: BI Server -> Email server -> Mobile provider email to text service -> SMS message

Easy to check if SMS and Email alerts are being processed correctly by your email server.
Simply login to your email server.
Go to the sent folder.
If you see sent emails to your cellular provider (for an SMS text) or to the email address specified in the Email alert settings, your mail server processed the alert correctly.
BI emails are easy to spot because the subject starts with Blue Iris.
If you do not see any BI sent emails, your email server is not setup correctly.

If your SMS messages are not being received or received after a long delay AND you confirmed your email server is responding in a timely manner, then you will need to inquire with your cellular service provider as to why their email to text service is slow or not responding.

Log states alerts are NOT sent
The issue must be with Server settings (Permissions or Trigger settings)
If the logs state NO alerts are being sent, then you can be confident there has to be an issue with Server permissions or your Motion triggers settings.
Go through same checks listed above for Gotcha 3: Push Notifications. The Logs state the Push notification was NOT sent section.


Gotcha 1: Alert images
Issue
Alert images are the images that are associated with SMS and Email alerts.
Push notifications also provide Alert images (thumb nails).
The issue is often users want the Alert Image, i.e. the Trigger image to be in high resolution and sometimes it appears as a low resolution image.

Background info
The thumbnail image which is actually stored in the database and associated with the Alert is 240px.
In earlier versions of 5.x, the thumbnail image was 480px, but the increased size really did not add much value, but did eat up database storage so was changed back to 240px.

The fix
To get higher resolution main stream Alert images, select Hi-res JPEG files for Add to alerts list:. Camera settings -> Trigger tab.

alert image hi-res.png
alert image hi-res.png (7.31 KiB) Viewed 3155 times

Dual streams
If your camera has dual streams and Hi-res JPEG is selected (as stated above), but the alert image is not the higher resolution, the issue is often the main stream does not have a key frame.
The fix is creating a pre-trigger buffer.
A 5s pre-trigger buffer is always a good practice. Camera settings -> Record tab.
A pre-trigger buffer assures at least one key frame exists for the main stream.
A 5s pre-trigger buffer assumes your kfps is at least greater the 0.2 (1/5).

Server errors
If the above two fixes do not resolve the issue, right click on an alert -> Open containing folder.
Is the corresponding JPEG the correct resolution? 240p is what's in the database. However if there's a hi-res JPEG file, this should be served instead.

If the Open containing folder selection is greyed out, then there is an issue.
  • The most obvious cause is you did not set Add to alerts list = Hi-res JPEGfiles
  • OR There is an issue with the setup of the Alerts folder (image below), folder permissions or something else.
    Check the log for errors, in particular Storage errors.
alert image alerts folder.png
alert image alerts folder.png (66.92 KiB) Viewed 3155 times

Note on email alerts
Email alerts provide many more options.
The Motion leading-edge image will always come from the sub stream.
The Trigger leading-edge, aka the Alert image, will only be high-res if you select Hi-res JPEG (as stated above) AND the main stream has a key frame in the buffer (thus, the need for a pre-trigger buffer as stated above).
The Additional images will always be hi-res (if you have a main stream key frame in the buffer).
Finally, the Email alert dialog also provides quality controls (default is 50/50).
action map email quality.png
action map email quality.png (2.08 KiB) Viewed 2569 times
Post Reply