{"id":39925478,"url":"https://gitHub.com/meshtastic/home-assistant","last_synced_at":"2026-01-27T06:00:30.524Z","repository":{"id":262027499,"uuid":"886016477","full_name":"meshtastic/home-assistant","owner":"meshtastic","description":"Home Assistant Integration for Meshtastic","archived":false,"fork":false,"pushed_at":"2025-10-09T08:55:39.000Z","size":2496,"stargazers_count":197,"open_issues_count":29,"forks_count":21,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-10-22T12:35:53.164Z","etag":null,"topics":["home-assistant","meshtastic"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meshtastic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSES/GPL-3.0-or-later.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"meshtastic","open_collective":"meshtastic","buy_me_a_coffee":"broglep"}},"created_at":"2024-11-10T00:49:22.000Z","updated_at":"2025-10-20T16:04:47.000Z","dependencies_parsed_at":"2024-11-10T02:23:49.492Z","dependency_job_id":"2fcca869-05be-40d4-85ac-86962def1adc","html_url":"https://github.com/meshtastic/home-assistant","commit_stats":null,"previous_names":["broglep/homeassistant-meshtastic","meshtastic/home-assistant"],"tags_count":16,"template":false,"template_full_name":"ludeeus/integration_blueprint","purl":"pkg:github/meshtastic/home-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshtastic%2Fhome-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshtastic%2Fhome-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshtastic%2Fhome-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshtastic%2Fhome-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meshtastic","download_url":"https://codeload.github.com/meshtastic/home-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshtastic%2Fhome-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28805313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T05:43:52.625Z","status":"ssl_error","status_checked_at":"2026-01-27T05:43:48.957Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["home-assistant","meshtastic"],"created_at":"2026-01-18T18:00:18.741Z","updated_at":"2026-01-27T06:00:30.511Z","avatar_url":"https://github.com/meshtastic.png","language":"Python","funding_links":["https://github.com/sponsors/meshtastic","https://opencollective.com/meshtastic","https://buymeacoffee.com/broglep"],"categories":["Official Source Code Repositories"],"sub_categories":["Device Interaction and Integrations"],"readme":"\u003c!--\r\nSPDX-FileCopyrightText: 2024-2025 Pascal Brogle @broglep\r\nSPDX-FileCopyrightText: 2025 Ylian Saint-Hilaire @ylianst\r\n\r\nSPDX-License-Identifier: MIT\r\n--\u003e\r\n\r\n# Home-Assistant Meshtastic Integration\r\n\r\n[![GitHub Release][releases-shield]][releases]\r\n[![License][license-shield]](LICENSE)\r\n\r\n[![hacs](https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge)](https://hacs.xyz/docs/faq/custom_repositories)\r\n[![HA Analytics](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fanalytics.home-assistant.io%2Fcustom_integrations.json\u0026query=%24.meshtastic.total\u0026style=for-the-badge\u0026label=Active%20Installations\u0026color=red)](https://buymeacoffee.com/broglep)\r\n\r\n\r\n_Home Assistant Integration for [Meshtastic](https://www.meshtastic.org)._\r\n\r\nSupported Features:\r\n * Add meshtastic devices as gateways to interact with the mesh\r\n   * Supports TCP, Serial \u0026 Bluetooth connection (also works with [Bluetooth Proxy](https://esphome.io/components/bluetooth_proxy.html))\r\n   * Home Assistant Zeroconf, Bluetooth \u0026 USB-Serial Auto-Discovery \r\n   * Select which meshtastic nodes should be imported to home assistant\r\n * Meshtastic node metrics\r\n * Record received messages\r\n * Send messages (as direct message or on broadcast channel)\r\n * Record node position (as device tracker)\r\n * Device triggers \u0026 actions for automations\r\n * Various other service actions (e.g. request metrics, trace route)\r\n * Bundled meshtastic web client for manual interaction with gateway\r\n * MQTT client proxy support (forwards messages from radio to MQTT broker)\r\n\r\nFor more details, see check the [documentation](#documentation).\r\n\r\n## Installation\r\n\r\n### Recommended: [HACS](https://www.hacs.xyz)\r\n\r\n1. Add this repository as a custom repository to HACS: [![Add Repository](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=meshtastic\u0026repository=home-assistant\u0026category=integration)\r\n2. Use HACS to install the integration.\r\n3. Restart Home Assistant.\r\n4. Set up the integration using the UI: [![Add Integration](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=meshtastic)\r\n\r\n### Alternatives\r\n\u003cdetails\u003e\r\n\u003csummary\u003eAlternatives\u003c/summary\u003e\r\n\r\n### Manual\r\n1. Using the tool of choice open the directory (folder) for your HA configuration (where you find `configuration.yaml`).\r\n2. If you do not have a `custom_components` directory (folder) there, you need to create it.\r\n3. In the `custom_components` directory (folder) create a new folder called `homeassistant-meshtastic`.\r\n4. Download _all_ the files from the `custom_components/meshtastic/` directory (folder) in this repository.\r\n5. Place the files you downloaded in the new directory (folder) you created.\r\n6. Restart Home Assistant\r\n7. In the HA UI go to \"Configuration\" -\u003e \"Integrations\" click \"+\" and search for \"Meshtastic\"\r\n\u003c/details\u003e\r\n\r\n### Configuration is done in the UI\r\n\r\n\u003c!----\u003e\r\n\r\n# Documentation\r\n\r\n## Supported Platforms\r\n### Sensor / Binary Sensor\r\nFor nodes selected as part of the configuration, metrics are exposed as corresponding sensors.\r\n\r\nEven though integration is classified as `local_polling` it predominantly operates as `local_push` and home assistant is notified\r\nas soon as new state is available. Polling is only used as fallback should the push mechanism stop working.\r\n\r\n### [Notification](https://www.home-assistant.io/integrations/notify/)\r\nUsing notification platform and the generated `notify.mesh_*` entities is the recommended way to send messages to the mesh when you don't need control over all the details \r\n(which gateway to use, acknowledgements, etc.)\r\n\r\nDepending on your needs, all nodes from the gateway's node database as well as the channels can be made available as notification targets.\r\n\r\n\r\nNote: Support is based on new [entity notification platform](https://developers.home-assistant.io/blog/2024/04/10/new-notify-entity-platform/), \r\nfor an example on how to use it, see [official documentation](https://www.home-assistant.io/integrations/notify/#example-with-the-entity-platform-notify-action).\r\n\r\n### [Automation](https://www.home-assistant.io/docs/automation/)\r\n\r\nFor nodes selected as part of the configuration, device triggers and device actions are available.\r\nPrefer using device actions and triggers in your automation over using (service) actions.\r\n\r\n#### Triggers\r\nThere are triggers when messages have been sent or have been received.\r\nGateway nodes offer more triggers than other nodes. You can further refine the triggers to only fire when a message was \r\nsent/received on a particular channel or as direct message.\r\n\r\n\r\n#### Actions\r\n * Send Direct Message\r\n * Request Telemetry\r\n * Request Position\r\n\r\nNote: Ensure you have a delay before the action if your automations are triggered by meshtastic device trigger,\r\notherwise you risk that your action triggered message is being dropped by meshtastic firmware because\r\nit is still busy with receiving / sending other mesh messages.\r\n\r\n#### Examples\r\n\u003cdetails\u003e\r\n\u003csummary\u003eReply back after message received from predefined device on arbitrary channel (including direct message) \u003c/summary\u003e\r\n\r\n```yaml\r\n- id: '1800000042000'\r\n  alias: Ping Sample\r\n  description: 'Reply back after message from device'\r\n  triggers:\r\n  - device_id: e3376b45b4912c27cffb46c58e4998e4\r\n    domain: meshtastic\r\n    type: message.sent\r\n    trigger: device\r\n  actions:\r\n  - delay:\r\n      seconds: 10\r\n  - device_id: e3376b45b4912c27cffb46c58e4998e4\r\n    domain: meshtastic\r\n    type: send_message\r\n    message: PONG {{ trigger.event.data.message }}\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eEcho incoming channel text messages from any node with gateway device trigger\u003c/summary\u003e\r\n\r\n```yaml\r\n- id: '1735857524502'\r\n  alias: Echo Channel Message\r\n  description: ''\r\n  triggers:\r\n  - domain: meshtastic\r\n    device_id: 16efde6990a6a09903153abb8624fe38\r\n    type: channel_message.received\r\n    entity_id: meshtastic.gateway_brig_channel_primary\r\n    trigger: device\r\n  conditions: []\r\n  actions:\r\n  - delay:\r\n      seconds: 5\r\n  - action: meshtastic.broadcast_channel_message\r\n    metadata: {}\r\n    data:\r\n      ack: true\r\n      channel: meshtastic.gateway_brig_channel_primary\r\n      message: 'ECHO: {{ trigger.event.data.message }}'\r\n  mode: single\r\n```\r\n\u003c/details\u003e\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eAdvanced: Handling incoming text messages from any node without notification platform and its entities\u003c/summary\u003e\r\n\r\n```yaml\r\n- id: '1735852176270'\r\n  alias: Echo on Channel Message (without Notify Platform)\r\n  description: 'Only from gateway with node id 3771721320 and channel 0'\r\n  triggers:\r\n  - trigger: event\r\n    event_type: meshtastic_api_text_message\r\n    event_data:\r\n      data:\r\n        to:\r\n          node:\r\n          channel: 0\r\n        gateway: 3771721320\r\n  conditions: []\r\n  actions:\r\n  - delay:\r\n      seconds: 5\r\n  - action: meshtastic.send_text\r\n    data:\r\n      ack: true\r\n      text: 'ECHO: {{ trigger.event.data.data.message }}'\r\n      from: '{{ trigger.event.data.data.gateway }}'\r\n      channel: '{{ trigger.event.data.data.to.channel }}'\r\n  mode: single\r\n- id: '1735852176271'\r\n  alias: Echo on Direct Message (without Notify Platform)\r\n  description: 'Only from gateway with node id 3771721320'\r\n  triggers:\r\n  - trigger: event\r\n    event_type: meshtastic_api_text_message\r\n    event_data:\r\n      data:\r\n        to:\r\n          node: 3771721320\r\n          channel:\r\n        gateway: 3771721320\r\n  conditions: []\r\n  actions:\r\n  - delay:\r\n      seconds: 5\r\n  - action: meshtastic.send_text\r\n    data:\r\n      ack: true\r\n      text: 'ECHO: {{ trigger.event.data.data.message }}'\r\n      from: '{{ trigger.event.data.data.gateway }}'\r\n      to: '{{ trigger.event.data.data.from }}'\r\n  mode: single\r\n```\r\n\r\nIf you don't want to use the recommend notification platform for sending messages (e.g. if you don't want to clutter your Home Assistant instance with potentially hundreds of notify mesh entities), \r\nyou can still handle incoming text messages from any public node and reply to these messages. \r\nThis is useful if to want to reply to incoming direct messages with a standard message, use a LLM or handle various commands with automations.\r\n\r\nTo do this, create a new Home Assistant automation that triggers on \"Manual Events\" and put `meshtastic_api_text_message` as the \"Event Type\". This will cause this automation to get triggerred on all incoming channel and direct messages. You will get events that include this information:\r\n\r\n```yaml\r\ntrigger:\r\n  event:\r\n    event_type: meshtastic_api_text_message\r\n    event_data:\r\n      data:\r\n        from: 1127918844\r\n        to:\r\n          node: null\r\n          channel: 0\r\n        gateway: 862525748\r\n        message: Sample Message\r\n```\r\n\r\nFrom contains the node id of the sender of the message, to will have the node id of the gateway for direct messages, or a gateway channel id if the message is directed at the channel. \r\nNote that the channel id is dependent on the gateway node, so make sure you are using the proper gateway node when replying using that channel id. \r\n\r\nYou can create conditions in the automation to filter out the incoming messages you want or you can directly filter in the trigger.\r\nFor example to filter out messages addressed to your gateway node, use this condition with your node id.\r\n\r\n```\r\n{{ trigger.event.data.data.to.node == 862525748 }}\r\n```\r\n\r\nTo filter out messages addresses at the primary channel (Channel 0 is typically LONGFAST), use this condition:\r\n\r\n```\r\n{{ trigger.event.data.data.to.channel == 0 }}\r\n```\r\n\r\nYou can also forward these messages as notifications to your phone, etc. For example:\r\n\r\n```\r\nMeshtastic message from ({{ trigger.event.data.data.from }}): {{ trigger.event.data.data.message }}\r\n```\r\n\r\nTo reply to a text message in this situation, add a 2 second or more delay action and then an action called `Meshtastic 'Send Text'` to your automation. You need to add a short delay to make sure your Meshtastic device is idle before replying. Change the `Meshtastic 'Send Text'` action to edit in yaml and change the `to`, `from` and `text` values to something like his:\r\n\r\n```\r\naction: meshtastic.send_text\r\nmetadata: {}\r\ndata:\r\n  ack: false\r\n  from: \"{{ trigger.event.data.data.gateway }}\"\r\n  to: \"{{ trigger.event.data.data.from }}\"\r\n  text: \"ECHO: {{ trigger.event.data.data.message }}\"\r\n```\r\n\r\nIn the example above, we echo back an incoming direct message.\r\n\r\n\u003c/details\u003e\r\n\r\n### [Logbook](https://www.home-assistant.io/integrations/logbook/)\r\n\r\nDirect messages or channel messages are recorded in the log book. \r\nEach gateway has an entity for direct messages and its channels, you can navigate to the device and select the entitiy\r\nto see an extract of the logbook, or you can navigate to the logbook and filter for the desired entities there. \r\n\r\nNote: When logbook is not enabled, messages are not recorded.\r\n\r\n### [Device Tracker](https://www.home-assistant.io/integrations/device_tracker/)\r\n\r\nFor nodes selected as part of the configuration, their position is exposed as a device tracker.\r\nYou can see the nodes on home assistant map accordingly and home assistant will report if \r\nnode is at home or away.\r\n\r\n### Services / [Actions](https://developers.home-assistant.io/blog/2024/07/16/service-actions/)\r\n\r\nUse the available actions if you need more control compared to other methods to interact with\r\nmeshtastic devices. Certain actions need you to understand meshtastic details and are not recommended \r\nfor the average user. \r\n\r\n## [Meshtastic Web Client](https://meshtastic.org/docs/software/web-client/)\r\n\r\nIn order to enable manual interaction with gateway nodes and because of the limitation of meshtastic firmware\r\nthat only allows one single connection, this integration offers a workaround by exposing a meshtastic client http api\r\nfor each configured gateway. The bundled meshtastic web client can then be connected\r\nto this integration directly and the integration will act as a proxy.\r\n\r\nThis also has the added benefit that it allows you to connect to meshtastic devices via the web client\r\nthat are not connected via TCP (like serial or bluetooth) or don't support TCP at all (e.g. nRF based nodes).\r\n\r\n**Security Note**: As a side effect, enabling this feature results in unauthenticated access to your gateway nodes for \r\nanyone that can reach your home assistant instance (because meshtastic does not support authentication on the http api).\r\nMake sure to only use this feature if your home assistant instance is running in a trusted environment!\r\n\r\nTo access the web client, perform the following steps:\r\n\r\nIn Home Assistant:\r\n1. Enable the feature in the integration configuration\r\n2. Navigate to the \"Meshtastic\" menu item. If you don't see it, reload home assistant interface\r\n3. Press the \"Open\" button of the desired gateway to launch the web client\r\n\r\nInside the Meshtastic Web Client:\r\n\r\n4. Press \"New Connection\" - the correct hostname is already populated\r\n5. Press \"Connect\"\r\n\r\n## Contributions are welcome!\r\n\r\nIf you want to contribute to this please read the [Contribution guidelines](CONTRIBUTING.md)\r\n\r\n***\r\n\r\n[commits-shield]: https://img.shields.io/github/commit-activity/y/meshtastic/home-assistant.svg?style=for-the-badge\r\n[commits]: https://github.com/meshtastic/home-assistant/commits/main\r\n[license-shield]: https://img.shields.io/github/license/meshtastic/home-assistant.svg?style=for-the-badge\r\n[releases-shield]: https://img.shields.io/github/release/meshtastic/home-assistant.svg?style=for-the-badge\r\n[releases]: https://github.com/meshtastic/home-assistant/releases\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitHub.com%2Fmeshtastic%2Fhome-assistant","html_url":"https://awesome.ecosyste.ms/projects/gitHub.com%2Fmeshtastic%2Fhome-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitHub.com%2Fmeshtastic%2Fhome-assistant/lists"}