Version History - MiWiFi XiaoHack Edition


📡 Automatic releases from GitHub

The latest versions are synchronized automatically from GitHub.

Showing 21–25 of 57 releases

📦 v3.3.9b1 – XiaoHack Edition

Date: 2025-08-28 12:32:46
View original release on GitHub

📝 Changelog — MiWiFi Integration

📦 Version v3.3.9 – 2025-08-29


✨ New Features

  • 🧹 Global Auto-Purge of inactive devices.

A single, domain-wide scheduled task (main + mesh) that automatically removes stale entities/devices.

  • Global, persistent configuration in .storage/miwifi/auto_purge.json.
  • Runs every _N_ days at time H and, by design, the inactivity threshold = _N_.
  • Kickoff ~60 s after the integration loads so it works even without restarts.
  • Self-reschedules after each run; no manual intervention required.
  • 🧰 New service: miwifi.purge_inactive_devices

Manual purge (or dry-run) supporting:

  • days (threshold), only_randomized, include_orphans,

include_orphans_without_age, include_entities_without_age, verbose, apply (dry-run when false).

  • Dry-run preview via notification (“Purge preview”).
  • Safe removal order: entities first, then orphaned devices.

▶️ Service Examples

Dry-run (no deletions): ```yaml service: miwifi.purge_inactive_devices data: days: 5 only_randomized: false include_orphans: true include_orphans_without_age: true include_entities_without_age: true verbose: true apply: false

```

Apply changes (delete): ``yaml service: miwifi.purge_inactive_devices data: days: 5 only_randomized: false include_orphans: true include_orphans_without_age: true include_entities_without_age: true verbose: false apply: true ``


✅ Fixes & Stability

  • 🛡️ Startup Wi‑Fi restart eliminated. The compatibility probe no longer uses write endpoints during initialization. All checks are now read‑only, preventing unintended radio reloads on integration or HA restart.
  • 🧼 Sensitive data hygiene. Extra masking in debug/diagnostic logs to avoid leaking PPPoE/Wi‑Fi passwords and MAC addresses.
  • 🧰 Robust error handling around client requests and topology refresh to avoid transient failures during the first boot cycle.
  • Harmonized access to entity/device registries to match recent HA versions.
  • Clearer logs during boot and purge (results & previews).

⚙️ Improvements

  • 📡 Read‑only Wi‑Fi capability detection now leverages wifi_detail_all/wifi_diag_detail_all instead of any set_* endpoints.
  • 🔍 Clearer boot logs to make it evident that no configuration writes occur during startup.
  • 📦 Minor UX polish in the update entity for the MiWiFi Panel version reporting.
  • 🔄 Global scheduler shared across multiple entries.

Only one task for the entire domain with automatic ownership and handover if one entry is removed.

  • 🕒 Safer Options UI.

Time selector for auto-purge (no regex), and values are synchronized across all entries.

  • 💾 Clear persistence.

The JSON keeps every_days, at, next_due, last_run, last_params, history, and owner.

  • 🧭 Smarter cleanup.

Multi-router awareness (main + mesh), detection and purge of orphans, and entities without age when they become orphaned.

  • 🧵 Async safety.

No hass.async_create_task from worker threads; all scheduling uses HA helpers.

  • 🗣️ i18n.

Added/updated translation keys for the purge service (including include_entities_without_age) and auto-purge options.


🌍 MiWiFi Translation & Services Restructure

✅ Achievements

  • Key unification: Renamed purge_inactivepurge_inactive_devices in all languages so Home Assistant properly maps the service with its translations.
  • Nested structure: All services (dump_router_data, purge_inactive_devices, etc.) now use nested fields in translation JSONs.

👉 This fixes the issue where raw keys like service_fields.purge_inactive.days_description appeared in the UI.

  • Removed duplicates: The duplicated block under service_fields.purge_inactive (never used by HA) was removed.
  • Consistency: All supported languages (es, en, fr, ru, tr, zh-Hans, pt-BR, de) are now aligned and synchronized.
  • Clarity for verbose field: Replaced technical “Verbose mode” with clearer wording per language:
  • 🇪🇸 Modo detallado
  • 🇬🇧 Detailed mode
  • 🇫🇷 Mode détaillé
  • 🇷🇺 Подробный режим
  • 🇹🇷 Ayrıntılı mod
  • 🇨🇳 详细模式
  • 🇧🇷 Modo detalhado
  • 🇩🇪 Detaillierter Modus

