Meshtastic has grown, anyone using it with Home Assistant?

After much use I can confidently state that Meshtastic is simply amazing for off grid communication and recently it’s been gaining huge popularity with many more nodes coming online, anyone can check out the online Meshtastic maps and see if there is any nodes nearby, if you live anywhere even only slightly urban it think you will be pleasantly surprised

Has anyone tried to implement Meshtastic into Home Assistant? Has it become easier with later firmware updates?

3 Likes

Did you learn anything about this I am interested in the same thing.

i use this: Home Assistant | Meshtastic

1 Like

I just got done setting it up. I wouldn’t say it was easy. The part that was a problem for me is the new firmware feature “OK to MQTT”. It wouldn’t have been an issue but I didn’t see the setting anywhere in the Android app. I had to use the Chrome serial web interface.
“OK to MQTT” Is under the Lora settings if you use the web interface on a PC. It’s a new feature you need to watch out for if you update.

It’s all working now and don’t worry. I’ve been taking notes!

  • T-deck to Heltek V3
  • Heltek V3 over WiFi to MQTT
  • MQTT to HA
  • HA to PROFIT!

Update:
I can’t recommend doing this but someone had to do it. I piped Meshtastic directly to assist. Any messages sent from my T-deck and that contain “ok nabu” the rest of the message goes to assist. It should be able to do anything assist can do right now within about a half mile range until I put the big antenna up. It should go much farther then. It’s currently set to the broadcast channel just for testing purposes. I’m going to change it to only work with direct message that are encrypted after I’m done testing tonight. That’s still not very secure so I’ll also set it to only work with a handful of commands. If someone figures out how to toggle a couple lights they definitely earned the thrill of doing it a few times until I get annoyed. :laughing:

2 Likes

By implementing Meshtastic, are you asking about a network or the LoRa stuff itself?

Where does MQTT play a part in Meshtastic?

Here’s how I found this thread:

  1. I’m interested in LoRa from some recent YouTube videos and wanna explore possible ways to make it work for me.
  2. I thought about how the protocol worked and realized I could have an always-connected version that would capture and relay messages, so I could remotely access them without a phone.
  3. I could use something like this for home automation. I could send a message to my Home Assistant server to trigger automations without Wi-Fi or Internet access (for fun).
  4. I found this thread hoping someone else had actual ideas and use cases I didn’t think about.

The best thing I found was GitHub - Mictronics/meshtastic2hass: A Python client for use with Meshtastics devices that forwards telemetry and position messages to Home Assistant (Hass) via MQTT. which works by connecting to the meshtastic node and then producing MQTT messages for the home assistant’s mqtt integration, so pretty decent integration but needs to be run alongside of home assistant. The approach of using meshtastic’s mqtt functionality and parse the json messages on home assistant side (approach that @jane1e mentioned) has some limitations.

I have the use case to use meshastic as off-grid / backup way of controlling things inside home assistant instance, so I have invested in building an custom integration for home assistant. Uses same approach as meshtastic2hass as to directly connecting to the node via tcp, serial or bluetooth, but then exposing sensors and other things directly natively in home assistant instead of detour via mqtt.
I have also implemented what I did not found anywhere: device triggers and device actions in order to build automations.
You can install it via HACS: GitHub - broglep/homeassistant-meshtastic: Home Assistant Integration for Meshtastic

@Sawtaytoes I do number 3, I have an always on meshtastic node connected to wifi, the integration connects via tcp and I have an automation that reacts to received messages by the node

Number 2 would be also interesting too, but have not yet looked into how best to integrate such a functionality into home assistant (I suspect logbook would probably a viable way)

2 Likes

I’m about to deploy version 3 nodes in our surrounding mountains (rak4631 with larger solar) and looking to integrate into HA. I saw before coming across this thread this link Home Assistant | Meshtastic
However it refers that nRF52 devices aren’t supported. Is this different to your integration broglep? My gateway is also RAK (but could use something else)
Primary intent is device tracker for all nodes but messaging via web client (currently tunneled through Coudflare) I see is also possible, which would be wonderful.
I’m just confused why the other integration (Meshtastics own integration?) says nRF52 isn’t supported.