الدليلGuide إعداد البوردةBoard setup

إعداد البوردة (ملف التعريف)

Board setup (device profile)

هذه الصفحة تشرح كل زر وخيار في صفحة «إعداد الجهاز» داخل التطبيق — بطريقة مبسّطة يفهمها أي شخص، حتى لو لأول مرة.This page explains every button and option on the “Device setup” screen in the app — in plain terms anyone can follow, even first-time.

⏱️
أسرع طريقة في ٣ خطوات: افتح تبويب القنوات ← اضغط قالبًا جاهزًا يناسب بوردتك ← اضغط إنشاء ملف التعريف. خلاص! باقي الصفحة شرح تفصيلي لو حابب تتعمّق أو تعدّل يدويًا.
Fastest way, in 3 steps: open the Channels tab → tap a ready template that matches your board → tap Create profile. Done! The rest of this page is detail for when you want to go deeper or edit by hand.

1 ما هي هذه الصفحة؟What is this page?

كل بوردة (ESP32 / ESP8266) عبارة عن «عقل» فيه عدّة أطراف كهربائية تُسمّى منافذ GPIO. صفحة الإعداد هي المكان الذي تُخبر فيه البوردة بما هو موصّل بكل طرف — مفتاح إضاءة؟ ديمر؟ إضاءة ملوّنة؟ حسّاس حرارة؟ — وعلى أي منفذ.

Each board (ESP32 / ESP8266) is a small “brain” with several electrical pins called GPIO pins. This page is where you tell the board what's wired to each pin — a light switch? a dimmer? RGB lighting? a temperature sensor? — and on which pin.

بعد أن تحفظ، تُكتب هذه التعريفات داخل البوردة وتُقفل بشكل دائم، فتعرف البوردة وظيفتها وتعمل وحدها حتى بدون إنترنت.

Once you save, these definitions are written into the board and locked permanently, so it knows its job and runs on its own — even with no internet.

