MESH-AI v0.5.1-beta- THE FIRST BETA RELEASE! #41
mr-tbot
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
MESH-AI (BETA v0.5.1) - NOW IN BETA!
This release is functionally the same as v0.5.0 - but has been rebranded to MESH-AI for trademark compliance and respect for the official Meshtastic.org project. This project is getting a lot of attention now - and I am actively reaching out to the Meshtastic team for guidance on how to develop respectfully in their ecosystem - all previous ALPHA releases are going to be pulled from the repo.
MESH-AI is an experimental project that bridges Meshtastic LoRa mesh networks with powerful AI chatbots. This is the FIRST BETA RELEASE!
The Meshtastic logo trademark is the trademark of Meshtastic LLC.
Features
/about
,/ping
,/test
,/help
,/motd
,/ai
(aliases:/bot
,/query
,/data
),/emergency
(or/911
),/whereami
plus custom commands viacommands_config.json
./messages
,/nodes
,/connection_status
,/logs
,/send
,/ui_send
, and a new/discord_webhook
for inbound Discord messages./discord_webhook
endpoint allow for inbound Discord message processing.Changelog
New Updates in v0.4.2 → v0.5.1 - NOW IN BETA!
config.json
.config.json
for longer USB connections (e.g., roof nodes)."debug": true
inconfig.json
to track.POSSIBLE BUGS IN BETA v0.5.1 - Web UI ticker isn't honoring read messages in some cases.
INCOMING MESSAGE SOUNDS ARE UNTESTED ON ALL PLATFORMS AND FILESYSTEMS.
New Updates in v0.4.1 → v0.4.2
New Updates in v0.4.0 → v0.4.1
(UPDATE: My WinError issues were being caused by a combination of low solar power, and MQTT being enabled on my node. MQTT - especially using LongFast is very intense on a node, and can cause abrupt connection restarts as noted here: Add notes about public MQTT server having a lot of traffic meshtastic/meshtastic#901 - but - now the script is super robust regardless for handling errors!)
New Updates in v0.3.0 → v0.4.0
/discord_webhook
endpoint for processing messages from Discord./sms <+15555555555> <message>
commands_config.json
with dynamic AI prompt insertion.Changelog: v0.2.2 → v0.3.0 (from the original Main Branch README)
script.log
file with auto‑truncation.reply_in_channels
andreply_in_directs
) to control AI responses./about
) and support for custom commands./nodes
, updated/connection_status
, and/ui_send
.1. Changelog: v0.1 → v0.2.2
config.json
fieldsdebug
toggle for verbose debugging.lmstudio
,openai
,ollama
), including timeouts and endpoints.home_assistant_enabled
,home_assistant_channel_index
, secure pin, etc.).enable_discord
,discord_send_emergency
, etc.).chunk_size
,max_ai_chunks
, andchunk_delay
) to reduce radio congestion.ai_provider
.config.json
.commands_config.json
./ping
,/test
,/emergency
,/whereami
,/help
,/motd
, and more./emergency
(or/911
) triggers optional Twilio SMS, SMTP email, and/or Discord alerts.chunk_size
&max_ai_chunks
).chunk_delay
) between chunks to avoid flooding the mesh network.GET /messages
: Returns the last 100 messages in JSON.GET /dashboard
: Displays a simple HTML dashboard showing the recently received messages.POST /send
: Manually send messages to nodes (direct or broadcast) from external scripts or tools.messages.log
for persistent logging of all incoming messages, commands, and emergencies.config.json
,commands_config.json
, andmotd.json
.Run MESH-AI - Windows.bat
script for straightforward Windows startup.Quick Start (Windows)
config.json
,commands_config.json
, andmotd.json
as needed. Refer to the Configuration section below.Run MESH-AI - Windows.bat
or by executing:Quick Start (Ubuntu / Linux)
Download/Clone
git clone https://github.com/mr-tbot/mesh-ai.git cd mesh-ai
Create and Activate a Virtual Environment Named
mesh-ai
:source mesh-ai/bin/activate
Install Dependencies:
Configure Files:
config.json
,commands_config.json
, andmotd.json
as needed. Refer to the Configuration section in the documentation for details.Start the Bot:
Access the WebUI Dashboard:
Quick Start (Docker)
Prerequisites
/dev/ttyUSB0
or\\.\COM3
.Prepare the Volume Structure
File structure should look like this:
Basic Usage
/ai
(or/bot
,/query
,/data
) followed by your message to receive an AI response./whereami
to retrieve the node’s GPS coordinates (if available)./emergency <message>
or/911 <message>
./sms <+15555555555> <message>
"home_assistant_channel_index"
) are forwarded to Home Assistant’s conversation API.PIN=XXXX your message
).Using the API
The MESH-AI server (running on Flask) exposes the following endpoints:
/messages
Retrieve the last 100 messages in JSON format.
/nodes
Retrieve a live list of connected nodes as JSON.
/connection_status
Get current connection status and error details.
/logs
View a styled log page showing uptime, restarts, and recent log entries.
/dashboard
Access the full WebUI dashboard.
/send
and POST/ui_send
Send messages programmatically.
/discord_webhook
Receive messages from Discord (if configured).
Configuration
Your
config.json
file controls almost every aspect of MESH-AI. Below is an example configuration that includes both the previous settings and the new options:Home Assistant & LLM API Integration
Home Assistant Integration
"home_assistant_enabled": true
inconfig.json
."home_assistant_url"
(e.g.,http://homeassistant.local:8123/api/conversation/process
)."home_assistant_token"
and adjust"home_assistant_timeout"
."home_assistant_enable_pin": true
and set"home_assistant_secure_pin"
."home_assistant_channel_index"
are forwarded to Home Assistant.PIN=XXXX your message
.LLM API Integration
"ai_provider": "lmstudio"
and configure"lmstudio_url"
. - optionally set model and text embedding flags as well if using more than one model on the same LM-Studio instance."ai_provider": "openai"
, provide your API key in"openai_api_key"
, and choose a model."ai_provider": "ollama"
and configure the corresponding URL and model.Communication Integrations
Email Integration
"enable_smtp": true
inconfig.json
.config.json
:"smtp_host"
(e.g.,smtp.gmail.com
)"smtp_port"
(use465
for SSL or another port for TLS)"smtp_user"
(your email address)"smtp_pass"
(your email password or app-specific password)"alert_email_to"
(recipient email address or list of addresses)Discord Integration: Detailed Setup & Permissions
1. Create a Discord Bot
Go to the Discord Developer Portal and sign in with your Discord account.
Click on "New Application," give it a name (e.g., MESH-AI Bot), and confirm.
2. Set Up Bot Permissions
Your bot needs a few basic permissions to function correctly:
Use a tool like Discord Permissions Calculator to generate the correct permission integer.
For minimal functionality, a permission integer of 3072 (which covers "Send Messages," "View Channels," and "Read Message History") is often sufficient.
3. Invite the Bot to Your Server
Replace
YOUR_CLIENT_ID
with your bot’s client ID (found in the General Information tab) in the following URL:Open the link in your browser, select the server where you want to add the bot, and authorize it. Make sure you have the “Manage Server” permission in that server.
4. Configure Bot Credentials in
config.json
Update your configuration file with the following keys (replace placeholder text with your actual values):
Create a webhook in your desired Discord channel (Channel Settings → Integrations → Webhooks) and copy its URL.
Copy your bot’s token from the Developer Portal and enable message polling by specifying the channel ID where the bot should read messages.
To get a channel ID, enable Developer Mode in Discord (User Settings → Advanced → Developer Mode) then right-click the channel and select "Copy ID."
5. Polling Integration (Optional)
Set
"discord_receive_enabled": true
to allow the bot to poll for new messages.The configuration key
"discord_inbound_channel_index"
determines the channel number used by MESH-AI for routing incoming Discord messages. Make sure it matches your setup.6. Testing Your Discord Setup
With the updated configuration, restart your bot.
Verify that the bot is present in your server, that it can see messages in the designated channel, and that it can send responses.
Confirm that emergency alerts and AI responses are being posted in Discord as per your configuration (
"discord_send_ai": true
and"discord_send_emergency": true
).7. Troubleshooting Tips
If the bot isn’t responding or reading messages, double-check that its role on your server has the required permissions.
Verify that you’ve copied the correct channel IDs and webhook URLs (ensure no extra spaces or formatting issues).
Keep your bot token secure. If it gets compromised, regenerate it immediately from the Developer Portal.
Twilio Integration
"enable_twilio": true
inconfig.json
.config.json
:"twilio_sid": "YOUR_TWILIO_SID"
"twilio_auth_token": "YOUR_TWILIO_AUTH_TOKEN"
"twilio_from_number": "YOUR_TWILIO_PHONE_NUMBER"
"alert_phone_number": "DESTINATION_PHONE_NUMBER"
(the number to receive emergency SMS)Other Important Settings
Logging & Archives:
script.log
and message logs inmessages.log
.messages_archive.json
to keep recent messages.Device Connection:
"serial_port"
or enabling"use_wifi"
along with"wifi_host"
and"wifi_port"
."use_mesh_interface"
if applicable.Message Routing & Commands:
commands_config.json
.AI Provider Settings:
"ai_provider"
and related API settings (timeouts, models, etc.) for LM Studio, OpenAI, Ollama, or Home Assistant integration.Security:
PIN=XXXX your message
) to ensure messages are accepted.Testing:
/sms
command or trigger an emergency alert to confirm that Twilio and email integrations are functioning.Contributing & Disclaimer
This release (v0.4.2) is experimental. Expect bugs and changes that might affect existing features. Thorough field testing is recommended before production use.
Report issues or submit pull requests on GitHub. Your input is invaluable.
Modifying this code for nefarious purposes is strictly prohibited. Use at your own risk.
Donations are GRACIOUSLY accepted to stoke development!
https://www.paypal.com/ncp/payment/XPW23EP9XHMYS
bc1qcfstyxaktw5ppnsm5djmpvmgv49z0cp6df33tl
TrpgvB8EgTtqhU1W6XJAvx3CS8KKkRwTLHc
D5MyXVRkwLW9XzcKjjcwEHcXvnaTFueZhy
Conclusion
MESH-AI BETA v0.5.1 takes the solid foundation of v0.4.2 and introduces even more significant improvements in logging, error handling, and a bit of polish on the web-UI and it's function. Whether you’re chatting directly with your node, integrating with Home Assistant, or leveraging multi‑channel alerting (Twilio, Email, Discord), this release offers a more comprehensive and reliable off‑grid AI assistant experience.
Enjoy tinkering, stay safe, and have fun!
Please share your feedback or join our community on GitHub.
This discussion was created from the release MESH-AI v0.5.1-beta- THE FIRST BETA RELEASE!.
Beta Was this translation helpful? Give feedback.
All reactions