Heltec WiFi Kit 32 V3 shown as unknown board

i am a beginner with coding
and this is my first try with homeassistant
i wrote a small code for a watersensor in arduino IDE:

#define POWER_PIN  2 // ESP32 pin GPIO2 connected to sensor's VCC pin
#define SIGNAL_PIN 1 // ESP32 pin GPIO1 (ADC0) connected to sensor's signal pin

int value = 0; // variable to store the sensor value

void setup() {
  Serial.begin(9600);
  pinMode(POWER_PIN, OUTPUT);   // configure pin as an OUTPUT
  digitalWrite(POWER_PIN, LOW); // turn the sensor OFF
}

void loop() {
  digitalWrite(POWER_PIN, HIGH);  // turn the sensor ON
  delay(10);                      // wait 10 milliseconds
  value = analogRead(SIGNAL_PIN); // read the analog value from sensor
  digitalWrite(POWER_PIN, LOW);   // turn the sensor OFF

  Serial.print("The water sensor value: ");
  Serial.println(value);

  delay(1000);
}

and it worked as intended
when the sensos comes in contact with water it gives a readout

then withoud changing the wireing i mage a yaml file:

esphome:

  name: esphome-web-830490

  friendly_name: Watersensor

esp32:

  board: heltec_wifi_kit_32_V3

  framework:

    type: arduino

# Enable logging

logger:

# Enable Home Assistant API

api:

  encryption:

    key: "XXX"

ota:

wifi:

  ssid: !secret wifi_ssid

  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails

  ap:

    ssid: "Esphome-Web-830490"

    password: "sn3pbzDwbTyP"

captive_portal:

# Add the water sensor configuration

sensor:

  - platform: adc

    pin: GPIO1  # Change this to match the GPIO pin you're using for the signal pin of the water sensor (e.g., GPIO1)

    name: "Water Sensor"

    update_interval: 1s  # Adjust the update interval as needed

    filters:

      - lambda: |-

          if (x < 10) {

            return 0.0;  // Adjust this threshold to match your sensor's readings

          } else {

            return x;

          }

    unit_of_measurement: "units"  # Change to the appropriate unit

    icon: "mdi:water"

    attenuation: 0db  # Add this line to set the ADC attenuation to 0db

    id: water_sensor  # Add an ID to the sensor for later reference

output:

  - platform: gpio

    pin: GPIO2  # Set this to the GPIO pin you used for Vcc (e.g., GPIO2)

    id: water_sensor_vcc

but i get an errormessage in the line
board: heltec_wifi_kit_32_V3
This board is unknown, please set the variant manually.

i used the ID from:
https://docs.platformio.org/en/latest/boards/espressif32/heltec_wifi_kit_32_V3.html

so i dont know what i am doing wrong

What version of esphome?

i’m using ESPHome version: 2023.8.2

Try a lowercase v

wifi-kit-32-v3

See https://github.com/platformio/platform-espressif32/blob/eb7eba46fdc46730bc689888a0daf6234ff4febe/boards/heltec_wifi_kit_32_V3.json

Must say I am not entirely sure, it is just a guess.

did not work
i tried:
wifi-kit-32-v3
heltec_wifi_kit_32_v3
heltec-wifi-kit-32-v3
heltec-wifi-kit-32-V3

Sorry, my mistake, try underscores _ not hyphen -

board: wifi_kit_32_v3
gives the same error

when i use the id from another board the code shows no errors.
i tried it with a couple of the ID’s from baords with an ESP32S3 MCU

Just try it with this code:

esp32:
  board: heltec_wifi_kit_32_V3
  variant: esp32s3
  framework:
    type: arduino
    version: 2.0.9
    platform_version: 6.3.0

Works perfect for me :slight_smile:

1 Like