edwardtfn / TX-Ultimate-Easy

ESPHome based custom firmware for Sonoff TX Ultimate. Easy to setup.
MIT License
8 stars 3 forks source link

BLE support #9

Open edwardtfn opened 1 month ago

edwardtfn commented 1 month ago

Request 7: Ble support?

Suggested by @TeDeVPrime on #2

edwardtfn commented 1 month ago

This one is gonna be challenging. I really wanna use BT on that device, as I believe it's signal may be much better than a NSPanel, however the i2c audio component used for Media Player is only available for Arduino at this moment. I will keep this open as I still wanna investigate it more, but will certainly be out of the initial release.

TeDeVPrime commented 1 month ago

the git i gave you from the other project isn't it based on ESP? the speaker works there as a media player

edwardtfn commented 1 month ago

No, those are all Arduino.

edwardtfn commented 1 month ago

This is what happens with ESP-IDF:

Failed config

light.neopixelbus: [source /config/esphome/packages/edwardtfn/TX-Ultimate-Easy/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml:292]

  This feature is only available with frameworks ['arduino'].
  id: light_full
  name: Light - All
  internal: True
  platform: neopixelbus
  type: GRB
  variant: WS2811
  num_leds: 32
  pin: GPIO13
media_player.i2s_audio: [source /config/esphome/packages/edwardtfn/TX-Ultimate-Easy/ESPHome/TX-Ultimate-Easy-ESPHome_core.yaml:1503]

  This feature is only available with frameworks ['arduino'].
  id: mp_speaker
  name: Speaker
  platform: i2s_audio
  i2s_dout_pin: GPIO15
  i2s_audio_id: if_i2s_audio
  i2s_comm_fmt: lsb
  dac_type: external
  mode: mono
  mute_pin: 
    number: GPIO26
    inverted: True
    allow_other_uses: True
  internal: False

The light I'm pretty confident is just about finding another driver available, but the media_player.i2s_audio will require some review in the component in ESPHome. 😞

Anyhow, I could change the flash size to 8MB and with this I can build including the BLE with no size error, however it is crashing on boot, so I will have to investigate it more.

edwardtfn commented 2 weeks ago

Monitoring #6894 as that could enable the use of Media Player and NeoPixBus with ESP-IDF, making some memory available for BLE.