RAK WisBlock as Meshtastic Gateway - Setup, Configuration, and Home Assistant
RAK WisBlock as Meshtastic Gateway - Setup, Configuration, and Home Assistant
Introduction
Meshtastic has fascinated me for a while now - a free, encrypted LoRa mesh network that works completely without the internet and still transmits messages over long distances. I already had mobile nodes, but what was missing was a permanently installed gateway that hangs in the network 24/7, relays messages, and sends its data to Home Assistant.
In this article, I describe how I implemented this with the RAK WisBlock, the RAK13800 Ethernet module, and the RAK19018 PoE module. Spoiler: it wasn’t always straightforward - but that’s exactly what makes it interesting.
The goal: A gateway powered via network cable, receiving and relaying Meshtastic messages on an encrypted channel - all cleanly integrated into Home Assistant.
The Hardware
Before we get started, a quick introduction to the components:
- RAK4630 - the actual core chip (nRF52840 + SX1262 LoRa transceiver). In the documentation it often appears as RAK4631 - they’re the same thing. RAK4630 is the bare chip, RAK4631 is the finished WisBlock module. For us, no difference.
- RAK13800 - the Ethernet module that connects the WisBlock to the network.
- RAK19018 - the PoE module that stacks directly on the RAK13800 and draws power from the network cable (IEEE 802.3af, up to 9W).
- RAK19007 - the WisBlock Base Board, where everything comes together.
A note about the screws: The package often doesn’t include any. You’ll need M1.2×3 mm for the modules and M2.5×4 mm to fix the base board in the housing. RAK sells a matching screw set in their store.

Hardware Assembly
The assembly is pleasantly simple:
- Insert RAK4630 Core into the core slot of the base board and secure with M1.2×3 screws
- Insert RAK13800 Ethernet module into the IO slot and screw it down
- Stack RAK19018 PoE module directly on top of the RAK13800 - the two connect via header pins
- Connect LoRa antenna - never operate without an antenna!

As soon as a PoE-capable cable is plugged in, the device starts automatically - no separate power supply needed.

