fsaris / EspHome-AwoX-BLE-mesh-hub

Custom component for ESPhome that can act as a AwoX BLE mesh hub (Telink mesh)
50 stars 14 forks source link

How to connect EGLO Giron-C? #99

Closed racinmat closed 2 weeks ago

racinmat commented 2 weeks ago

Hi, I have used this component to flash my esp32 chip (specifically the m5stack c3), and I can see chip connecting to wifi and publishing the messages over MQTT. I have the EGLO Giron-C light, it is powered, I have paired it with the AwoX app and it works, where the connection works, but the devices are not added correctly to the Home Assistant after the discovery messages are received. I have installed Home Assistant few days ago, so it's quite new: image

and I have flashed the chip yesterday, so it should use the newest versions too. Here is the output of the esphome logs <name of my yaml>:

``` [21:31:43]SPIWP:0xee [21:31:43]mode:DIO, clock div:1 [21:31:43]load:0x3fcd5810,len:0x1684 [21:31:43]load:0x403cc710,len:0x91c [21:31:43]load:0x403ce710,len:0x2d78 [21:31:43]entry 0x403cc710 [21:31:43]I (35) boot: ESP-IDF 4.4.7 2nd stage bootloader [21:31:43]I (35) boot: compile time 17:02:49 [21:31:43]I (35) boot: chip revision: v0.3 [21:31:43]I (37) boot.esp32c3: SPI Speed : 80MHz [21:31:43]I (42) boot.esp32c3: SPI Mode : DIO [21:31:43]I (46) boot.esp32c3: SPI Flash Size : 4MB [21:31:43]I (51) boot: Enabling RNG early entropy source... [21:31:43]I (57) boot: Partition Table: [21:31:43]I (60) boot: ## Label Usage Type ST Offset Length [21:31:43]I (67) boot: 0 otadata OTA data 01 00 00009000 00002000 [21:31:43]I (75) boot: 1 phy_init RF data 01 01 0000b000 00001000 [21:31:43]I (82) boot: 2 app0 OTA app 00 10 00010000 001c0000 [21:31:43]I (90) boot: 3 app1 OTA app 00 11 001d0000 001c0000 [21:31:43]I (97) boot: 4 nvs WiFi data 01 02 00390000 0006d000 [21:31:43]I (105) boot: End of partition table [21:31:43]I (109) esp_image: segment 0: paddr=00010020 vaddr=3c140020 size=4d230h (315952) map [21:31:43]I (165) esp_image: segment 1: paddr=0005d258 vaddr=3fc93200 size=02dc0h ( 11712) load [21:31:43]I (167) esp_image: segment 2: paddr=00060020 vaddr=42000020 size=136af8h (1272568) map [21:31:43]I (362) esp_image: segment 3: paddr=00196b20 vaddr=3fc95fc0 size=00240h ( 576) load [21:31:43]I (362) esp_image: segment 4: paddr=00196d68 vaddr=40380000 size=13134h ( 78132) load [21:31:43]I (387) boot: Loaded app from partition at offset 0x10000 [21:31:43]I (387) boot: Disabling RNG early entropy source... [21:31:43]I (388) cpu_start: Unicore app [21:31:43]I (391) cpu_start: Pro cpu up. [21:31:43]I (407) cpu_start: Pro cpu start user code [21:31:43]I (407) cpu_start: cpu freq: 160000000 [21:31:43]I (407) cpu_start: Application information: [21:31:43]I (409) cpu_start: Project name: awox-ble-mesh-hub [21:31:43]I (415) cpu_start: App version: 2024.8.1 [21:31:43]I (420) cpu_start: Compile time: Sep 1 2024 17:01:19 [21:31:43]I (426) cpu_start: ELF file SHA256: 9fe87d0fef9b1b89... [21:31:43]I (432) cpu_start: ESP-IDF: 4.4.7 [21:31:43]I (437) cpu_start: Min chip rev: v0.3 [21:31:43]I (442) cpu_start: Max chip rev: v1.99 [21:31:43]I (447) cpu_start: Chip rev: v0.3 [21:31:43]I (451) heap_init: Initializing. RAM available for dynamic allocation: [21:31:43]I (459) heap_init: At 3FC9F920 len 0003CDF0 (243 KiB): DRAM [21:31:43]I (465) heap_init: At 3FCDC710 len 00002950 (10 KiB): STACK/DRAM [21:31:43]I (472) heap_init: At 50000020 len 00001FE0 (7 KiB): RTCRAM [21:31:43]I (480) sleep: Configure to isolate all GPIO pins in sleep state [21:31:43]I (485) sleep: Enable automatic switching of GPIO sleep configuration ```

