[General Accessories] xmxm:
These tasker projects by Bonoboo inspired me to make my first Tasker profile: Calendar reminder for Mi Band

Please note that this is an early Beta version, so it might not work or may work incorrectly. This is also my first attempt to write Tasker profile. Please let me know if you find any issues and will try to stabilize the code.

What it does:

1. This profile checks your calendar database every 10 minutes and if it finds a calendar event starting within next 15 minutes, it creates a notification.

2. If you use Mi Band software with Notification support, you can configure Mi Band to vibrate on notifications. As a result, you'll get your Mi Band to vibrate to notify you on upcomng calendar events.

Prerequisites:

1. You need to have rooted phone to read calendar database.

2. You need to have SQLite installed on your phone. If you installed Bonoboo Export statistics tasker profile, you already have it.

3. You need to have Mi Band Software with Notifications installed and configured to vibrate on Tasker notifications

4. You most likely need to have Tasker installed. I am attaching a stand-alone package generated with Tasker factory, but I haven't tested it.

Installation:

1. Unzip attached CalNotify_Main.prf.zip and import it into tasker (or if you do not have tasker, install attached CalNotify_Check.2.apk and let me know if it worked).

2. It should create CalNotify_Main profile and CalNotify_Check task. Make sure that CalNotify_Main profile is enabled and Tasker notifications are selected in Mi Band application.

Configuration settings:

You can control following parameters:

1. %calnotify_window - How many minutes ahead to scan for upcoming Calendar events. Default value is 15 minutes. To change this parameter, go to CalNotify_Check task and click on first step called Variable Set. Change the To field from 15 to desired value.

2. %calnotify_calname - Specifies which calendars (if you have multiple calendars or google accounts) will be scanned for upcoming events. Default value is " " (single space, since you cannot leave value completely empty), which means All calendars will be scanned. You can change this parameter to either full name of calendar or you can use SQL "%" wildcards - for example B% setting would scan all calendar that have name starting with letter B. To change this parameter, go to CalNotify_Check task and click on second step called Variable Set. Change the To field from single space to desired value.

3. Task execution frequency - defines how frequently checking for upcoming events will be done. Default value is every 10 minutes. To change this parameter go to CalNotify_Main profile and click on Clock icon just below profile name, then change setting in Repeat: field to desired value. It is recommended to keep %calnotify_window to be equal or higher than the frequency window, otherwise you might miss some notifications (for example if you run checks every hour, but check for calendar events in subsequent 15 minutes only).

NOTE: Existing task logic should check for duplicate notifications and would not bring same notification twice if task is executed twice and pics exactly the same upcoming calendar event for the second time, so you should be able to set %calnotify_window to be less than task execution frequency.

4. Task execution start and end times - by default, checking for upcoming events is only done between 9am until 6pm, but you can change this behavior if needed. To change this parameter go to CalNotify_Main profile and click on Clock icon just below profile name, then change setting in From: and To: fields to desired value.

Version History:

v0.2

Upcoming calendar notification is dismissed after 20 seconds - its only purpose is to trigger MiBand vibration, not to clutter your notification bar.

Implemented checks for duplicate notifications, so system should not notify you twice about the same calendar event.

v0.1

Initial release