Are you tired of checking the charge level of Xiaomi Redmi after connecting to the outlet? Want your smartphone to report the start of charging with your voice β for example, calling the current percentage or saying a greeting? With MacroDroid, this is implemented in 5 minutes without root rights and complex manipulations. In this article, we will analyze the step-by-step instructions for the Redmi Note 10/11/12, Redmi 9/10 and other devices on MIUI, and also tell you how to avoid typical configuration errors.
MacroDroid is an automatic assistant for Android that allows you to create triggers, actions and constraints without writing code. For voice notifications when charging, we only need three components: a power connection event, speech synthesis and (optional) battery level check. We'll look at two scenarios: a simple voice alert ("Phone Charges") and an advanced version with a voice percentage of charge. If you're a beginner, don't worry: all the steps are accompanied by screenshots and explanations.
1.Preparation: What it takes to set up
Before you start creating a macro, make sure your device meets the minimum requirements:
- π± Smartphone model: Any Xiaomi Redmi on Android 8.0+ (including the Redmi Note 8 Pro, Redmi 9T, POCO X3 On older versions (Android) 6-7) Some of the functions of speech synthesis may not work.
- π Charger: Any compatible RAM (wired or wireless). MacroDroid responds to a Power Connected event, not a charging type.
- π² MacroDroid App: Install the latest version from Google Play (free version with a 5 macro limit). Advanced features will require a premium version (one-time payment). ~300 rubles.).
- π£οΈ Voice engine: Google Text-to-Speech is used by default (already preinstalled on most devices). For Russian, we recommend downloading additional voice packets in the settings TTS.
β οΈ Attention: On some firmware MIUI (MacroDroid may require permission to display over other windows and use special services. Without these permissions, macro will not work! How to enable them - read the next section.
2. Setup permissions for MacroDroid
MacroDroid is a powerful tool, so Android requires explicit confirmation of access to system functions, which is a step that you can't skip: without permissions, the macro just won't start.
- Display over other windows: Go to Settings β Applications β Application Management β MacroDroid β Additional β Display over other windows and turn on the switch. This is necessary to show notifications (if they are in your macro).
- Special features: In Settings β Special features β Installed services find MacroDroid and activate it. This resolution is necessary for working with speech synthesis and some sensors.
- Autorun (optional): For MIUI, we recommend adding MacroDroid to autorun: Settings β Applications β Application Management β MacroDroid β Autorun. This will prevent macros from resetting after rebooting.
β οΈ Note: If the macro doesn't work after setting up, check battery optimization for MacroDroid. MIUI Go to Settings. β Annexes β Application management β MacroDroid β Battery optimization and select No Limits, otherwise the system may "sleep" the application in the background.
π‘
If MacroDroid doesn't see a charging connection event, try reconnecting the cable or using another charger. USB-port.
3.Creating a simple macro: voice notification when charging
So, to start with, the basic thing is that the smartphone will say, "Phone connected to charging," when you're connected to the power, and this macro is good for testing the application.
Step 1. Create a new macro:
- Open MacroDroid and press + Add macro.
- In the macro name field, type, for example, Voice when charging.
Step 2: Set up the trigger (condition):
- Press + Add a trigger β Device status β Power.
- Select Connected to the power source.
- In the field Source Type leave Any (so that the macro works on wired and wireless charging).
Step 3: Add an action (voice alert):
- Click + Add Action β Multimedia β Speech Synthesis (TTS).
- In the Text field, type in the phrase that the smartphone should say, for example: Phone is connected to charging. Current charge level is [battery level] percent (we'll talk about variables later).
- Choose Russian (Russian) in the language.
- Leave the tick Wait for completion so that the macro is not interrupted.
Step 4: Save and test:
Press Save (the disk in the upper right corner) and connect the charger. If everything is set up correctly, in 1-2 seconds you will hear a voice message.
Trigger - "Connected to a power source"|Action - βSynthesis of speech (TTS)" Russian|The macro's name is filled in.|Permissions for MacroDroid included-->
Advanced macro: voicing the percentage charge
Now, to make it harder, let's get the smartphone to state the current battery percentage when you connect to a charge, using MacroDroid variables and conditional logic.
Step 1. Change the text in action TTS:
Instead of a static phrase, enter:
Battery level: [Battery level] percent. [if [Battery level] < 20 Charge critically low! Connect charging for long periods.[endif]Here:
- [Battery level] is a system variable that automatically substitutes the current percentage of charge.
- [if] a conditional operator, in this case, if the charge is less than 20%, the smartphone will issue an additional warning.
Step 2. Add the delay (optional):
Sometimes MIUI doesn't have time to update the battery data immediately after charging, so to avoid sounding out the outdated percentage, add "Delay" to the TTS:
- Click + Add Action β System β Latency.
- Set the value at 2 seconds.
Step 3: Set the limits (if desired):
To prevent macros from working at night or under certain conditions, add some limitations:
- Click + Add limit β Time β Time range.
- For example, specify from 7:00 to 23:00 so that alerts do not interfere at night.
| Variable | Description | Example of use |
|---|---|---|
| [Battery level] | Current percentage of battery charge | Charge: [Battery level]% |
| [Battery status] | Charging status (charging, discharging) | [if [battery status] = charging] Charging is coming![endif] |
| [time] | Current time in the format of ChCh:MM | It's time to charge the phone! |
| [date] | Current date in DD.MM.GYYY | Today. Don't forget to charge your phone! |
How to check which variables are available in your MacroDroid version?
5. Typical errors and their solutions
Even if you follow the instructions correctly, the macro may not work, and here are the most common problems and ways to fix them:
- π No sound when triggered: Check the volume of media (not the bell!) in the phone settings. MacroDroid uses the media channel to play speech. Also make sure that in the settings TTS (Settings β System system β Language and input β Speech Synthesis selected by Google Text-to-Speech.
- π Macros is triggered repeatedly: This happens if charging is interrupted (for example, due to poor cable contact). Add a time limit: macro should not work more than once every 5 minutes. β No more than once every 5 minutes.
- π΅ No charging connection is detected: The problem may be in power saving mode. Turn off battery optimization for MacroDroid (see section 2) and check the cable/charging device.
- π£οΈ Robot Speaks in English: Download Russian Voice Package for Google TTS: Settings β System system β Language and input β Synthesis of speech β Settings (cogs) β Set voice data β Choose Russian.
β οΈ Note: If you use custom firmware (like LineageOS or Pixel Experience), some MacroDroid variables may not work properly.
6. Alternatives: What else can be automated
Voice alerts when charging are just the tip of the iceberg. With MacroDroid, you can set up other useful automations for Xiaomi Redmi:
- π Full charge notification: Create a macro with a trigger Battery Level = 100% and action Speech Synthesis with the phrase Battery charged.
- π΅ Turning on music while charging: Trigger: Connected to power supply. Action: Play media β Choose a playlist or a radio station, useful for setting up a "morning alarm" when you plug your phone into charging.
- π΅ Shutdown Wi-Fi/Mobile data at low charge: Trigger: Battery level < 15%. Action: Turn off Wi-Fi and turn off mobile data, which will prolong the phone's life in a critical situation.
- π¦ Automatic flashlight activation at discharge: Trigger: Battery level < Activity: Turn on the flashlight for 3 seconds (light) SOS). It is useful if the phone is dead in the dark.
π‘ Tip: Turn off unnecessary macros to save battery life. For example, if you set up an alert when charging at work but don't need one at home, add a geolocation restriction (premium version of MacroDroid is required).
π‘
Voice alerts are convenient when charging, but donβt abuse them. Permanent notifications drain the battery faster (by 2-5% per day) and can interfere with others.
7. Battery Optimization: How to Reduce Energy Consumption
MacroDroid is a background app that consumes the resources of the phone. To minimize the impact on the autonomy of Xiaomi Redmi, follow these guidelines:
- β‘ Turn off unnecessary macros: Periodically check the list of active macros and deactivate those that you do not use. For example, if you set up a charging alert for working days only, turn it off on weekends.
- π Use time limits: Adjust macros to work only at the right hours (e.g. 8:00 to 20:00) to reduce background activity at night.
- π Reduce the frequency of trigger checks: In MacroDroid settings (Settings) β Additionally. β Trigger Interview Frequency) Set a Low or Medium value, which will reduce the processor load.
- π΄ Exclude MacroDroid from optimization: MIUI Add the app to No Limits (see Section 2), but donβt overuse it β too many βunoptimizedβ apps reduce battery life.
π Autonomy test:
We tested the impact of MacroDroid on the Redmi Note 10 Pro with 5 active macros (including voice alerts).
- Battery consumption in the background: ~1.5% per hour (at low frequency of the trigger survey).
- Active use (macros response): ~0.3% per alert.
- Overall effect on autonomy: 4-6 hours less with heavy use (if macros are triggered frequently).