MeshCore/MeshCore2Discord: Difference between revisions
Jump to navigation
Jump to search
MrAlders0n (talk | contribs) Created page with "**NOTOC** = Sending MeshCore Messages to Discord via Home Assistant = This guide explains how to forward MeshCore messages into Discord using '''Home Assistant''' as the bridge. You’ll need the [https://github.com/meshcore-dev/meshcore-ha MeshCore-HA] integration (installed via HACS), and Home Assistant’s built-in Discord integration. == Prerequisites == * A working Home Assistant setup * HACS installed and configured * Discord webhook or bot token ready * A confi..." |
MrAlders0n (talk | contribs) No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
[[Main Page|← Home]] | |||
= Sending MeshCore Messages to Discord via Home Assistant = | = Sending MeshCore Messages to Discord via Home Assistant = | ||
Line 34: | Line 36: | ||
* If using Wi‑Fi: connect to your Companion via the '''MeshCore mobile app''' | * If using Wi‑Fi: connect to your Companion via the '''MeshCore mobile app''' | ||
* If using USB: connect to your PC and open [[https://app.meshcore.nz](https://app.meshcore.nz) app.meshcore.nz] | * If using USB: connect to your PC and open [[https://app.meshcore.nz](https://app.meshcore.nz) app.meshcore.nz] | ||
'''Click Connect''' → '''the 3‑dot menu''' → '''Connect via USB''' | |||
* Once connected, join the '''Testing''' channel just like you would in the mobile app | * Once connected, join the '''Testing''' channel just like you would in the mobile app | ||
* When finished, disconnect and reconnect to Home Assistant | * When finished, disconnect and reconnect to Home Assistant |
Latest revision as of 18:28, 26 September 2025
Sending MeshCore Messages to Discord via Home Assistant
This guide explains how to forward MeshCore messages into Discord using Home Assistant as the bridge. You’ll need the MeshCore-HA integration (installed via HACS), and Home Assistant’s built-in Discord integration.
Prerequisites
- A working Home Assistant setup
- HACS installed and configured
- Discord webhook or bot token ready
- A configured MeshCore node
Steps
1. Setup MeshCore-HA
- Open HACS in Home Assistant
- Search for MeshCore-HA
- Install the integration and restart Home Assistant
- Configure the integration by adding your MeshCore node details in Home Assistant
2. Add the Discord Integration
- In Home Assistant, go to Devices & Services
- Click Add Integration
- Search for and select Discord
- Request the API token from MrAlderson
- Enter the token and click Submit
3. Add the Testing Channel to the HA Companion
- Disconnect MeshCore-HA from your Companion device
- If using Wi‑Fi: connect to your Companion via the MeshCore mobile app
- If using USB: connect to your PC and open [[1](https://app.meshcore.nz) app.meshcore.nz]
Click Connect → the 3‑dot menu → Connect via USB
- Once connected, join the Testing channel just like you would in the mobile app
- When finished, disconnect and reconnect to Home Assistant
4. Verify the Channel Number
- Determine which channel number corresponds to Testing (likely Channel 2).
- In Home Assistant, navigate to: Devices → MeshCore → your Companion node
- From your mobile device, send a message to the Testing channel
- Check the Status page in Home Assistant — the message should appear under Channel 0 or Channel 1
5. Create an Automation to Forward #testing to Discord
- In Home Assistant, go to Settings → Automations & Scenes → Automations
- Click New Automation
- Open the 3‑dot menu (top right) → Edit in YAML
- Paste the YAML below and Save
alias: MeshCore - Bot - Forward testing to discord description: When Testing receives a message forward it to Discord triggers: - event_type: meshcore_message event_data: message_type: channel channel_idx: 1 trigger: event enabled: true conditions: [] actions: - action: notify.benderha metadata: {} data: target: - "DISCORD-THREAD-ID" message: "{{ trigger.event.data.sender_name }}: {{ trigger.event.data.message }}" mode: parallel max: 20
- Replace values
- DISCORD-THREAD-ID → Request the thread ID from MrAlders0n and replace it in the YAML.
- channel_idx: 1 → Replace with the channel number for Testing that you discovered in Step 4.