I don't see any information about being connected to the wifi nor mqtt, although I can see the discovery messages being sent and I have the highest verbosity turned on. This is my yaml file:

```yaml # taken from https://github.com/fsaris/EspHome-AwoX-BLE-mesh-hub/blob/main/awox-ble-mesh-hub.yaml and adjusted esphome: name: awox-ble-mesh-hub friendly_name: "AwoX BLE mesh hub" platformio_options: board_build.flash_mode: dio esp32: # Match this with the board your using board: esp32-c3-devkitm-1 variant: ESP32C3 framework: # Be sure to "Clean Build Files" when switching framework type: esp-idf status_led: # Match this with the board your using pin: GPIO2 # Enable logging logger: level: VERY_VERBOSE mqtt: broker: !secret mqtt_host username: !secret mqtt_user password: !secret mqtt_password ota: password: !secret ota_password platform: esphome wifi: ssid: !secret wifi_ssid password: !secret wifi_password external_components: - source: type: git url: https://github.com/fsaris/EspHome-AwoX-BLE-mesh-hub ref: main esp32_ble_tracker: scan_parameters: active: false awox_mesh: mesh_name: !secret mesh_name mesh_password: !secret mesh_password device_info: # Example device type, see device info in HomeAssistant or MQTT message to find the 'product_id' - product_id: 0x32 device_type: RGB manufacturer: EGLO name: Spot 120 model: EGLOSpot 120/w icon: mdi:wall-sconce-flat ```

And when I look at the added entities in the MQTT inside Home Assistant, I see: image

but no device, only these few entities, which appear to be offline.

And I don't see the Giron-C in the list of known devices. In the AwoX app, the model has name: ECeil_G30, version: 2.2.17, hardware: 4.30. Can I somehow find the product_id from the discovery messages? When I tried to listed on #, I got these messages:

