Wake ESP8266 from deep sleep on tag read by PN532

I have a nodemcu connected to a PN532, reading tags and notifying Home Assistant only when a recognized tag is read.
Now, it isn’t easy to have AC power in the place where I need to install this device, but I think I can get a decent life on a 9V battery, since I will have to read tags and connect to the wifi to notify Home Assistant just a couple of times a day.
Of course the ESP should be in deep sleep all the time, until a tag is read. How can I achieve this? I believe I have to connect D0 to the RST pin, but can I give the wake up signal from the PN532, such that it is only woke up when a tag is read?
Alternatively I would have to add a switch and manually wake the ESP up before getting the tag on the reader…

Thanks for your suggestions

the ESP8266, you can only put the node into deep sleep for a duration using `sleep_duration

but the it goes on:

what I understand is that connecting those pins it will wake up, regardless of the sleep duration parameter, that is indeed optional. Am I wrong?

I guess I can reply to my own question. I tried and you are right. The sentence means that unless GPIO16 is connected to RST, the ESP won’t wake up, regardless of the sleep_duration.
Will the ESP32 behave as I need? Meaning that I would be able to wake it up on a “high” on a pin of choice insted that only at defined intervals?

Yes I believe esp32 will work.

@gaggio did you manage to find a solution? I’m facing the exact same issue.

There isn’t a solution for an esp8266.

as @nickrout said, esp8266 is simply not able to do what I wanted, so I switched to ESP32.
I’m facing other issues, see description posted here: https://github.com/esphome/issues/issues/1170
It went un-responded, and I didn’t have enough time to experiment more, so I still don’t have a working configuration.