الأكاديمية ← قنوات المراسلةتوثيق رسمي · إرشاد عربي

iMessage عبر BlueBubbles

BlueBubbles (iMessage)

متوسط4 دقائق قراءةالدرس 303 أسئلة✓ 2026-08-18
قبل أن تقرأ

ما هذه الصفحة، وماذا تحتوي.

بوابة المراسلة: الوصلة التي تجعلك تكلّم Hermes من تطبيق تستعمله أصلًا، مثل Telegram أو WhatsApp، بدل الطرفية. الوكيل الذي تصله من هاتفك تستعمله فعلًا. الذي يحتاج فتح الحاسوب تنساه بعد أسبوع. ستستعمل هنا hermes gateway run وhermes logs gateway، والقراءة نحو 4 دقائق. انتبه: افتح القناة لنفسك فقط في البداية عبر قائمة سماح. القناة المفتوحة تعني أن أي شخص يراسل وكيلك.

7أقسام
9أمثلة برمجية
1جداول
5أوامر
709كلمة من المصدر
ماذا ستستطيع بعدها

نتائج مأخوذة من هذه الصفحة، لا من قالب.

  • تعرف ما بوابة المراسلة ولماذا قد تحتاجه.
  • تنفّذ hermes gateway run وhermes logs gateway وتفهم ما يحدث بعدها.
  • تقرأ الجدول وتأخذ منه السطر الذي يخصّك فقط.
  • تضبط BLUEBUBBLES_SERVER_URL في المكان الصحيح.
ما ستقابله من أسماء

كما تظهر تمامًا داخل Hermes.

الأوامر
  • hermes gateway run
  • hermes logs gateway
  • hermes pairing list
  • hermes gateway setup
  • hermes pairing approve bluebubbles
متغيرات البيئة
  • BLUEBUBBLES_SERVER_URL
  • BLUEBUBBLES_PASSWORD
  • BLUEBUBBLES_ALLOWED_USERS
  • BLUEBUBBLES_ALLOW_ALL_USERS
خريطة الصفحة

انتقل مباشرة إلى ما تحتاجه.

  1. 01Prerequisites
  2. 02Setup
  3. 03How It Works
  4. 04Environment Variables
  5. 05Features
  6. 06Private API
  7. 07Troubleshooting
الصفحة الرسمية كاملة

بلا اختصار أو حذف.

النص أدناه منقول من المصدر الرسمي بالإنجليزية حتى تبقى الأوامر والأسماء دقيقة كما هي. قبل كل قسم شرح عربي يوضّح ما بداخله.

Connect Hermes to Apple iMessage via BlueBubbles ↗ — a free, open-source macOS server that bridges iMessage to any device.

Prerequisites

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه. تذكير: الوصلة التي تجعلك تكلّم Hermes من تطبيق تستعمله أصلًا، مثل Telegram أو WhatsApp، بدل الطرفية.

  • A Mac (always on) running BlueBubbles Server ↗
  • Apple ID signed into Messages.app on that Mac
  • BlueBubbles Server v1.0.0+ (webhooks require this version)
  • Network connectivity between Hermes and the BlueBubbles server

Setup

خطوات عملية بالترتيب. نفّذ خطوة وتأكد أنها نجحت قبل الانتقال للتالية. الأوامر هنا: hermes gateway run، hermes pairing list.

1. Install BlueBubbles Server

Download and install from bluebubbles.app ↗. Complete the setup wizard — sign in with your Apple ID and configure a connection method (local network, Ngrok, Cloudflare, or Dynamic DNS).

2. Get your Server URL and Password