🧩
فكّر فيها كـ«قائمة توصيلات»: لكل سطر تقول «النوع» (إيه الموصّل) و«المنفذ» (على أي رِجل في البوردة).
Think of it as a “wiring list”: for each row you set the type (what's connected) and the pin (which leg of the board).

2 كيف تفتح الصفحةHow to open the page

  1. أثناء إضافة جهاز جديد: تظهر تلقائيًا للوحدة الجديدة التي لم تُعرَّف بعد.
  2. لاحقًا: اضغط مطوّلًا على الجهاز ← إعداد الوحدة، أو من شاشة «الجهاز يحتاج إعداد» اضغط إضافة التعريفات.
  3. بالأعلى يمين الصفحة زر ؟ يفتح هذا الشرح في أي وقت.
  1. While adding a new device: it opens automatically for a new, unconfigured unit.
  2. Later: long-press the device → Configure unit, or from the “Device needs setup” screen tap Add definitions.
  3. A ? button at the top of the page opens this guide any time.

الصفحة فيها ثلاثة تبويبات بالأعلى:The page has three tabs at the top:

التبويبماذا يحتوي
القنواتتعريف كل مخرج/مدخل (الأهم — ابدأ من هنا)
الإعداداتسلوك متقدّم للمفاتيح والريليه (اختياري)
العتاداسم المشروع ومنافذ الأزرار والمؤشّرات (اختياري)
TabWhat it holds
ChannelsDefine each output/input (the important one — start here)
SettingsAdvanced switch and relay behaviour (optional)
HardwareProject name, button and indicator pins (optional)

3 البداية السريعة بالقوالب الجاهزةQuick start with ready templates

أسهل طريقة على الإطلاق. في أعلى تبويب القنوات ستجد صفًّا من القوالب الجاهزة تتنقّل بينها بالسحب يمينًا/يسارًا.

By far the easiest way. At the top of the Channels tab you'll find a row of ready templates you swipe through.

  1. افتح تبويب القنوات (أول تبويب بالأعلى).
  2. اسحب صفّ القوالب لتشاهد كل الخيارات، ثم اضغط القالب الذي يطابق بوردتك (مثلًا «4 مفاتيح»).
  3. سيملأ التطبيق القنوات فورًا، ويختار منافذ GPIO المتاحة تلقائيًا، ويسمّيها أسماءً افتراضية (مفتاح 1، مفتاح 2…).
  4. انزل لقائمة القنوات بالأسفل وعدّل الأسماء لتصير واضحة (مثلًا «إضاءة الصالة»). اختياري.
  5. تأكّد أن شريط الملخّص بالأعلى أخضر بدون تنبيهات، ثم اضغط إنشاء ملف التعريف.
  1. Open the Channels tab (the first tab at the top).
  2. Swipe the template row to see all options, then tap the template that matches your board (e.g. “4 switches”).
  3. The app fills the channels instantly, picks free GPIO pins automatically, and gives them default names (Switch 1, Switch 2…).
  4. Scroll to the channel list below and edit the names to be clear (e.g. “Living-room light”). Optional.
  5. Check the summary bar at the top is green with no warnings, then tap Create profile.

الجدول التالي يوضّح أي قالب يناسب أي حالة:This table shows which template fits which case:

القالبيناسب
مفتاح واحدإضاءة أو جهاز واحد
مفتاحان / 4 / 6 مفاتيحلوحات المفاتيح المتعددة
إضاءة معتّمة (ديمر)إضاءة قابلة للتعتيم
إضاءة RGBإضاءة ملوّنة (3 منافذ)
ستارةستارة/شتر كهربائي (فتح وغلق)
حسّاس حرارةحسّاس حرارة ورطوبة DHT
مفاتيح + حسّاس3 مفاتيح مع حسّاس حرارة
TemplateBest for
Single switchOne light or appliance
2 / 4 / 6 switchesMulti-gang switch panels
Dimmable lightA light you can dim
RGB lightColour lighting (3 pins)
CurtainMotorised curtain / shutter (open & close)
Temperature sensorA DHT temperature & humidity sensor
Switches + sensor3 switches with a temperature sensor
✏️
بعد تطبيق القالب يمكنك تعديل أي اسم أو منفذ بسهولة في قائمة القنوات بالأسفل. القالب مجرّد بداية سريعة — لست مضطرًّا لاستخدامه.
After applying a template you can easily tweak any name or pin in the channel list below. A template is just a quick start — you don't have to use one.

4 القنوات وأنواعهاChannels & their types

كل قناة (سطر) لها: اسم تختاره، ونوع يحدّد ما هو الموصّل، ومنفذ GPIO واحد أو أكثر. اختر النوع «بلا» لأي قناة غير مستخدمة.

Each channel (row) has: a name you choose, a type that says what's connected, and one or more GPIO pins. Set the type to “None” for any unused channel.

تعريف قناة يدويًا — خطوة بخطوة

Defining a channel by hand — step by step

  1. اضغط على خانة النوع في القناة، واختر ما هو موصّل بها (مثلًا «تشغيل/إيقاف» لمفتاح إضاءة).
  2. اضغط على خانة GPIO واختر رقم المنفذ الذي وصّلت إليه السلك على البوردة.
  3. لو النوع RGB ستظهر خانتان إضافيتان (G وB) — حدّدهما. ولو ستارة ستظهر خانة «منفذ الخفض».
  4. لو النوع حرارة/رطوبة (DHT) اختر نوع الحسّاس الذي وصّلته: DHT22 (AM2302) أو DHT11.
  5. اكتب اسمًا واضحًا للقناة في الخانة العلوية.
  6. كرّر لكل قناة مستخدمة، واترك الباقي على «بلا».
  1. Tap the channel's Type field and choose what's wired to it (e.g. “On/Off” for a light switch).
  2. Tap the GPIO field and pick the pin number you wired the cable to on the board.
  3. For type RGB, two extra fields appear (G and B) — set them. For Curtain, a “down pin” field appears.
  4. For type Temp/Humidity (DHT), choose the sensor type you connected: DHT22 (AM2302) or DHT11.
  5. Type a clear name for the channel in the top field.
  6. Repeat for each used channel, and leave the rest on “None”.
النوعالاستخدامعدد المنافذ
تشغيل/إيقافمفتاح إضاءة أو جهاز عادي (ريليه)1
باهت (ديمر)إضاءة قابلة للتعتيم1
مروحةمروحة بسرعات1
إضاءة RGBإضاءة ملوّنة (أحمر/أخضر/أزرق)3 (R + G + B)
شريط RGBشريط LED ملوّن (WS2812) + عدد اللمبات1 (منفذ البيانات)
ستارةستارة/شتر — رفع وخفض2 (رفع + خفض)
حرارة/رطوبة (DHT)حسّاس حرارة ورطوبة1
تناظريقراءة حسّاس تناظري (قيمة متغيّرة)1
رقميمدخل رقمي (باب/حركة: مفتوح/مغلق)1
TypeUsePins
On/OffA light switch or plain appliance (relay)1
DimmerA dimmable light1
FanA multi-speed fan1
RGB lightColour light (red/green/blue)3 (R + G + B)
RGB stripAddressable LED strip (WS2812) + LED count1 (data pin)
CurtainCurtain / shutter — up and down2 (up + down)
Temp/Humidity (DHT)Temperature & humidity sensor1
AnalogAn analog sensor reading (variable value)1
DigitalA digital input (door/motion: open/closed)1
⚠️
إضاءة RGB تحتاج تحديد ثلاثة منافذ (R وG وB)، والستارة تحتاج منفذين (رفع وخفض). لو نسيت واحدًا سينبّهك التطبيق عند الحفظ.
RGB lighting needs three pins (R, G and B), and a curtain needs two (up and down). If you miss one, the app warns you when you save.
🌡️
حسّاس الحرارة والرطوبة (DHT): عند اختيار النوع «حرارة/رطوبة» يظهر لك اختيار نوع الحسّاس (DHT22 / DHT11) — اختر ما وصّلته. حتى لو اخترت النوع الخطأ، تكتشف اللوحة النوع الصحيح تلقائيًا. إذا لم تظهر قراءات نهائيًا، تأكّد من وجود مقاومة 10 كيلو أوم (Pull-up) بين خط الداتا و+3.3 فولت.
Temperature & humidity (DHT): when you pick “Temp/Humidity”, a sensor type (DHT22 / DHT11) choice appears — pick what you wired. Even if you pick the wrong one, the board auto-detects the correct type. If you get no readings at all, make sure there's a 10kΩ pull-up resistor between the data line and +3.3V.

5 ما هو منفذ GPIO؟What is a GPIO pin?

GPIO هو رقم الطرف الكهربائي على البوردة الذي وصّلت إليه السلك. عند توصيل المفتاح أو الحسّاس بالبوردة، تكون قد وصّلته إلى رقم منفذ معيّن — اختر نفس الرقم هنا.

A GPIO is the number of the electrical pin on the board that you wired the cable to. When you connect a switch or sensor to the board, you connect it to a specific pin number — choose that same number here.

كيف تعرف رقم المنفذ؟

How do you find the pin number?

  1. انظر إلى البوردة نفسها — الأرقام مطبوعة بجانب الأطراف (مثل D5 أو GPIO14 أو رقم فقط).
  2. الرقم الذي وصّلت إليه سلك المفتاح/الجهاز هو ما تختاره في خانة GPIO.
  3. لو لم تركّب الأسلاك بعد، استخدم قالبًا جاهزًا ودع التطبيق يقترح المنافذ، ثم وصّل أسلاكك على نفس الأرقام التي ظهرت.
  1. Look at the board itself — the numbers are printed next to the pins (like D5, GPIO14, or just a number).
  2. The number you wired the switch/device cable to is what you pick in the GPIO field.
  3. If you haven't wired yet, apply a template and let the app suggest the pins, then wire to the same numbers it shows.
🚫
بعض المنافذ على ESP32/ESP8266 لها وظائف خاصة عند الإقلاع (مثل GPIO0). لو لم تكن خبيرًا، التزم بالمنافذ التي يقترحها القالب لتجنّب أي تعارض.
Some ESP32/ESP8266 pins have special roles at boot (like GPIO0). If you're not an expert, stick to the pins the template suggests to avoid conflicts.
💡
لو استخدمت أحد القوالب الجاهزة فلن تحتاج لمعرفة هذه الأرقام — يختارها التطبيق لك من المنافذ المتاحة. غيّرها فقط إن كانت توصيلتك مختلفة.
If you use a ready template you won't need to know these numbers — the app picks them from the free pins. Only change them if your wiring is different.
🔢
كل منفذ يُستخدم مرّة واحدة فقط. إذا كرّرت نفس الرقم في قناتين سيظهر تنبيه أحمر، ويجب تصحيحه قبل الحفظ.
Each pin is used only once. If you repeat the same number on two channels, a red warning shows and must be fixed before saving.

6 مفتاح الحائط الإضافي (اختياري)Extra wall switch (optional)

لأي قناة من نوع تشغيل/إيقاف يمكنك إضافة مفتاح حائط فيزيائي — أي مفتاح الإضاءة التقليدي على الحائط — فيتحكّم في نفس الخرج جنبًا إلى جنب مع التطبيق. اختر له منفذ GPIO الخاص به في خانة «مفتاح حائط».

For any On/Off channel you can add a physical wall switch — the traditional light switch on the wall — so it controls the same output alongside the app. Give it its own GPIO pin in the “Wall switch” field.

7 تبويب «الإعدادات» (متقدّم)The “Settings” tab (advanced)

هذه الخيارات تضبط طريقة عمل المفاتيح والريليه حسب تركيبتك الكهربائية. اتركها كما هي إن لم تكن متأكدًا — القيم الافتراضية تناسب معظم اللوحات.

These options tune how the switches and relays behave for your wiring. Leave them as-is if unsure — the defaults suit most boards.

الإعدادالوظيفةافتراضي
اسم شبكة الإعداداسم نقطة الواي فاي التي تنشئها الوحدة عند الإعدادUNIT
وضع المفاتيحعادي / ثلاثي (تتبّع الحالة الحقيقية) / ضغط (زر لحظي)عادي
معالجة المفاتيحاستطلاع (ثابت، موصى به) / مقاطعات (أسرع)استطلاع
توصيل المفاتيحرفع (Pull-up) / خفض (Pull-down)رفع
وضع المرحّلاتفعّال-مرتفع / فعّال-منخفضفعّال-مرتفع
سلوك مؤشّر الواي فايالحالة (يضيء حسب الاتصال) / صامت (مطفأ)الحالة
توصيل مؤشّرات LEDفعّال-مرتفع / فعّال-منخفضفعّال-مرتفع
توصيل زر الإعدادرفع / خفضرفع
SettingWhat it doesDefault
Setup network nameName of the Wi-Fi access point the unit creates during setupUNIT
Switch modeNormal / three-way (follow real state) / push (momentary)Normal
Switch handlingPolling (stable, recommended) / interrupts (faster)Polling
Switch wiringPull-up / pull-downPull-up
Relay modeActive-high / active-lowActive-high
Wi-Fi LED behaviourStatus (lights by connection) / silent (off)Status
LED wiringActive-high / active-lowActive-high
Setup-button wiringPull-up / pull-downPull-up
🔧
لو المفاتيح الخارجية لا تعمل صحيحًا: جرّب تغيير وضع المفاتيح أو نوع التوصيل (رفع/خفض). ولو الريليه يعمل بشكل معكوس: غيّر وضع المرحّلات.
If external switches don't work right: try changing the switch mode or the wiring type (pull-up / pull-down). If a relay works inverted: flip the relay mode.

8 تبويب «العتاد» (متقدّم)The “Hardware” tab (advanced)

هنا تحدّد منافذ الأزرار والمؤشّرات والمستقبِلات على البوردة:Here you set the pins for buttons, indicators and receivers on the board:

العنصرالوظيفة
المشروعاسم وصفي للوحة (مثلًا «غرفة المعيشة»)
زر الإعدادمنفذ زر الدخول لوضع الإعداد
مؤشّر حالة الواي فايلمبة تبيّن حالة الاتصال
مؤشّر الإعداد / السحابةلمبات حالة إضافية (اختياري)
مستقبل RF 433 ميجاهرتزلاستقبال الريموتات والحسّاسات اللاسلكية
مستقبل الأشعّة (IR)لاستقبال أوامر ريموت الأشعّة
ItemWhat it's for
ProjectA descriptive name for the board (e.g. “Living room”)
Setup buttonPin for the button that enters setup mode
Wi-Fi status LEDAn LED that shows connection state
Setup / cloud LEDExtra status LEDs (optional)
433MHz RF receiverFor receiving remotes and wireless sensors
Infrared (IR) receiverFor receiving IR remote commands
📡
حدّد منافذ RF أو IR فقط إذا كانت بوردتك تحتوي على هذه المستقبِلات وتريد استخدام الريموتات.
Only set the RF or IR pins if your board actually has those receivers and you want to use remotes.

9 زر الإعداد ومؤشّرات LEDSetup button & LED indicators

الإجراء على زر الإعدادالنتيجة
ضغطة سريعةإعادة تشغيل الوحدة
استمرار الضغط 3 ثوانٍالدخول لوضع إعداد الواي فاي (مع الحفاظ على التعريفات)
Setup-button actionResult
Quick pressRestart the unit
Hold 3 secondsEnter Wi-Fi setup mode (keeps the definitions)
💡
الزر لا يمسح تعريفات البوردة أبدًا. لتغيير ملف التعريف يجب إعادة رفع السوفت وير على البوردة من جديد.
The button never erases the board's definitions. To change the profile you must re-flash the board.
المؤشّرالمعنى
مؤشّر الواي فاي — وميضيبحث عن الشبكة
مؤشّر الواي فاي — ثابتمتّصل
مؤشّر الإعداد/السحابة — وميضفي وضع الإعداد
مؤشّر الإعداد/السحابة — ثابتمتّصل بالخدمة
IndicatorMeaning
Wi-Fi LED — blinkingSearching for the network
Wi-Fi LED — steadyConnected
Setup/cloud LED — blinkingIn setup mode
Setup/cloud LED — steadyConnected to the service

10 الحفظ والقفلSave & lock

  1. راجع شريط الملخّص بالأعلى — يبيّن عدد القنوات وأي تعارض في المنافذ.
  2. تأكّد من عدم وجود تنبيه أحمر (منفذ مكرّر، أو RGB/ستارة ناقصة منافذ).
  3. اضغط إنشاء ملف التعريف بالأسفل.
  4. تُرسَل التعريفات إلى البوردة وتظهر القنوات في التطبيق فورًا. ✅
  1. Review the summary bar at the top — it shows the channel count and any pin conflicts.
  2. Make sure there's no red warning (a duplicate pin, or an RGB/curtain missing pins).
  3. Tap Create profile at the bottom.
  4. The definitions are sent to the board and the channels appear in the app instantly. ✅
🔒
يُكتب ملف التعريف مرة واحدة ويُقفل. لتغييره لاحقًا يجب إعادة رفع السوفت وير على البوردة (مسح وإعادة برمجة). تأكّد من صحّة الإعداد قبل الحفظ.
The profile is written once and locked. To change it later you must re-flash the board (erase and reprogram). Make sure the setup is right before saving.

? حلّ المشكلاتTroubleshooting

تنبيه «منفذ GPIO مستخدم أكثر من مرة»؟

اخترت نفس رقم المنفذ في قناتين. غيّر إحداهما إلى رقم آخر متاح حتى يختفي التنبيه الأحمر.

«القناة تحتاج منافذ R وG وB»؟

إضاءة RGB تتطلّب ثلاثة منافذ. أكمل تحديد المنافذ الثلاثة (G وB بعد المنفذ الأساسي).

«الستارة تحتاج منفذي رفع وخفض»؟

حدّد منفذ الرفع ومنفذ الخفض معًا للستارة.

«عيّن نوعًا ومنفذ GPIO لقناة واحدة على الأقل»؟

كل القنوات مضبوطة على «بلا». فعّل قناة واحدة على الأقل بنوع ومنفذ — أو استخدم قالبًا جاهزًا.

أريد تغيير الإعداد بعد الحفظ؟

ملف التعريف مقفول. يجب إعادة رفع السوفت وير على البوردة (مسح الذاكرة + برمجة من جديد) لإعادة الإعداد.

“GPIO pin used more than once” warning?

You picked the same pin number on two channels. Change one to another free number until the red warning clears.

“Channel needs R, G and B pins”?

RGB lighting needs three pins. Finish setting all three (G and B after the main pin).

“Curtain needs up and down pins”?

Set both the up pin and the down pin for the curtain.

“Set a type and GPIO for at least one channel”?

All channels are on “None”. Enable at least one with a type and pin — or use a ready template.

I want to change the setup after saving?

The profile is locked. You must re-flash the board (erase memory + reprogram) to set it up again.

محتاج مساعدة أكثر؟Need more help? تواصل مع الدعم الفني ومعك اسم/سيريال الوحدة من صفحة تفاصيل الجهاز.Contact support with the unit's name / serial from the device details page.
العودة إلى الدليلBack to the guide