Esp32 turn on led

Hello,
I’m trying to turn on a led with a esp32 on the new homey pro 2023. i now have my esp32 connected to my Homey with Homeyduino. But now i am searching for a script to turn on and turn off the led but i cant find it and everything i found is not working. is their maybe something wrong with te connection to the Homey.

To me, the ESPhome app is easier to use. You might want to check it out.

1 Like

alright do you have a script for that?

Did you read the fine manual?

I am looking at that now but i dont know how to connect it to my homey

The ESPHome app for Homey was already linked to.

I have that app already but i cant get it connected to my homey

You have to be a bit more forthcoming if you want help, nobody here has any idea why you can’t get it working if you don’t provide more information, like the YAML file that you’re using for your ESPHome project, if you’re getting any errors, etc.

Most app have its own app topic here, often with manuals, howto, FAQ.
These links can be found at the app page at homey.app store

While I checked it already,
here you go

This app developer wrote an outstanding fine manual, but take your time to read it I’d like to say.

peter thank you i took a look at it now but i dont have the software i think to get the esp connected. what sofware should i get?

You’re welcome, Niels.

Robert linked to it already, but here you go

i have downloaded the python and installed the esphome but do you need the home assistant app and is it possible to connect a canbus this way or not.

No, you need the ESPHome app for Homey.

I feel that most of your questions can easily be answered by just doing a basic search with Google or on the ESPHome website.

sorry but i am still new and i trie to figure it out. I have never heard of a yaml file and a command promt and i have no idea how to get a code on a esp32 using that. I have configured the esphome wizard and got it connected to the wifi. and found it on the esphome app but when i leave the esphome wizard on homey it is gone.

try*

Perhaps ask a specific question in the ESPHome app thread.

Hello again,

i now have dowloaded esphome and it all works with my homey. I now try to turn on a led with a canbus signal i have search on the esphome site and i can read a massage and send one. but i cant figure out how to read a massage and then toggle the led everytime i read the massage this is my yaml script

esphome:
  name: led

esp32:
  board: nodemcu-32s
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "0641312666"

ota:
  password: "0641312666"

wifi:
  ssid: "SewerRobotics"
  password: "0641312666"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Led Fallback Hotspot"
    password: "UHa6BfRFXMQy"

captive_portal:
    


canbus:
  - platform: esp32_can
    tx_pin: GPIO23
    rx_pin: GPIO22
    can_id: 4
    bit_rate: 125kbps
    on_frame:
    - can_id: 43 # the received can_id
      then:    
        - if:
            condition:
              lambda: 'return (x.size() > 0) ? x[0] == 0x11 : false;'
            then:
              light.toggle: led1







i2c:
  sda: GPIO26
  scl: GPIO27



# Example configuration entry
sensor:
  - platform: ultrasonic
    trigger_pin: GPIO5  # Verbind met de Trig-pin van de HC-SR04
    echo_pin: GPIO4  
    name: "Ultrasonic Sensor"
    update_interval: 2s

  - platform: dht
    pin: GPIO25
    temperature:
      name: "Living Room Temperature"
    humidity:
      name: "Living Room Humidity"
    update_interval: 60s





output:
  - platform: gpio
    pin: GPIO12
    id: my_output
  - platform: gpio
    pin: GPIO14
    id: my_output1


light:
  - platform: binary
    name: "My Monochromatic Light"
    output: my_output
    id: led1
  
  
  - platform: binary
    name: "My Monochromatic Light1"
    output: my_output1

do anyone see what i am doing wrong?

1 Like

i have find it i was sending the wrong id with the canbus signal

1 Like