In BlueBubbles Server → Settings → API, note:

  • Server URL (e.g., http://192.168.1.10:1234)
  • Server Password

3. Configure Hermes

Run the setup wizard:

Shellسطر واحد
hermes gateway setup

Select BlueBubbles (iMessage) and enter your server URL and password.

Or set environment variables directly in ~/.hermes/.env:

Shellسطران
BLUEBUBBLES_SERVER_URL=http://192.168.1.10:1234
BLUEBUBBLES_PASSWORD=your-server-password
Optional: Require mentions in group chats

By default, Hermes responds to every authorized BlueBubbles/iMessage DM or group message. To make group chats opt-in, enable mention gating:

YAML5 أسطر
platforms:
  bluebubbles:
    enabled: true
    extra:
      require_mention: true

With require_mention: true, DMs still work normally, but group-chat messages are ignored unless they match a mention pattern. If you do not configure custom patterns, Hermes uses conservative defaults for Hermes and @Hermes agent variants.

For a custom agent name, set regex patterns:

YAML6 أسطر
platforms:
  bluebubbles:
    extra:
      require_mention: true
      mention_patterns:
        - '(?<![\w@])@?amos\b[,:\-]?'

4. Authorize Users

Choose one approach:

DM Pairing (recommended): When someone messages your iMessage, Hermes automatically sends them a pairing code. Approve it with:

Shellسطر واحد
hermes pairing approve bluebubbles <CODE>

Use hermes pairing list to see pending codes and approved users.

Pre-authorize specific users (in ~/.hermes/.env):

Shellسطر واحد
BLUEBUBBLES_ALLOWED_USERS=user@icloud.com,+15551234567

Open access (in ~/.hermes/.env):

Shellسطر واحد
BLUEBUBBLES_ALLOW_ALL_USERS=true

5. Start the Gateway

Shellسطر واحد
hermes gateway run

Hermes will connect to your BlueBubbles server, register a webhook, and start listening for iMessage messages.

How It Works

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

Textسطران
iMessage → Messages.app → BlueBubbles Server → Webhook → Hermes
Hermes → BlueBubbles REST API → Messages.app → iMessage
  • Inbound: BlueBubbles sends webhook events to a local listener when new messages arrive. No polling — instant delivery.
  • Outbound: Hermes sends messages via the BlueBubbles REST API.
  • Media: Images, voice messages, videos, and documents are supported in both directions. Inbound attachments are downloaded and cached locally for the agent to process.

Environment Variables

جدول مرجعي. لا تقرأه كله، ابحث عن السطر الذي يخصّك فقط.

VariableRequiredDefaultDescription
BLUEBUBBLES_SERVER_URLYes—BlueBubbles server URL
BLUEBUBBLES_PASSWORDYes—Server password
BLUEBUBBLES_WEBHOOK_HOSTNo127.0.0.1Webhook listener bind address
BLUEBUBBLES_WEBHOOK_PORTNo8645Webhook listener port
BLUEBUBBLES_WEBHOOK_PATHNo/bluebubbles-webhookWebhook URL path
BLUEBUBBLES_HOME_CHANNELNo—Phone/email for cron delivery
BLUEBUBBLES_ALLOWED_USERSNo—Comma-separated authorized users
BLUEBUBBLES_ALLOW_ALL_USERSNofalseAllow all users
BLUEBUBBLES_REQUIRE_MENTIONNofalseRequire a mention pattern before responding in group chats
BLUEBUBBLES_MENTION_PATTERNSNoHermes wake wordsJSON array, newline-separated, or comma-separated regex patterns for group mention matching

Auto-marking messages as read is controlled by the send_read_receipts key under platforms.bluebubbles.extra in ~/.hermes/config.yaml (default: true). There is no corresponding environment variable.

Features

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

Text Messaging

Send and receive iMessages. Markdown is automatically stripped for clean plain-text delivery.

Rich Media

  • Images: Photos appear natively in the iMessage conversation
  • Voice messages: Audio files sent as iMessage voice messages
  • Videos: Video attachments
  • Documents: Files sent as iMessage attachments

Tapback Reactions

Love, like, dislike, laugh, emphasize, and question reactions. Requires the BlueBubbles Private API helper ↗.

Typing Indicators

Shows "typing..." in the iMessage conversation while the agent is processing. Requires Private API.

Read Receipts

Automatically marks messages as read after processing. Requires Private API.

Chat Addressing

You can address chats by email or phone number — Hermes resolves them to BlueBubbles chat GUIDs automatically. No need to use raw GUID format.

Private API

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

Some features require the BlueBubbles Private API helper ↗:

  • Tapback reactions
  • Typing indicators
  • Read receipts
  • Creating new chats by address

Without the Private API, basic text messaging and media still work.

Troubleshooting

قسم لحل المشكلات. ابحث فيه عن العطل الذي يشبه حالتك بدل قراءته كاملًا. الأوامر هنا: hermes logs gateway.

"Cannot reach server"

  • Verify the server URL is correct and the Mac is on
  • Check that BlueBubbles Server is running
  • Ensure network connectivity (firewall, port forwarding)

Messages not arriving

  • Check that the webhook is registered in BlueBubbles Server → Settings → API → Webhooks
  • Verify the webhook URL is reachable from the Mac
  • Check hermes logs gateway for webhook errors (or hermes logs -f to follow in real-time)

"Private API helper not connected"

  • Install the Private API helper: docs.bluebubbles.app ↗
  • Basic messaging works without it — only reactions, typing, and read receipts require it
اختبار الفهم

3 أسئلة إجاباتها كلها في هذه الصفحة.

كل خيار اسم حقيقي من توثيق Hermes. حتى الخيارات الخاطئة حقيقية، لكنها من صفحات أخرى.

1. أي متغير بيئة من التالي يظهر فعليًا في هذا الدرس؟
2. أي عنوان من التالي لا يظهر في هذا الدرس؟
3. أي مفتاح إعداد يظهر في أمثلة هذا الدرس؟