Introduction: Send ThingSpeak Notifications to Mi Band 4

Since I bought my Xiaomi Mi Band 4, I thought about the possibility of tracking some data from my Weather Station that are available on ThingSpeak through my Mi Band 4. However, after some research, I discovered that the capabilities of Mi Band 4 are very limited and since I didn't want to develop any apps, I thought about the possibility of using notifications as a way to send data from ThingSpeak.

In this tutorial I will teach you how to use notifications in two ways:

  • Inform values within a predetermined period;
  • Inform values when the data exceeds predefined values;


It is important to remember:

That this project was carried out on a smartphone with Android OS, but it shouldn't be difficult to adapt for an Iphone;

You already need to have a project on a Weather Station's ThingSpeak or any other project. If you haven't created it yet, we recommend that you see this example ESP8266 NodeMCU With BME280 from optio50.

In practice it is very easy to carry out this project, do not be alarmed by the apparent size of the tutorial, I am doing it step by step to make everything as clear as possible!

Supplies

  • Smartphone with Android SO;
  • Xiaomi Mi Band 4;
  • Mi Fit App;
  • ThingShow App;
  • Your Meteorological Station project or any other information / data that is hosted on ThingSpeak;

Step 1: Download ThingShow - ThingSpeak Visualizer

  1. First, you need to go to Google Play to download the ThingShow application (developed by devinterestdev). The app is lightweight (≅2.9 MB) and works on any Android 4.1 and up.
  2. Check that the application was installed correctly and that everything is ok

Step 2: Add ThingSpeak Data to ThingShow

  1. Open the ThingShow app;
  2. Click on the + symbol (green) to add your ThingSpeak channel data;
  3. Select type (In my case I'm using a public channel);
  4. Enter your ThingSpeak channel ID and click "Open" - If the ID is correct, your basic channel information will appear below;
  5. Click the check symbol in the upper right corner.

Step 3: Create a Widgets

  1. Go back to your smatphone's desktop / home screen and click on a clean area and hold until Widget options are available. If this step is different on your phone, look for Widgets options in the settings.
  2. Search for ThingShow Widgets;
  3. Click on the "+" symbol to add your ThingSpeak channel data;
  4. Choose a channel;
  5. Choose field:
  • To receive information for each time period, choose only one field;
  • If you want to receive an alert whenever any of the analyzed values exceeds any parameter, then you can choose as many fields as you like;

Step 4: Notify Values Within a Predetermined Period

In this configuration, you will receive a notification every time you choose, which can be between 1 to 60 minutes. In my case, I chose to be informed every 60 minutes about the temperature at the Meteorological Station

  1. In "Refresh, min" choose a value of up to 60 min;
  2. Just below the channel, click on the bell symbol;
  3. Choose a value below or above to be notified - This is the "big secret" to be notified every time: you need to choose a value that you know will always be above or below. As I live in a region where the local temperature is always above 5ºC, I chose the value above 0, so every hour, the app will understand that the temperature value is above what I established and will send me a notification. Change according to your interest;
  4. Click "save";
  5. Go back to your smatphone's desktop / home screen and see that the widget has already been created and shows the temperature value and you should have received a notification on your smartphone.

Do not worry about not having received the notification on your Mi band 4 yet, we will make this configuration in the last step.

Step 5: Notification When Data Exceeds Predefined Values

This configuration is similar to the previous step, with the difference that it is recommended to choose the maximum and minimum parameters and I recommend that the "Refresh, min" be of a lower value.

This way, every time one of the values exceeds the pre-established parameters, you will receive a notification.

Widgets information can also be seen on your smarthphone screen.

Step 6: Set Up Mi Fit

First of all remember to turn on your smartphone's bluetooth with your Mi Band 4 close by (preferably it has been previously paired).

  1. Open the Mi Fit app; Click Profile;
  2. Under "Your devices", click on your Mi Smart Band 4 bracelet;
  3. Go to "App Alerts";
  4. Activate alerts (1st) and click on "Manage apps" (2nd);
  5. Search for and check the ThingShow application;
  6. Go back and see that the app will already be activated for alerts;

If everything went smoothly, you will soon receive your notifications on your cell phone and on your Mi Band.