```jsonl { "ip": "192.168.1.239", "name": "awox-ble-mesh-hub", "friendly_name": "AwoX BLE mesh hub", "version": "2024.8.1", "mac": "686725b2d1e8", "platform": "ESP32", "board": "esp32-c3-devkitm-1", "network": "wifi" } { "name": "Connection 1 connected", "uniq_id": "awox-connection-1-connected", "ent_cat": "diagnostic", "ic": "mdi:connection", "avty_t": "awox-ble-mesh-hub/status", "stat_t": "awox-ble-mesh-hub/connection_status", "pl_on": true, "pl_off": false, "val_tpl": "{{ value_json.connection_1.connected }}", "dev": { "ids": "686725b2d1e8" } } { "name": "Connection 0 connected", "uniq_id": "awox-connection-0-connected", "ent_cat": "diagnostic", "ic": "mdi:connection", "avty_t": "awox-ble-mesh-hub/status", "stat_t": "awox-ble-mesh-hub/connection_status", "pl_on": true, "pl_off": false, "val_tpl": "{{ value_json.connection_0.connected }}", "dev": { "ids": "686725b2d1e8" } } { "name": "Connection 1 mac address", "uniq_id": "awox-connection-1-mac", "ent_cat": "diagnostic", "ic": "mdi:information", "en": false, "stat_t": "awox-ble-mesh-hub/connection_status", "avty_t": "awox-ble-mesh-hub/status", "val_tpl": "{{ value_json.connection_1.mac }}", "dev": { "ids": "686725b2d1e8" } } { "name": "Connection 1 Mesh ID", "uniq_id": "awox-connection-1-mesh-id", "ent_cat": "diagnostic", "ic": "mdi:vector-point-select", "en": false, "stat_t": "awox-ble-mesh-hub/connection_status", "avty_t": "awox-ble-mesh-hub/status", "val_tpl": "{{ value_json.connection_1.mesh_id }}", "dev": { "ids": "686725b2d1e8" } } { "name": "Connection 1 Mesh ID's", "uniq_id": "awox-connection-1-mesh-ids", "ent_cat": "diagnostic", "ic": "mdi:vector-polyline", "en": false, "stat_t": "awox-ble-mesh-hub/connection_status", "avty_t": "awox-ble-mesh-hub/status", "val_tpl": "{{ value_json.connection_1.mesh_ids }}", "dev": { "ids": "686725b2d1e8" } } { "name": "Connection 1 devices", "uniq_id": "awox-connection-1-devices", "ent_cat": "diagnostic", "ic": "mdi:counter", "en": false, "stat_t": "awox-ble-mesh-hub/connection_status", "avty_t": "awox-ble-mesh-hub/status", "val_tpl": "{{ value_json.connection_1.devices }}", "dev": { "ids": "686725b2d1e8" } } { "name": "Connection 0 mac address", "uniq_id": "awox-connection-0-mac", "ent_cat": "diagnostic", "ic": "mdi:information", "en": false, "stat_t": "awox-ble-mesh-hub/connection_status", "avty_t": "awox-ble-mesh-hub/status", "val_tpl": "{{ value_json.connection_0.mac }}", "dev": { "ids": "686725b2d1e8" } } { "name": "Connection 0 Mesh ID", "uniq_id": "awox-connection-0-mesh-id", "ent_cat": "diagnostic", "ic": "mdi:vector-point-select", "en": false, "stat_t": "awox-ble-mesh-hub/connection_status", "avty_t": "awox-ble-mesh-hub/status", "val_tpl": "{{ value_json.connection_0.mesh_id }}", "dev": { "ids": "686725b2d1e8" } } { "name": "Connection 0 Mesh ID's", "uniq_id": "awox-connection-0-mesh-ids", "ent_cat": "diagnostic", "ic": "mdi:vector-polyline", "en": false, "stat_t": "awox-ble-mesh-hub/connection_status", "avty_t": "awox-ble-mesh-hub/status", "val_tpl": "{{ value_json.connection_0.mesh_ids }}", "dev": { "ids": "686725b2d1e8" } } { "name": "Connection 0 devices", "uniq_id": "awox-connection-0-devices", "ent_cat": "diagnostic", "ic": "mdi:counter", "en": false, "stat_t": "awox-ble-mesh-hub/connection_status", "avty_t": "awox-ble-mesh-hub/status", "val_tpl": "{{ value_json.connection_0.devices }}", "dev": { "ids": "686725b2d1e8" } } ```
racinmat commented 2 weeks ago

I flashed the esp32 with new yaml with the device_info commented out:

awox_mesh:
  mesh_name: !secret mesh_name
  mesh_password: !secret mesh_password

#  device_info:
#    # Example device type, see device info in HomeAssistant or MQTT message to find the 'product_id'
#    - product_id: 0x32
#      device_type: RGB
#      manufacturer: EGLO
#      name: Spot 120
#      model: EGLOSpot 120/w
#      icon: mdi:wall-sconce-flat

(the rest of the yaml is the same), and now I see there a new device! image so I guess this is my light, right? image

But the logs are still not showing anything about discovering AwoX devices, even with the highest verbosity, why?

racinmat commented 2 weeks ago

So, I made it work. I removed the 2 devices from MQTT, then filled the awox_mesh.device_info section in the yaml correctly, flashed the esp32 device again, and then I let it run for over 10 minutes, and after that it seems it correctly sent the discovery messages and HA registered the devices again, now with the correct name and everything.