I’m trying to flash my Wemos D1 mini with ESPHome to control my Garage door and I’m getting this error:
Unexpected error: could not open port ‘COM4’: PermissionError(13, ‘Access is denied.’, None, 5)
then followed by this error:
Unexpected error: ESP Chip Auto-Detection failed: Failed to connect to Espressif device: Timed out waiting for packet header
I’ve spent the last couple of hours on Google trying to figure out the fix by installing drivers etc, but nothing’s working. I’ve also tried flashing another Sonoff Basic that I had lying around and the same problem is happening, so I don’t think it’s the board.
I’m attempting this on a windows machine, using the flash tool and my code is the following
esphome: name: esphome_garage_door platform: ESP8266 board: d1_mini wifi: ssid: 'xxx' password: 'xxx' fast_connect: on api: ota: web_server: port: 80 logger: binary_sensor: - platform: gpio pin: number: GPIO13 mode: INPUT_PULLUP inverted: False name: "Garage Door Sensor" device_class: garage_door filters: - delayed_on: 20ms switch: - platform: gpio id: relay pin: number: GPIO5 inverted: False restore_mode: ALWAYS_OFF - platform: template name: "Garage Door Switch" icon: "mdi:garage" turn_on_action: - switch.turn_on: relay - delay: 1s - switch.turn_off: relay - platform: restart name: 'Garage Door REBOOT' status_led: id: status_light pin: number: GPIO2
Has anyone overcome this?