forked from iarv/meshstream
35cefa9981eb97c868c2350bd224065c6830d57c
- Fix timestamp field from timestamp to ts - Add proper packet structure parsing based on sample logs - Add special visualization for Node Info packets - Add special visualization for Telemetry packets with DeviceMetrics - Format uptime in human-readable hours - Add fallback for unknown packet types with pretty printing - Handle both packet and non-packet log entries
Meshstream
A Go application that monitors the Meshtastic MQTT server and logs packets to the terminal.
Setup
- Clone this repository
- Install dependencies:
go mod tidy
Running
go run main.go
Decoding Meshtastic Packets
This project includes the Meshtastic protocol buffer definitions in the proto/ directory and a decoder for parsing MQTT packets. The application will automatically decode JSON messages and extract key information from binary messages.
Protocol Buffer Compilation
To regenerate the protocol buffer Go code:
make gen-proto
This will:
- Install the required protoc-gen-go compiler plugin in a local bin/ directory
- Generate Go code from the protocol buffer definitions
- Place the generated code in the proto/generated/ directory
Packet Decoding
The application currently decodes packets in these formats:
-
JSON messages (from topics containing '/json/')
- Extracts common fields like sender, receiver, and payload
- Pretty-prints the JSON content
-
Binary messages (from topics containing '/binary/')
- Shows basic topic information and a hex dump of the binary data
-
Text messages (from topics containing '/text/')
- Displays the plain text content
The decoder is implemented in the decoder package.
MQTT Configuration
- Broker: mqtt.bayme.sh
- Username: meshdev
- Password: large4cats
- Topic prefix: msh/US/CA/Motherlode
Languages
TypeScript
71.3%
Go
22.9%
HTML
2.1%
Makefile
1.1%
Dockerfile
1%
Other
1.6%