Issue creating tagreader

I have been following the tutorial for creating an NFC tagreader in Home Assistant. I have tried:

  • Two different D1 Mini ESP8266
  • Different browsers
  • ESPHome web interface
  • ESPHome command line
  • Two different computers

When I use the web interface I get a “Failed to execute ‘open’ on ‘SerialPort’: Failed to open serial port.” error

When I use the command line I get “ERROR Running command failed: Cannot configure port, something went wrong. Original message: PermissionError(13, ‘A device attached to the system is not functioning.’, None, 31)”

I have tried searching for answers but am struggling to determine whether my issue is hardware (got a bad batch) or something to do with my setup.

Any advice?

Try a different USB cable. Some are power only (no data lines).

Assuming you are using the ESPHome addon, make sure you are connecting the ESP to the home assistant server, not the PC you are viewing HA/ESPHome on.

I have tried multiple usb cables (should have mentioned in the post).

My assumption is that running the command line version of esphome on my windows Pc and connecting the ESP8266 to that Windows PC would not require me to connect the USB to the Server Running Home Assistant.

My complication is that I have Home Assistant running on a virtual machine in TrueNAS. USB passthrough is problematic with VM in TrueNAS.
To attempt your recommendation I setup a Raspberry Pi with Home Assistant OS. This resulted in a similar error message to what was observed using the command line.

Compile the binaries with HA’s esphome add-on, using the download option.

Use esp-flasher on your windows machine to flash the downloaded bins :wink:

PS: Could it be you are missing the correct drivers for you serial driver?

Or maybe fail to push the reset button while powering the esp?

I think the drivers are right but my issue is with not hitting the flash button.
My device does not have the flash button. From what you have written above I am presuming there is a way to achieve the same goal using the reset button. Can you clarify your comment above?

Sorry, unfamiliar with D1 mini…checked the datasheets?

It’s not needed.

Beside the esphome-flasher mentioned by @aceindy you could also just make use of esphome web with a compatible browser (chromium based) to flash the binary you created somewhere (if it was the windows pc or the truenas doesn’t matter).

You can also just go ahead without binary and try to flash a minimal config to adopt.

But the error messages indeed indicates some problems with your serial…

Thanks all, solved the problem. It was with my ability to read wiring diagrams. My ground was incorrectly wired.