The Right Firmware
Here comes the first important decision point: The standard Meshtastic firmware for the RAK4631 does not support JSON over MQTT. But for Home Assistant we need exactly that - so there’s a separate gateway firmware.
Download Firmware
On github.com/meshtastic/firmware/releases, open the latest release, expand Assets, and download the ZIP:
firmware-nrf52840-x.x.xx.xxxxxxx.zip
Extract the ZIP and look for this file inside:
firmware-rak4631_eth_gw-x.x.xx.xxxxxxx.uf2
Note: All Meshtastic releases are labeled “Beta” - that’s their normal stable release channel, no worries.
Flash Firmware
- Connect RAK4630 to your PC via USB-C
- Press the reset button twice quickly - the device appears as a USB drive named
RAK4631 - Copy the
.uf2file to this drive - Device restarts automatically
To verify: best check the firmware version via the Meshtastic app over BLE - it’s displayed directly in the device details. The INFO_UF2.TXT on the drive only shows the bootloader version, not the firmware.
Network Setup
Connect the device via Meshtastic app over BLE and configure under Radio Configuration → Network:
- WiFi: off
- Ethernet: on
- Mode: IPv4 / DHCP
After reboot, check the IP address in your router. There’s no web interface for the RAK4631 - but you can ping it, and that’s all we need.
Set Up Encrypted Channel
Instead of the public default channel, we create our own channel with its own key:
In the app under Channels → create new channel:
- Name: e.g.
HomeMesh - PSK: let it generate randomly
- Uplink: on
- Downlink: on
Delete the old default channel afterwards.
Attention: Save the PSK carefully! All devices that should communicate in the network need the same key.
The channel URL for later import on other devices can be obtained via CLI:
pip install pyqrcode pypng
meshtastic --host [IP-of-RAK] --qr
This displays the URL and a QR code directly in the terminal - practical for scanning with other devices.
MQTT Configuration - the Bumpy Part
This is where the biggest surprise hit: The Meshtastic app and CLI seemed to save MQTT settings - but after a reboot they were gone. This is a known bug with the eth_gw firmware when configuring over TCP.
The solution: apply configuration as a YAML file.
First, we need the Meshtastic CLI. Best in its own Python environment:
python -m venv meshtastic-env
source meshtastic-env/bin/activate # Windows: meshtastic-env\Scripts\activate
pip install meshtastic pyqrcode pypng
Then export the current configuration:
meshtastic --host [IP-of-RAK] --export-config config.yaml
In the config.yaml, adjust the mqtt: section:
mqtt:
address: 192.168.x.x # IP of your Home Assistant
enabled: true
encryptionEnabled: false
jsonEnabled: true
tlsEnabled: false
mapReportSettings:
publishIntervalSecs: 3600
password: YourPassword
root: msh/EU_868
username: meshtastic
To ensure a permanent connection with the MQTT server, this needs to be adjusted in the config:
lora:
ignoreMqtt: false # Important: otherwise the gateway ignores MQTT packets
And in the power: section, disable light sleep - otherwise the device goes to sleep after 5 minutes and the MQTT connection breaks:
power:
lsSecs: 0 # Disable light sleep
Then apply it again:
meshtastic --host [IP-of-RAK] --configure config.yaml
Also important - disable ignoreMqtt so the gateway also relays its own packets:
meshtastic --host [IP-of-RAK] --set lora.ignore_mqtt false
I’m working on a separate article about the Meshtastic Python CLI.
Home Assistant Preparation
Mosquitto Broker
In Home Assistant: Settings → Add-ons → Mosquitto Broker install and start.
Under Configuration, create a login for the gateway:
- Username:
meshtastic - Password: secure password
- “Require Client Certificate”: off
Save and restart Mosquitto.
MQTT Integration
Settings → Devices & Services → MQTT add with the broker credentials.
Integrate Handheld Device
For another Meshtastic device to communicate with the gateway, both must:
- Have the same channel with the same PSK → scan the QR code from the terminal
- Have the same modem preset → definitely check this!
The second one was the hidden pitfall for me: I initially had MediumFast on the gateway and LongFast on the handheld - they simply couldn’t hear each other even though everything else was correct.
For a home gateway, I recommend LongFast - that’s the Meshtastic standard, offers better range in the city, and is compatible with other nodes in the area you might happen to hear. So set both devices to LongFast.
Tip: Always check first whether the devices see each other in the node list before debugging MQTT!
The Final Test
To verify everything works, in Home Assistant go to Settings → Devices & Services → MQTT → Configure → Listen to a topic and subscribe to:
msh/#
Then send a message from the handheld. The result should look something like this:
{
"payload": {
"text": "Hello"
},
"type": "text",
"sender": "!68860978",
"channel": 0,
"hops_away": 0
}
If that arrives - everything’s perfect! 🎉
Meshtastic Entities in Home Assistant
Listening once is nice - but tracking permanently is better. With a few lines in configuration.yaml, Meshtastic messages become real Home Assistant entities that you can use in automations, dashboards, and history.
Create Sensors
Add the following to your configuration.yaml:
mqtt:
sensor:
- name: "Meshtastic last message"
unique_id: meshtastic_last_message
state_topic: "msh/EU_868/2/json/HomeMesh/#"
value_template: "{{ value_json.payload.text }}"
- name: "Meshtastic last sender"
unique_id: meshtastic_last_sender
state_topic: "msh/EU_868/2/json/HomeMesh/#"
value_template: "{{ value_json.sender }}"
- name: "Meshtastic timestamp"
unique_id: meshtastic_last_timestamp
state_topic: "msh/EU_868/2/json/HomeMesh/#"
value_template: "{{ value_json.timestamp | timestamp_local }}"
- name: "Meshtastic debug raw"
unique_id: meshtastic_debug_raw
state_topic: "msh/#"
value_template: "{{ value }}"
After a HA restart, the entities appear under Settings → Devices & Services → Entities.
Debug Options
There are two practical ways to check what the gateway is currently sending:
1. Live listen in HA - under Settings → Devices & Services → MQTT → Configure → Listen to a topic, enter the topic msh/# and click Start listening. Every incoming message is displayed immediately as formatted JSON.
2. Debug sensor - the sensor.meshtastic_debug_raw subscribes to msh/# and stores the raw last message unfiltered. This is especially useful to see what’s actually coming in - not just text messages but also telemetry, position data, and node info that don’t have payload.text.
Tip: For a nice formatted debug dashboard, I recommend Claude Code with the Home Assistant MCP - this lets you create a complete Meshtastic dashboard directly via prompt without manual YAML writing.

Conclusion
The setup is significantly more powerful than it appears at first glance. A permanently running gateway that receives all Meshtastic packets in the LoRa range and forwards them structured to Home Assistant - all encrypted over your own channel.
The biggest stumbling blocks were:
- Wrong firmware - definitely use the
eth_gwvariant, not the standard RAK4631 firmware - MQTT config bug - apply via YAML file instead of individual CLI commands
- Modem preset mismatch - all devices in the network must have the same preset, otherwise they simply can’t hear each other. For a stationary gateway, I recommend LongFast - better range and compatible with other nodes in the area
- Light sleep - set
power.ls_secsto0, otherwise the gateway goes to sleep after 5 minutes and the MQTT connection breaks
The next article is about the actual sensor node - the device that captures measurement data and feeds it into the mesh. And eventually the map is coming too. 🗺️
This article is part of a series on Meshtastic and Home Assistant.