Skip to content

Map Auto Uploader for MeshCore HA Integration#163

Open
Confituurke wants to merge 7 commits intomeshcore-dev:mainfrom
aXistem-dev:feature/map-auto-uploader
Open

Map Auto Uploader for MeshCore HA Integration#163
Confituurke wants to merge 7 commits intomeshcore-dev:mainfrom
aXistem-dev:feature/map-auto-uploader

Conversation

@Confituurke
Copy link

Integrates the map.meshcore.dev-uploader bot into the MeshCore Home Assistant integration. When enabled, repeater and room server adverts received by the Companion are automatically uploaded to map.meshcore.dev—no separate bot required.

Features

  • Map Auto Uploader – Off by default; enable in Global Settings
  • Same connection as HA (USB, BLE, or TCP)
  • Ed25519 signing (supercop format, aligned with map.meshcore.dev-uploader)
  • Replay protection and signature verification
  • Logbook entries for successful and failed uploads

Requirements

  • Private key export on firmware (ENABLE_PRIVATE_KEY_EXPORT=1)

Changes

1. HA robustness

  • mesh_core returns None when disconnected (instead of raising)
  • _resolve_contact guard for services when device is disconnected

2. Map Auto Uploader: core

  • New map_uploader.py – ADVERT handling, verification, signing, upload to map API
  • CONF_MAP_UPLOAD_ENABLED constant

3. Map Auto Uploader: integration

  • Map uploader init, SELF_INFO and RX_LOG_DATA handling
  • Try/except for MQTT and map uploader so failures do not block setup

4. Map Auto Uploader: config and UI

  • HA OptionsFlow compatibility (2024 API)
  • Map Auto Uploader toggle in Global Settings
  • mesh_core guard when adding repeater

5. Map Auto Uploader: logbook and translations

  • EVENT_MESHCORE_MAP_UPLOAD logbook event
  • map_upload_enabled strings in en.json and sk.json

6. Map Auto Uploader: documentation

  • README section, docs/docs/map-upload.md, installation link
Map Auto Uploader for MeshCore HA Integration## Map Auto Uploader for MeshCore HA Integration Integrates [map.meshcore.dev-uploader](https://github.com/recrof/map.meshcore.dev-uploader) into the MeshCore Home Assistant integration. Repeater and room server adverts received by the Companion are automatically uploaded to [map.meshcore.dev](https://map.meshcore.dev) when Map Auto Uploader is enabled in Global Settings. ### Highlights - **Map Auto Uploader** — Off by default; enable in Global Settings - Reuses HA connection (USB, BLE, or TCP) - Ed25519 signing (supercop format, compatible with map.meshcore.dev-uploader) - Replay protection and signature verification - Logbook events for successful and failed uploads - Translations in English and Slovak ### Requirements - Private key export on firmware (`ENABLE_PRIVATE_KEY_EXPORT=1`) ### Commits 1. **HA robustness** — `mesh_core` returns `None` when disconnected; `_resolve_contact` guard 2. **Core implementation** — `map_uploader.py`, `CONF_MAP_UPLOAD_ENABLED` 3. **Integration** — init, SELF_INFO/RX_LOG_DATA handling, MQTT/map try-except 4. **Config and UI** — HA OptionsFlow compatibility, Global Settings toggle 5. **Logbook and translations** — `EVENT_MESHCORE_MAP_UPLOAD`, en/sk strings 6. **Documentation** — README section, `map-upload.md`, installation link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant