Version History - MiWiFi XiaoHack Edition


📡 Automatic releases from GitHub

The latest versions are synchronized automatically from GitHub.

Showing 16–20 of 57 releases

📦 v3.4.4 – XiaoHack Edition

Date: 2025-11-27 17:30:39
View original release on GitHub

📝 Changelog — MiWiFi Integration 📦 Version v3.4.4 – 2025-11-27


✅ Fixes & Stability

  • Improved internal handling of router traffic counters:
  • If the router does not expose the misystem traffic endpoint (or returns unexpected data), the integration now fails gracefully without breaking device updates.
  • Extra safety checks when parsing download / upload values per device to avoid type/parse errors on some firmwares.
  • Small internal refactors in the updater flow so that Wi-Fi and LAN devices always keep their attributes updated even if traffic totals are not available.
  • Auto-purge reliability improvements:
  • The purge_inactive_devices service now correctly handles device_trackers without MAC or last_activity (for example, old _2 entries stuck as unavailable) when include_orphans_without_age is enabled, so they can be removed cleanly from the entity/device registry.
  • The global auto-purge scheduler has been aligned with the new service schema and now calls it with consistent parameters (only_randomized: false, include_orphans: true, include_orphans_without_age: true), ensuring that inactive, duplicated and orphaned trackers older than N days are actually purged.

⚙️ Improvements

Per-device total usage (download + upload)

  • New attribute: total_usage for each tracked device, now backed by router counters:
  • The integration reads the global misystem information (dev list) and, for each MAC, sums:
  • download + uploadtotal bytes used by that device.
  • These totals are applied to all known devices (Wi-Fi and LAN) whenever the updater refreshes.
  • The device tracker attribute total_usage now uses a more readable format:
  • If usage is below 1 GB, it is shown in MB (with 2 decimals), e.g. 257.34 MB.
  • If usage is 1 GB or higher, it is shown in GB (with 2 decimals), e.g. 3.50 GB.
  • Behaviour is fully automatic:
  • If the router exposes the misystem endpoint with per-device counters, the attribute is populated.
  • If not, the attribute falls back to 0 MB without errors.

✅ Compatibility

  • No breaking changes for existing installations:
  • Routers without a compatible misystem endpoint will simply not expose per-device totals (attribute stays at 0 MB).
  • Routers that already expose download / upload counters (like RA70/RA81 class) will automatically benefit from the new total_usage attribute.
  • The new logic works with both:
  • Main routers and
  • Mesh/LAN devices connected to them, as long as the router reports their MAC and traffic in misystem.
  • The improved purge logic affects only MiWiFi entities/devices and is safe for mixed setups:
  • It will only delete MiWiFi device_trackers and their associated devices that match the inactivity rules and are not shared with other config entries.

📘 How to Update

  1. From HACS (recommended):
  • Open HACS → Integrations.
  • Locate MiWiFi XiaoHack Edition.
  • Click “Update” (if available) and restart Home Assistant.
  1. Manual update:
  • Download the custom_components/miwifi folder for version v3.4.4 from the repository.
  • Replace your existing custom_components/miwifi folder.
  • Restart Home Assistant.
  1. After restart:
  • Check Settings → Devices & Services → MiWiFi to ensure the integration is loaded without errors.
  • Open any MiWiFi device tracker and verify the new total_usage attribute (it may take one refresh cycle to appear).
  • Optionally run the __HTML_PLACEHOLDER_0__ service (with apply: false) to see what would be removed, and then with apply: true to actually clean up old trackers.

ℹ️ Información adicional

  • The total_usage value is calculated from router-side counters:
  • It represents total traffic since the router’s counters started (usually since last reboot or reset), not per day/hour.
  • Values may reset if:
  • The router reboots, or
  • The firmware resets those counters internally.
  • Display unit details:
  • The Home Assistant attribute is already formatted as string (XXX.XX MB / XXX.XX GB) for human readability.
  • If you want to build sensors/graphs in pure MB/GB, you can:
  • Create a Template Sensor that parses the numeric part and unit, or
  • Read the raw attribute from custom_components in a custom integration/automation.
  • Auto-purge notes:
  • The global scheduler stores in auto_purge.json the last run, next due, parameters and a small history of executions.
  • Inactivity threshold = every_days → this is the value automatically passed as days to purge_inactive_devices.

💖 Support & Donations

