The Xiaomi 5G CPE CB0401V2 Integration for Home Assistant allows users to monitor and access comprehensive data from their Xiaomi 5G CPE CB0401V2 router directly in Home Assistant. With this integration, you can display key information such as signal strength, network details, Wi-Fi status, and more within your smart home dashboard.
- Signal Strength and Quality: Monitor LTE and 5G signal strength (RSRP) and quality (RSRQ).
- Network Information: View the current network type, operator, reception band, and more.
- Data Usage: Track data usage in MB.
- Home Assistant: Version 2021.6.0 or higher
- Xiaomi 5G CPE CB0401V2 Router: Firmware version 3.0.59 or higher
- Python: 3.8 or higher
-
Install HACS (if not already installed):
- Follow the official HACS installation guide.
-
Add the custom repository:
- Go to HACS in the Home Assistant interface.
- Click on Integrations and then the + icon at the bottom right.
- Search for
Xiaomi 5G CPE CB0401V2
or directly add the repository URL:https://github.com/MKsys1337/MiWiFi-CB0401V2
- Click Add.
-
Restart Home Assistant:
- Go to Settings > System > Restart and restart Home Assistant.
-
Clone the repository:
- Navigate to the
custom_components
directory of your Home Assistant installation:/config/custom_components/
- Clone the repository:
git clone https://github.com/MKsys1337/MiWiFi-CB0401V2 miwifi_cb0401v2
- Navigate to the
-
Restart Home Assistant:
- Go to Settings > System > Restart and restart Home Assistant.
This integration uses a Config Flow, so no manual configuration.yaml
changes are necessary.
-
Add the integration:
- Go to Settings > Devices & Services > Integrations.
- Click the + icon at the bottom right.
- Search for
MiWiFi CB0401V2
and select it.
-
Enter credentials:
- Input the router's IP address (default:
192.168.31.1
). - Enter the username (usally
admin
and password for the router. - Click Submit.
- Input the router's IP address (default:
-
Verify connection:
- If successful, the available sensors will be automatically added.
- Router Name
- Firmware Version
- Hardware Model
- Model Designation
- MAC Address
- Serial Number
- IMEI
- LTE Signal Strength (RSRP)
- LTE Signal Quality (RSRQ)
- 5G Signal Strength (RSRP)
- 5G Signal Quality (RSRQ)
- LTE Signal SNR
- 5G Signal SNR
- Network Type
- Network Operator
- Data Usage
- LTE Reception Band
- 5G Reception Band
- Frequency Bands
- Cell ID
- 5G Cell ID
- WiFi SSID 2.4 GHz
- WiFi SSID 5 GHz WiFi Active Clients - Number of devices currently connected and exchanging data with the WiFi network
-
Navigate to your dashboard:
- Go to Overview in Home Assistant.
-
Edit your dashboard:
- Click the three-dot menu in the top right and select Edit Dashboard.
-
Add a new card:
- Click Add Card.
-
Select the desired card type:
- Choose Entities, Glance, Gauge, History Graph, etc.
-
Select the desired sensors:
- Search for and add the sensors you want to display on the card.
-
Save the card:
- Click Save to confirm the changes.
- Python 3.8 or higher
- Home Assistant Core
- IDE (e.g., Visual Studio Code recommended)
- Git
git clone https://github.com/MKsys1337/MiWiFi-CB0401V2.git
cd MiWiFi-CB0401V2
Ensure all necessary dependencies are installed. They are defined in the manifest.json
file.
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch for your changes:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Description of your changes"
- Push to your fork:
git push origin feature/your-feature-name
- Create a Pull Request in the main repository.
Ensure your code follows PEP 8 guidelines and passes existing tests.
- Confidentiality of credentials: Never share your credentials publicly.
This project is licensed under the MIT License.
- Home Assistant Community for their excellent documentation and support.
- Xiaomi for providing powerful routers.
- Open-Source Community for the helpful tools and libraries.