Use ESP32 Bluetooth Proxy for TSL2591 Light Sensor

Hi,

Is it possible to use a ESP32 or D1 mini board to run a Bluetooth proxy and run my TSL2591 light sensor.

If yes, could anyone help with the instructions and yaml code for this or point me to some online resource that can help with this.

Thank you very much

Yes, it is, but what are you asking for, exactly?
Ready-made ESPHome yaml?

Pointers are:

I need the wiring instructions to connect the TSL2591 to the ESP32 board and the yaml code to run the Bluetooth proxy and light sensor

There are many ESP32 boards. Check the data sheet of the one you have. For the ESP32, the default pins for the I2C are SDA (GPIO21) and SCL (GPIO22).

substitutions:
name: esphome-web-49b784
friendly_name: ESPHome Web 49b784

esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: false
project:
name: esphome.web
version: ‘1.0’

esp32:
board: esp32dev
framework:
type: arduino

Enable logging

logger:

Enable Home Assistant API

api:

Allow Over-The-Air updates

ota:

  • platform: esphome

Allow provisioning Wi-Fi via serial

improv_serial:

wifi:
ssid: “”
password: “”

In combination with the ap this allows the user

to provision wifi credentials to the device via WiFi AP.

captive_portal:

dashboard_import:
package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
import_full_config: true

Sets up Bluetooth LE (Only on ESP32) to allow the user

to provision wifi credentials to the device.

esp32_improv:
authorizer: none

To have a “next url” for improv serial

web_server:

Example configuration entry

i2c:
sda: GPIO21
scl: GPIO22
scan: true
id: bus_a
sensor:

  • platform: tsl2591
    name: “This little light of mine”
    id: “my_tls2591”
    address: 0x29
    update_interval: 60s
    gain: auto
    device_factor: 53
    glass_attenuation_factor: 14.4
    visible:
    name: “TSL2591 visible light”

Could someone help me with the yaml. I have no clue!

Start by making your code readable

f6be36681e0da431418ec7781fb6c62712941803

What’s your goal, here?

  • You don’t seem to have any experience in ESPHome
  • Nor in basic electronics (wiring an i²c device to an ESP is literately linking 4 dupont wires between the 2)
  • The fact that you are asking for ready-made templates for both wiring and yaml for both makes me think you are not eager to read the (ample) existing documentation and tutorials so as to learn and understand the above, or are you?

Bottom-line: Why are you doing DIY rather than using off-the-shelf solution to your problem, whatever it is?
Are you actually looking for tutorials?

Yes you are absolutely right. I don’t have any knowledge of electronics or yaml.

But for the last 8-12 months i have managed to put together and make work two sensors that i needed -

  1. TSL2591 connected to a D1 mini and
  2. A mm wave sensor powered by a Esp32 board which runs as a Bluetooth proxy.

These were housed in a single casing which i 3d printed (no knowledge in this either)

Both of the above were done by following instructions on various pages or videos on YouTube.

However the problem with the above is that i need to have two micro usb cables running to power the Esp32 and the d1 mini board. I have been searching the internet for a solution to combine both sensors to run on a single board.

My mm wave sensor only needs a 3v and a G pin, but cannot transmit over distances above ~5 feet so i need a Bluetooth proxy for range.

I’m happy to go through the tutorials

Thanks

Hi,

Did some more digging around and found a solution. Did some preliminary testing and it seemed to work.

Thanks for your help.

Would have been nice to have the context in the first post :wink:

1 Like