If this project is useful to you and you want to support future development:

  • ⭐ Star the repository on GitHub.
  • 🐛 Report issues and share logs/topology captures to improve compatibility with more routers.
  • 💬 Share screenshots and feedback from your setup so we can keep polishing the experience.
  • 💸 Wise
  • 💸 PayPal

Every bit of feedback helps to keep MiWiFi XiaoHack Edition healthy and evolving. 🙌


Summary of changes (v3.4.3 → v3.4.4)

AreaDescription
Device trackingAdded per-device traffic totals (download + upload) using misystem counters where available.
UI / Attributestotal_usage now shown in human-friendly MB/GB with automatic unit selection.
Maintenancepurge_inactive_devices + auto-purge scheduler now effectively remove old/duplicate trackers, including entries without MAC/age.
StabilitySafer handling of routers without misystem support or with incomplete traffic data.

📦 v3.4.3 – XiaoHack Edition

Date: 2025-11-07 11:40:32
View original release on GitHub

📝 Changelog — MiWiFi Integration

📦 Version v3.4.3 — 2025-11-07

🆕 Compatibility Model

  • ✅ Added support for new router model RD04 #150

✅ Fixes & Stability

  • NAT / Port Forwarding autodiscovery: if the default xqnetwork/portforward path fails, the integration now falls back to __HTML_PLACEHOLDER_1__ and updates the whole NAT route group (add/delete/apply) accordingly. This restores NAT rules on firmwares that use xqsystem/*.
  • More resilient handling of logout/ROM/NAT calls by reading paths from the new routing map instead of hard-coded strings.
  • Minor cleanup of obsolete calls and debug messaging.

⚙️ Improvements

  • Introduced a centralized __HTML_PLACEHOLDER_0__ map (in luci.py) and internal __HTML_PLACEHOLDER_2__ usage across all API methods (login, status, Wi‑Fi, QoS, NAT, ROM…).

→ Per-model path customization is now straightforward and localized.

  • Clear debug logs indicating which NAT path was selected (default vs. fallback) and why.
  • Model normalization to lowercase to avoid case-sensitive mismatches.

🧩 Compatibility

  • Confirmed compatibility for NAT endpoints on firmwares that expose __HTML_PLACEHOLDER_0__ (e.g., RC06 and similar variants).
  • No breaking changes. Minimum Home Assistant version unchanged.

📘 How to Update

  1. HACS: Open HACS → *Integrations* → MiWiFi → Update → Restart Home Assistant.
  2. Manual: Replace the folder custom_components/miwifi/ with the new release → Restart Home Assistant.
  3. After restarting, verify:
  • NAT rules list correctly under your main router.
  • Adding/removing rules works as expected.
  • (Optional) Check logs for the selected NAT path (default or fallback).

ℹ️ Additional Information

  • If you previously patched endpoints per model, the new centralized map will take precedence.
  • For diagnostics, enable debug logging for custom_components.miwifi and look for messages about autodiscovered NAT paths.

🙌 Acknowledgements

Huge thanks to Harpik for the API path customization groundwork and to Jose Manuel Usero for the improved NAT detection insights. Your contributions made this release possible. 💪


Summary of changes

AreaFile(s)What changed
Routing / Corecustom_components/miwifi/luci.pyAdded API_PATHS map and refactored all API calls to use self._api_paths[...] (no more hard-coded endpoints).
NAT Compatibilitycustom_components/miwifi/compatibility.pyAutodetect xqnetwork vs xqsystem port-forward paths and switch the entire NAT route group on the fly.

📦 v3.4.2 – XiaoHack Edition

Date: 2025-10-23 07:56:41
View original release on GitHub

📝 Changelog — MiWiFi Integration

📦 Version v3.4.2 – 2025-10-23


✨ New Features

  • 🔐 Auto Protocol Detection (HTTPS-first):

The integration now automatically tries HTTPS first and safely falls back to HTTP if the router doesn’t respond properly. Added constants: ``python PROTOCOL_AUTO = "auto" PROTOCOL_HTTP = "http" PROTOCOL_HTTPS = "https" DEFAULT_PROTOCOL = PROTOCOL_AUTO PROTOCOL_OPTIONS = [PROTOCOL_AUTO, PROTOCOL_HTTP, PROTOCOL_HTTPS] `` The base URL is dynamically composed based on the detected protocol, which is cached for faster requests.

  • 🧠 Main Router Fallback (single integration):

When only one MiWiFi instance is configured, it’s automatically marked as the main router (is_main=True) with traceability flags: ``python is_main_auto = True auto_reason = "single_integration_fallback" `` preventing “no main router” conditions and keeping dependent sensors consistent.


🛠 Critical Fixes

  • 🧩 Protocol robustness: avoids “indecisive” states — any non-5xx response locks the protocol safely.
  • 🧭 Improved main-router detection: more predictable logic when mixing manual and auto configurations.

✅ Fixes & Stability

  • 📝 Clearer logs: explicit debug message when the router is set via *single_integration_fallback*.
  • 🔄 Cached protocol detection: _detect_protocol() now stores its result to avoid repeated tests per router.

⚙️ Backend Improvements

  • 🧱 Added _get_url() to build the base URL dynamically using the detected protocol.
  • 🧪 _detect_protocol() now uses an async HTTP client with a 5-second timeout for non-blocking testing.
  • ⚙️ All protocol constants grouped under a dedicated Protocol constants block with proper documentation.

🧹 Code Cleanup

  • ♻️ Reordered constants and docstrings for clarity.
  • 🧽 Removed redundant branches in main-router detection logic.

✅ Compatibility

  • ✅ Compatible with Home Assistant 2025.5.0 +
  • ✅ Fully compatible with all MiWiFi Panels 1.3.0 +

📘 How to Update

  1. Replace your custom_components/miwifi/ folder with this version.
  2. Restart Home Assistant.
  3. Check the Home Assistant DEBUG logs to confirm protocol detection and proper main-router assignment.

🙌 Credits

  • 💡 Harpik — for the concept and technical groundwork of the HTTPS-first protocol detection.
  • 🔍 José Manuel Usero — for improving main-router detection and fallback accuracy.
  • 💖 Huge thanks to the entire XiaoHack community for testing, reporting, and supporting the project.

💖 Support & Donations

If you enjoy this integration and want to support development:

Thank you for your support! 🙌


Summary of Changes (v3.4.1 → v3.4.2)

AreaChangeDetails
ConnectivityAuto-detect protocolHTTPS → HTTP fallback with caching
Topologyis_main fallbackAutomatically marks router when only one instance exists
LoggingClarityExplicit debug logs and traceability
CleanupProtocol constantsConsolidated and documented section

📦 v3.4.1 – XiaoHack Edition

Date: 2025-10-13 09:14:23
View original release on GitHub

📝 Changelog — MiWiFi Integration

📦 Version v3.4.1 – 2025-10-13

🆕 Compatibility Model

  • ✅ Added support for new router model RN09

✅ Compatibility

  • ✅ Compatible with Home Assistant 2025.8.0 and above.

📘 How to Update

  1. Replace all files inside your custom_components/miwifi/ directory with the contents of this release.
  2. Restart Home Assistant completely.
  3. Add your first router manually to trigger automatic mesh discovery for the remaining devices.

💖 Support & Donations

If this project helps you, consider supporting development. Thank you for keeping the XiaoHack ecosystem alive!

Thank you for your support! 🙌


ℹ️ This release improves detection clarity, reliability, and visual feedback—especially for users with multiple routers.

Maintained with ❤️ by @JuanManuelRomeroGarcia

📦 v3.4.0 – XiaoHack Edition

Date: 2025-09-09 14:46:39
View original release on GitHub

📝 Changelog — MiWiFi Integration

📦 Version v3.4.0 – 2025-09-09

🆕 Compatibility Model

  • ✅ Added support for new router model CR8809

✅ Compatibility

  • ✅ Compatible with Home Assistant 2025.8.0 and above.

📘 How to Update

  1. Replace all files inside your custom_components/miwifi/ directory with the contents of this release.
  2. Restart Home Assistant completely.
  3. Add your first router manually to trigger automatic mesh discovery for the remaining devices.

💖 Support & Donations

If this project helps you, consider supporting development. Thank you for keeping the XiaoHack ecosystem alive!

Thank you for your support! 🙌


ℹ️ This release improves detection clarity, reliability, and visual feedback—especially for users with multiple routers.

Maintained with ❤️ by @JuanManuelRomeroGarcia

Xiaohack Chatbot Asistente XiaoHack

Xiaohack V 3.3 | © Copyright 2024 | Users Online: 0 | Estado: Offline