📂 Changes in services.yaml

Before (❌ incorrect):

``yaml purge_inactive: name: service_fields.purge_inactive.name description: service_fields.purge_inactive.description fields: days: name: service_fields.purge_inactive.days ``

After (✅ correct, same style as dump):

``yaml purge_inactive_devices: name: Purge inactive devices description: Remove device_trackers and orphan devices after X days of inactivity. fields: days: name: Inactivity days description: Number of days without activity before purge. required: true selector: number: min: 1 max: 365 unit_of_measurement: days only_randomized: name: Only randomized MACs description: Purge only devices with randomized (private) MACs. selector: boolean: {} include_orphans: name: Include orphan devices description: Also purge devices without associated entities. selector: boolean: {} include_orphans_without_age: name: Include orphans without timestamp description: Allow purge even if the last activity date is unknown. selector: boolean: {} verbose: name: Detailed mode description: Adds extended log output during execution. selector: boolean: {} apply: name: Apply changes description: If disabled, runs as a dry-run (simulation) without deleting anything. selector: boolean: {} ``


🌐 Translation synchronization

🔑 Unified key

purge_inactive_devices

📖 Translated fields

  • days → Days / Días / Jours / Дни / Günler / 天数 / Dias / Tage
  • only_randomized → Only randomized MACs / Solo MAC aleatorias / Uni...
  • include_orphans → Include orphan devices / Incluir huérfanos / ...
  • include_orphans_without_age → Include orphans without timestamp / Incluir huérfanos sin edad / ...
  • verbose → Detailed mode / Modo detallado / Mode détaillé / Подробный режим / Ayrıntılı mod / 详细模式 / Modo detalhado / Detaillierter Modus
  • apply → Apply changes / Aplicar cambios / Appliquer / Применить / Değişiklikleri uygula / 应用更改 / Aplicar mudanças / Änderungen anwenden

📌 Final result

  • All languages correctly translate the fields of the service.
  • No more raw keys in the UI.
  • purge_inactive_devices behaves identically to dump_router_data.
  • JSON files for each language are complete and aligned.

✅ Compatibility

  • No breaking changes. Works with the same set of Xiaomi/Redmi routers already supported by the integration.
  • Home Assistant Core: 2024.6+ recommended.

📘 How to Update

  1. Replace the folder: config/custom_components/miwifi/ with this release’s files.
  2. Restart Home Assistant.
  3. (Optional) In Developer Tools → Services, call miwifi.dump_router_data with hide_sensitive: true to verify everything looks good without exposing secrets.
  4. If the Wi‑Fi on your router still restarts at HA boot, verify other automations or third‑party logins (Mi Home app, web UI) are not applying changes at the same time.

ℹ️ Additional Information

  • On‑demand actions like set_guest_wifi and set_wifis still apply changes when you explicitly call those services. The boot process itself remains read‑only.
  • For troubleshooting, enable debug logs for custom_components.miwifi and share sanitized excerpts if needed.

💖 Support & Donations

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

Thank you for your support! 🙌


Summary of changes

AreaChange
StartupRemoved write endpoints from compatibility checks; startup is read‑only
SecurityImproved masking for passwords and MACs in logs
Servicesset_guest_wifi, get_wifis, dump_router_data available and documented
UXClearer boot logs and panel update reporting

📦 v3.3.8 – XiaoHack Edition

Date: 2025-08-21 15:45:20
View original release on GitHub

📝 Changelog — MiWiFi Integration

📦 Version v3.3.8 – 2025-08-21


✨ New Features

  • 🖥️ Exposed manual_main_mac in the backend payload, allowing the panel to reliably detect and highlight the manually selected main router.
  • 🔄 Unified logic in frontend (status.js, panel-frontend.js) to recognize manual main, auto main, and fallback by MAC address.
  • 🎛️ Extended topology sensor updates to cover both prefixes (sensor.topologia_miwifi* and sensor.miwifi_topology*), ensuring all sensors reflect the correct is_main state.
  • 📶 New Wi-Fi Services:

miwifi.get_wifis → retrieve current Wi-Fi configurations (2.4G, 5G, 5G Game, Guest)

miwifi.set_wifis → update SSID, password, or visibility for main Wi-Fi networks. (Disabled, in test.....)

