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?

4 Likes

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

i use this: Home Assistant | Meshtastic

2 Likes

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:

4 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)

3 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.

I have went a little crazy with my setup. I was having issues with the meshtastic device connected to home assistant via USB. I had to get a heltek device and use my WiFi to get it working. I use it to send me weather information, alarm information, and other information. I created my own network of device. My T1000-E talk to each other but I have MQTT turned off. My solar node, and my node in my vehicles connect to MQTT unless I need me phone. Then I connect one T1000-E to MQTT and let the node with me and my other T1000-E MQTT to the other T1000-E. I am running bridged MQTT servers. So My home assistant one can keep running. But If I lose electric or internet at home. I still have all my nodes connected together and it still works.
Still working on the best way to set all the nodes up. LongFast is not working for me. I have been having better luck with MediumFast and ShortFast.

So right now, if there is a tornado warning in my area. I have it Announcing over my speaks in the house, my cell phones and also send a broadcast message to my default channel. I did this so I can expand it out to family members. It will either get there via MQTT or by RF if they are close enough.

My next project in the next week or two is to have all my GPS nodes show up on a map in home assistant. I am not liking the map and history feature in the actual Meshtastic App. I want history and to be able to see the other data easier. I then can add that as a second tracking device for us.

So far I am happy with the way everything is working. If you need help. I can help. I dug in and worked a lot of issues out messing with this.

1 Like

Is anyone using the (GitHub - meshtastic/home-assistant: Home Assistant Integration for Meshtastic) ? If so can you share your automations that display GPS nodes onto the HA Map.

Are you just wanting your devices or all devices?

Both actually. I have managed to do it using MQTT but not really sure using the integration.

OK worked it out. This is what I have running at the moment as well as HomeAssistant running a very simple Infobot.

3 Likes

This looks great, any tips on how you got it working? I have some devices turning up soon and would like to do something similar.

1 Like