# AwoX / Eglo BLE Lights

**URL:** <https://community.homey.app/t/awox-eglo-ble-lights/89743>\
**Category:** Developers\
**Tags:** app, bluetooth-le-ble, homey-pro\
**Created:** [September 19, 2023, 1:46pm UTC](https://community.homey.app/t/awox-eglo-ble-lights/89743 "2023-09-19T13:46:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![redi78](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/redi78/32/63105_2.png) [@redi78](https://community.homey.app/u/redi78)\
**Post date:** [September 19, 2023, 1:46pm UTC](https://community.homey.app/t/awox-eglo-ble-lights/89743/1 "2023-09-19T13:46:19Z")

</div>

Hi,

i have one AwoX/Eglo Light (BLE) at home and i think there is no BLE App for that brand. Are someone here who wants to help develop a Homey Pro app for that?

[https://github.com/redi78/homey\_eglo\_awox\_ble/tree/main](https://github.com/redi78/homey_eglo_awox_ble/tree/main)

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [September 19, 2023, 8:12pm UTC](https://community.homey.app/t/awox-eglo-ble-lights/89743/3 "2023-09-19T20:12:24Z")

</div>

What device did you write the code for? Do you have a link to the BLE Light?

---

<div class="post-metadata">

**Author:** ![redi78](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/redi78/32/63105_2.png) [@redi78](https://community.homey.app/u/redi78)\
**Post date:** [September 20, 2023, 4:08am UTC](https://community.homey.app/t/awox-eglo-ble-lights/89743/4 "2023-09-20T04:08:38Z")

</div>

Hi,

it is this Lamp: [EGLO ROMAO-C LED](https://www.eglo.com/at/deckenleuchte-romao-c-98668.html)

When i actually run the app Code i get follow error:  
BlePeripherlal not defined.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [September 20, 2023, 4:36am UTC](https://community.homey.app/t/awox-eglo-ble-lights/89743/5 "2023-09-20T04:36:32Z")

</div>

Could you pair it in the AwoX App?

Is this also a Zigbee device?

How did you develop this code?

---

<div class="post-metadata">

**Author:** ![redi78](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/redi78/32/63105_2.png) [@redi78](https://community.homey.app/u/redi78)\
**Post date:** [September 20, 2023, 6:24am UTC](https://community.homey.app/t/awox-eglo-ble-lights/89743/6 "2023-09-20T06:24:57Z")

</div>

Hi Dijker,

no - because Homey AwoX App only supports Zigbee, as far i know.  
And this Light is BLE only.

I found that old code and thought we could update it:

> **[GitHub - ekouters/com.awox.smartlight: Adds support for AwoX SmartLIGHT...](https://github.com/ekouters/com.awox.smartlight)**
>
> Adds support for AwoX SmartLIGHT devices to the Athom Homey - GitHub - ekouters/com.awox.smartlight: Adds support for AwoX SmartLIGHT devices to the Athom Homey

---

<div class="post-metadata">

**Author:** ![redi78](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/redi78/32/63105_2.png) [@redi78](https://community.homey.app/u/redi78)\
**Post date:** [September 21, 2023, 6:23am UTC](https://community.homey.app/t/awox-eglo-ble-lights/89743/7 "2023-09-21T06:23:19Z")

</div>

Hi,

mhh is there something wrong, because i get the error “BlePeripheral undefinded”:

```auto
class Eglo_Awox_SmartlightDriver extends Homey.Driver {

    onInit() {
        this.log('Eglo_Awox_SmartlightDriver has been inited');
    }

    async onPairListDevices(data) {
        try {
            this.log('Pair listing of devices started');
            const deviceList = await this.discoverLights();
            this.log('Pair listing of devices completed');
            return deviceList;
        } catch (error) {
            this.log('Error during pair listing of devices:', error);
            throw error;
        }
    }

    async discoverLights() {
        try {
            this.log('Device discovery started');
            // discover all peripherals that have AwoX Company Identifier (0x0160)
            const bleAdvertisements = await Homey.ManagerBLE.discover();

            const eglo_awox_Lights = [];

            for (let i = 0; i < bleAdvertisements.length; i++) {
                const manufacturerID = bleAdvertisements[i].manufacturerData.readInt16LE();
                this.log("Found a device with manufacturer ID:", manufacturerID);

                if (manufacturerID == 0x0160) {
                    this.log("Connecting to an Eglo_AwoX device...");
                    // Connect to the BLE device
                    const blePeripheral = await bleAdvertisements[i].connect();
                    this.log("Connected to an Eglo_AwoX device...");

                    await sleep(100);

                    // Discover everything after connecting to the BLE device
                    await blePeripheral.discoverAllServicesAndCharacteristics();
                    this.log("Discovered an Eglo_AwoX device...");

                    // Get device info
                    const device_name = await blePeripheral.read(BLE_SERVICES_GENERIC_ACCESS, BLE_CHARACTERISTICS_DEVICE_NAME);
                    const appearance = await blePeripheral.read(BLE_SERVICES_GENERIC_ACCESS, BLE_CHARACTERISTICS_APPEARANCE);
                    const model_number = await blePeripheral.read(BLE_SERVICES_DEVICE_INFORMATION, BLE_CHARACTERISTICS_MODEL_NUMBER_STRING);
                    const firmware_version = await blePeripheral.read(BLE_SERVICES_DEVICE_INFORMATION, BLE_CHARACTERISTICS_FIRMWARE_REVISION_STRING);
                    const hardware_revision = await blePeripheral.read(BLE_SERVICES_DEVICE_INFORMATION, BLE_CHARACTERISTICS_HARDWARE_REVISION_STRING);
                    const manufacturer_name = await blePeripheral.read(BLE_SERVICES_DEVICE_INFORMATION, BLE_CHARACTERISTICS_MANUFACTURER_Name_STRING);

                    // Convert Buffer to human-readable string
                    const deviceNameStr = device_name.toString('utf-8').replace(/\0/g, '');
                    const appearanceStr = appearance.toString('utf-8').replace(/\0/g, '');
                    const firmwareVersionStr = firmware_version.toString('utf-8').replace(/\0/g, '');
                    const manufacturerNameStr = manufacturer_name.toString('utf-8').replace(/\0/g, '');
                    const modelNumberStr = model_number.toString('utf-8').replace(/\0/g, '');
                    const hardwareRevisionStr = hardware_revision.toString('utf-8').replace(/\0/g, '');

                    const device = {
                        name: manufacturerNameStr + " " + deviceNameStr + " (" + bleAdvertisements[i].uuid + ")",
                        data: {
                            uuid: bleAdvertisements[i].uuid,
                            firmware_version: firmwareVersionStr,
                            manufacturer_name: manufacturerNameStr,
                            model_number: modelNumberStr,
                            hardware_revision: hardwareRevisionStr,
                        },
                    };
                    eglo_awox_Lights.push(device);

                    await blePeripheral.disconnect();
                }
            }
            return eglo_awox_Lights;
        } catch (error) {
            await blePeripheral.disconnect();
            throw error;
        }
    }

}

```

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [August 15, 2024, 8:53am UTC](https://community.homey.app/t/awox-eglo-ble-lights/89743/8 "2024-08-15T08:53:31Z")

</div>

Archived on August 15, 2024, 8:53am UTC