miwifi.set_guest_wifi → enable/disable guest Wi-Fi, change SSID/password, and select encryption.

miwifi.test_guest_wifi → verify guest Wi-Fi settings in real time.


🛠 Critical Fixes

  • 🐞 Fixed issue where sensor.miwifi_topology_* did not update with is_main flag, causing the panel to ignore the manual main router.
  • 🔧 Corrected missing await on panel removal (async_remove_panel), avoiding race conditions when re-registering the MiWiFi panel.
  • ⚡ Fixed auto main detection logic: routers with show=0, mode=0/3, assoc=1 are now correctly identified as the main node, covering firmware variants that previously were skipped.

✅ Fixes & Stability

  • 📡 Panel now refreshes properly after changing the main router via service call — no longer requires a full page reload.
  • 🧹 Normalized MAC comparisons to lowercase in backend and frontend to prevent mismatches between saved manual MAC and reported topology.
  • 🔁 Improved fallback handling: if topology parsing fails, backend gracefully falls back to manual main without losing state.

⚙️ Backend Improvements

  • _async_prepare_topo now injects manual_main_mac directly into self.data and topo_data, making it available for panel and sensors.
  • 🔄 Coordinators refresh all updaters when a manual main router is saved, ensuring state consistency across mesh nodes.
  • 🪛 Expanded update logic to keep all topology sensors (miwifi_topology*, topologia_miwifi*) synchronized with the same graph data.
  • 📊 Added auto_reason attribute to topology graph for debugging: shows why a node was considered is_main_auto.

🌐 Localization

  • 🌍 Completed new config flow labels across en, de, fr, and pt-BR: activity_days, enable_panel, is_force_load, log_level, wan_speed_unit.
  • 🈸 Added stubs for ru, tr, and zh-Hans covering errors.*, notifications.*, service_fields.*, and services.* keys to avoid missing-key issues. Community translations welcome.
  • 🧩 Guest Wi-Fi service strings added to all locales where applicable (name + fields), aligning UI with new services.

🚫 Capabilities

  • No changes in this release.

🆕 Compatibility Model

  • ✅ Added support for new router model to be confirmed.

🧹 Code Cleanup

  • 🗑️ Removed redundant checks for is_main_auto in frontend, now centralized in isMainNode() helper.
  • 📖 Improved debug logging to show exposed manual_main_mac, auto_reason, and updated panel payload keys.

✅ Compatibility

  • ✅ Compatible with Home Assistant 2025.8.0 and newer.
  • 🧩 Compatible with all panel versions from 1.3.1+.

📘 How to Update

  1. Replace all files inside your custom_components/miwifi/ folder with the contents of this release.
  2. Restart Home Assistant.
  3. Clear browser cache (Ctrl+F5) to ensure the panel frontend loads the updated JS files.
  4. Select a main router via service or allow auto-detection — the panel will now display it consistently.

ℹ️ This release focuses on manual main router detection and improved auto main detection, fixing inconsistencies between backend, sensors, and panel.

💖 Support & Donations

If you find this integration useful and want to support continued development, you can make a donation here:

Every contribution helps me dedicate more time to building and improving MiWiFi. Thank you! 🙌

📦 v3.3.7 – XiaoHack Edition

Date: 2025-08-06 18:34:46
View original release on GitHub

📝 Changelog — MiWiFi Integration

📦 Version v3.3.7 – 2025-08-06


✅ Fixes & Stability

🧱 Prevented integration crashes when router endpoints return invalid or empty data: All router data collection (dump_router_data) now gracefully handles missing responses and unsupported features. No more full service failure due to new_status, wifi_config or similar issues.


⚙️ Improvements

🔍 Added per-feature validation using unsupported.py: The integration checks whether a router model supports each feature before calling it. Skipped features are marked as "error": "unsupported".

📄 Added dump result metadata: Each router dump now includes:

  • "status": "ok" or "partial"
  • "errors": list of failed or unsupported blocks

This allows better feedback and debugging from the frontend or log files.

🛡️ Safer and cleaner log output with proper fallback per section. The dump always gets created, even if some blocks are missing.


✅ Compatibility

  • ✅ Compatible with Home Assistant 2025.7.0 and newer.
  • 🧩 Compatible with all MiWiFi panels from 1.3.0+.

📘 How to Update

  1. Replace all files inside your custom_components/miwifi/ folder with the contents of this release.
  2. Restart Home Assistant.
  3. Use the miwifi.dump_router_data service again and check for "status" and "errors" in the result.

