Trouble Configuring Tag Scanning with PN532 and tagreader.yaml

So, as far as I can see, something has changed that I’m not completely familiar with.

The wiring guide on the github repo for this project shows a different wiring than before, and the picture of the actual wired up device on that project shows the wiring setup that I used the first time I did this when it worked.

Here’s what I did:

  1. ESPHome is version 1.15.3.
  2. Hardware: Wemos D1 Mini and a NFC Module V3 PN532 reader.
  3. I soldered according to the current wiring diagram that shows only 4 connections to the NFC Module versus the previous wiring which I cannot find, but had a lot more wires.
  4. Using ESPHome, I copied the tagreader.yaml found here. into a new node’s configuration, validated, then compiled, downloaded, and flashed the D1 Mini.
  5. I restarted ESPHome for good measure and it appeared that the device had connected, but there was no response when scanning, and no initial boot sound from the speaker (per line 28 of the yaml.)
  6. I read somewhere that there’s a need to configure ESPHome with a specific version (esphome_version: ‘jesserockz:pn532-ndef-2’) so I added that to the first line of the ESPHome configuration in the add-on and restarted the add-on.
  7. Moments later I heard the speaker beep on the scanner.
  8. No response from any scanning.

Have I missed a step?

In the tagreader.yaml on lines 75-77 I see:

i2c:
  scan: False
  frequency: 400kHz

I’m presuming i2c is disabled in favor of the section just below this for pn532_i2c. But it’s still a question.

So, short of bad wiring, what in the world am I doing wrong?

I just noticed this:

[12:37:56][C][pn532:015]: Setting up PN532...
[12:37:56][W][i2c:070]: Received NACK on transmit of address 0x24
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[12:37:56][E][pn532:019]: Error sending version command
[12:37:56][E][component:092]: Component was marked as failed.

when flashing the binary to the D1 Mini.

This smells like a wiring error, or either a bad scanner or incompatible scanner?

Problem solved. The board dip switches needed to be changed to i2c from SPI.

Switch 1 ON
Switch 2 OFF

Hi,
I tried to compile the yaml but I get this:

INFO Reading configuration /config/esphome/TAGreader.yaml…
Failed config

pn532_i2c: [source /config/esphome/TAGreader.yaml:79]

  Component not found: pn532_i2c.
  id: pn532_board
  on_tag: 
    then: 
      - homeassistant.tag_scanned: !lambda |-
          return x;
      - if: 
          condition: 
            switch.is_on: buzzer_enabled
          then: 
            - rtttl.play: success:d=24,o=5,b=100:c,g,b
      - if: 
          condition: 
            switch.is_on: led_enabled
          then: 
            - light.turn_on: 
                id: activity_led
                brightness: 100%
                red: 0%
                green: 100%
                blue: 0%
                flash_length: 500ms

How do you integrate this nmissing component in to 1.15.3 version?
Thanks.

1 Like

Hey, i got the same Problem. I have tried the dip switch from i2c to SPI. But same issue

Hardware RaspyPI4 / ESPHomeVersion: jesserockz:pn532-ndef-2 is installet

What do i wrong?

[22:00:15][W][i2c:070]: Received NACK on transmit of address 0x24
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][W][i2c:086]: Requesting 1 bytes from 0x24 failed!
[22:00:15][E][pn532:019]: Error sending version command
[22:00:15][E][component:092]: Component was marked as failed.