This project transforms a standard Bluetooth LED strip into a Wi-Fi controllable smart light, accessible from anywhere in the world. It's an end-to-end IoT solution utilizing a Linux server, the n8n automation platform, and a modern Android application.
This repository demonstrates how to extend the capabilities of a local Bluetooth device using web technologies, turning it into a true smart-home component.
| Main Screen | Settings | Dark Theme |
|---|---|---|
![]() |
![]() |
![]() |
- Remote Control: Control your LED strip even when you're outside of Bluetooth range, from anywhere with an internet connection.
- Modern & Stateless UI: A sleek, minimalist, and user-friendly interface built with Jetpack Compose that makes no assumptions about the LED's current state.
- Fully Customizable: Easily configure Webhook URLs and the name of the controlled LED from within the app's settings.
- Custom Icon & Design: An aesthetic interface with a custom icon, built with modern design principles in mind.
- Secure & Automated: A robust and flexible automation backend powered by n8n workflows.
- Background Service: A reliable API server running continuously as a
systemdservice on Linux.
This project consists of 3 main components:
- Language: Python 3
- Libraries:
Flask(Web server),Bleak(Asynchronous Bluetooth LE client) - Service Management:
systemdfor continuous background operation and auto-start on boot. - Role: To receive HTTP requests and translate them into Bluetooth commands for the LED strip.
- Trigger: A
Webhooknode to securely receive requests from the internet. - Action: An
HTTP Requestnode to send commands to the local Linux API server. - Role: To act as a secure bridge between the mobile application and the local server.
- Language: Kotlin
- UI: Jetpack Compose (Declarative UI)
- Architecture: MVVM (Model-View-ViewModel)
- Asynchronous Operations: Kotlin Coroutines & Flow
- Networking: Ktor Client
- Data Persistence: Jetpack DataStore Preferences
- Navigation: Navigation Compose
- Role: To provide a polished user interface and trigger the n8n webhooks.
To run this project with your own hardware:
-
Linux Server:
- Copy the
api_server.pyscript to a Linux machine (e.g., a Raspberry Pi). - Install the required Python libraries:
pip install flask bleak. - Update the
LED_MAC_ADRESIandYAZMA_UUIDvariables in the script to match your LED strip. - Set up and enable the
led-api.servicefile withsystemdto start the service.
- Copy the
-
n8n Workflow:
- Create a new n8n workflow.
- Add two
Webhooknodes, one for.../onand one for.../off. (Note: Ensure the HTTP Method for the webhooks is set to GET.) - Connect each webhook to an
HTTP Requestnode that sends a request to the appropriate endpoint on your Linux API server (e.g.,http://[SERVER_IP]:18331/acor/kapat). - Take note of the production Webhook URLs.
-
Android Application:
- Open the project in Android Studio.
- Build and install the app on your phone (preferably by signing it with your own keystore).
- Navigate to the in-app settings screen, enter the Webhook URLs from n8n and a custom name for your LED, then save.
You're all set!
This project is licensed under the MIT License. See the LICENSE file for details.
Bu proje, standart bir Bluetooth şerit LED'i, bir Linux sunucusu, n8n otomasyon platformu ve modern bir Android uygulaması kullanarak dünyanın her yerinden kontrol edilebilir bir Wi-Fi destekli akıllı LED'e dönüştürür.
Bu repozitori, yerel bir Bluetooth cihazının yeteneklerini web teknolojileriyle nasıl genişletebileceğimizi gösteren baştan sona bir IoT (Nesnelerin İnterneti) çözümüdür.
| Ana Ekran | Ayarlar | Karanlık Tema |
|---|---|---|
![]() |
![]() |
![]() |
- Uzaktan Kontrol: Bluetooth menzili dışında olsanız bile LED'inizi internet olan her yerden kontrol edin.
- Modern ve Durumsuz Arayüz: Jetpack Compose ile oluşturulmuş, LED'in durumu hakkında varsayımda bulunmayan, sadece eylem odaklı şık bir arayüz.
- Tamamen Kişiselleştirilebilir: Webhook URL'lerini ve kontrol edilen LED'in ismini uygulama içinden kolayca ayarlayabilme.
- Özel İkon ve Tasarım: Modern tasarım prensipleriyle oluşturulmuş, özel ikona sahip estetik bir arayüz.
- Güvenli ve Otomatize: n8n workflow'ları ile güvenli ve esnek bir otomasyon altyapısı.
- Arka Plan Servisi: Linux üzerinde
systemdile çalışan, sürekli aktif ve güvenilir bir API sunucusu.
Bu proje 3 ana bileşenden oluşur:
- Dil: Python 3
- Kütüphaneler:
Flask(Web sunucusu),Bleak(Asynchron Bluetooth LE istemcisi) - Servis Yönetimi:
systemdile arka planda sürekli çalışma ve otomatik başlama. - Görevi: Gelen web isteklerini (HTTP) alıp Bluetooth komutlarına çevirerek LED'e göndermek.
- Tetikleyici:
Webhooknode'u ile internetten gelen güvenli istekleri yakalar. - Eylem:
HTTP Requestnode'u ile yerel ağdaki Linux API sunucusuna komut gönderir. - Görevi: Mobil uygulama ile yerel sunucu arasında güvenli bir köprü oluşturmak.
- Dil: Kotlin
- Arayüz: Jetpack Compose (Deklaratif UI)
- Mimarî: MVVM (Model-View-ViewModel)
- Asenkron İşlemler: Kotlin Coroutines & Flow
- Ağ: Ktor Client
- Veri Saklama: Jetpack DataStore Preferences
- Navigasyon: Navigation Compose
- Görevi: Kullanıcıya şık bir arayüz sunmak ve n8n webhook'larını tetiklemek.
Bu projeyi kendi donanımınızla çalıştırmak için:
-
Linux Sunucusu:
api_server.pyscript'ini bir Linux makinesine (örn: Raspberry Pi) kopyalayın.- Gerekli Python kütüphanelerini kurun:
pip install flask bleak. - Script içindeki
LED_MAC_ADRESIveYAZMA_UUIDdeğişkenlerini kendi LED'inize göre güncelleyin. led-api.servicedosyasınısystemdile kurarak servisi başlatın.
-
n8n Workflow:
- Yeni bir n8n workflow'u oluşturun.
- Biri
.../acdiğeri.../kapatiçin olmak üzere iki adetWebhooknode'u ekleyin. (Not: Webhook node'larının HTTP metodunun GET olduğundan emin olun.) - Her webhook'u, Linux API sunucunuzun ilgili endpoint'ine (
http://[SUNUCU_IP]:18331/acveya/kapat) istek gönderen birHTTP Requestnode'una bağlayın. - Üretim (production) Webhook URL'lerini not alın.
-
Android Uygulaması:
- Projeyi Android Studio ile açın.
- Projeyi kendi imzalama anahtarınızla imzalayıp derleyin ve telefonunuza kurun.
- Uygulama içindeki ayarlar ekranına, n8n'den aldığınız webhook URL'lerini ve LED'inize vermek istediğiniz ismi girin ve kaydedin.
Artık kullanıma hazır!
Bu proje MIT Lisansı altında lisanslanmıştır. Detaylar için LICENSE dosyasına bakınız.