ℹ️ This update ensures the dump service never fails, even on routers with incomplete API support. It gives you detailed visibility on which sections failed and why.

💖 Support & Donations

If you find this integration useful and want to support continued development, you can make a donation here:

Every contribution helps me dedicate more time to improving MiWiFi. Thank you! 🙌

📦 v3.3.6 – XiaoHack Edition

Date: 2025-08-05 21:43:16
View original release on GitHub

📝 Changelog — MiWiFi Integration

📦 Version v3.3.6 – 2025-08-05


🛠 Critical Fixes

  • Fixed: Options form in config_flow was failing due to a missing hass argument in _get_options_schema().

→ Now uses self.hass internally and loads correctly without errors.

  • Fixed: Blocking I/O calls (open, zipfile) in dump_router_data moved to executor.

→ No more Detected blocking call to open warnings.

  • Fixed: Docker issue creating /config/www/miwifi/exports.

→ Directory creation now runs safely in a thread executor with full path creation.


✨ New Behaviors

  • Dump cleanup improved:

→ Now keeps only the last 2 dumps (ZIP + JSON) and removes older ones.

  • Logs cleanup isolated:

MiWifiDownloadLogsService now only deletes logs_*.zip files. → MiWifiDumpRouterDataService now only deletes dump_*.zip and associated .json files.

  • Memory parsing standardized:

→ Added parse_memory_to_mb() utility. → Correctly interprets values like "2GB"2048 MB, "512MB"512 MB, or raw numbers.


⚙️ Backend Improvements

  • Introduced new utils.py module to centralize reusable utilities (parse_memory_to_mb).
  • Improved logging for dump and log cleanup actions with better debugging context.

✅ Compatibility

  • ✅ Compatible with Home Assistant 2025.7.0+.
  • 🧩 Works with all panel versions from 1.3.0+.

📘 How to Update

  1. Replace all files inside your custom_components/miwifi/ folder with this release.
  2. Restart Home Assistant.
  3. Clear browser cache if the panel does not update automatically.

ℹ️ This post-release addresses important bugfixes in options flow, dump generation, and memory parsing to ensure full compatibility and stability.

💖 Support & Donations

If you find this integration useful and want to support continued development, you can make a donation here:

Every contribution helps me dedicate more time to building and improving MiWiFi. Thank you! 🙌

📦 v3.3.5 – XiaoHack Edition

Date: 2025-08-05 11:17:26
View original release on GitHub

📝 Changelog — MiWiFi Integration

📦 Version v3.3.4 — 2025-08-05


✨ New Features

  • New service: __HTML_PLACEHOLDER_0__
  • Generates a complete JSON dump of the main router, including:
  • System status and hardware info
  • Network configuration (WAN, Wi-Fi, topology)
  • Connected devices and MAC filter info
  • NAT rules (single and range)
  • QoS configuration
  • Optional full Wi-Fi configuration (SSID, encryption, etc.)
  • Selectable blocks: You can choose which sections to include.
  • Sensitive data masking: Option to automatically anonymize passwords and MAC addresses.
  • Exported as __HTML_PLACEHOLDER_0__ for easy download, while keeping the raw .json in /config/www/miwifi/exports.
  • Translated fields in all supported languages: 🇺🇸 English, 🇪🇸 Spanish, 🇩🇪 German, 🇫🇷 French, 🇧🇷 Portuguese, 🇷🇺 Russian, 🇹🇷 Turkish, 🇨🇳 Simplified Chinese.

✅ Fixes & Stability

  • Adjusted JSON formatting for improved readability (4-space indentation).
  • Improved notifications: Persistent notification now provides a direct download link to the .zip.

⚙️ Improvements

  • Added full multi-language translations for the new service fields.
  • Prepared the backend for future panel integration (button to trigger the dump directly from the UI).

📘 How to Update

  1. Replace all files in custom_components/miwifi/ with the new version.
  2. Restart Home Assistant.
  3. Access Developer Tools → Services, select miwifi.dump_router_data, and configure the dump options.
  4. Check /config/www/miwifi/exports/ for the .zip file with the router dump.

💖 Support & Donations

If this integration helps you, consider supporting development:

Every contribution helps me dedicate more time to building and improving MiWiFi. Thank you! 🙌

Xiaohack Chatbot Asistente XiaoHack

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