adonno / tagreader

Simple to build/use NFC tag reader, specially created for Home Assistant
https://adonno.com
GNU General Public License v3.0
1.14k stars 176 forks source link

Compatiblility with ESP32 and the PN7150 NFC tag reader used in "Chhavi" (crowdfunding campaign product on on Crowd Supply) #134

Closed Hedda closed 2 years ago

Hedda commented 2 years ago

Do you think that the NXP PN7150 module based NFC tag reader used in this ESP32-based "Chhavi" product with fingerprint sensor and optional NFC tag reader can be supported in ESPHome on this and then be made to work with Home Assistant Tags project?

https://www.crowdsupply.com/vicharak/chhavi

Vicharak has launched "Chhavi" ESP32 based fingerprint and NFC reader product as a crowdfunding campaign on Crowd Supply.

"Chhavi is a compact, wireless, touch-capacitive fingerprint sensor based on ESP32 WiFi and Bluetooth SoC that is offered with optional NFC connectivity and a battery."

It says that it can also optionally be powered by a battery.

Not cheap but it have to say that its very compact size makes it looks very nice. BTW, I first read about it on CNX-Software blog:

https://www.cnx-software.com/2021/10/08/chhavi-esp32-fingerprint-sensor-nfc-battery/

"FPC BM-Lite" fingerprint sensor module by Fingerprints

https://www.fingerprints.com/technology/hardware/modules/fpc-bm-lite/

https://www.fingerprints.com/solutions/access/bm-lite-development-kit/

NXP "PN7150 NFC controller"

https://www.nxp.com/products/rfid-nfc/nfc-hf/nfc-readers/high-performance-nfc-controller-with-integrated-firmware-for-smart-devices:PN7150

https://www.nxp.com/docs/en/data-sheet/PN7150.pdf

NFC Specifications & RF Protocols

¹ ISO/IEC 18092 (NFCIP-1) edition, 2013-03-15. This is similar to Ecma 340 ² ISO/IEC 15693 part 2: 2nd edition (2006-12-15), part 3: 1st edition (2001-04-01) ³ ISO/IEC 14443 parts 2: 2001 COR 1 2007 (2007-11-01), part 3: 2001 COR 1 2006 (2006-09-01) and part 4: 2nd edition 2008 (2008-07-15) ⁴ NFC Forum Device Requirements V1.3 ⁵ ISO/IEC 15693 part 2: 2nd edition (2006-12-15), part 3: 1st edition (2001-04-01)

PS: I'm just a home automation enthusiast and have no affiliations or connections with Chhavi and Crowd Supply or any others.

akshar001 commented 2 years ago

So this is Akshar, i have been specially mailed by someone to support this. I along with my team has launched Chhavi.

Chhavi is costly but when it's fingerprint and nfc and battery all together.

I have suggested about launching one version of ESP32+NFC only. And it would be much cheaper. But if there is a user base we definitely can support ESP32+NFC only.

And our core is about firmware. I have looked at this repo, and i think we will make full compatible code version for Chhavi.

P S:- @Hedda thanks!

Hedda commented 2 years ago

@akshar001 It might be a good idea if you would also start a discussion about PN7150 NFC reader here in ESPHome discussions(?):

https://github.com/esphome/esphome/discussions

I have suggested about launching one version of ESP32+NFC only. And it would be much cheaper. But if there is a user base we definitely can support ESP32+NFC only.

I believe that there would definitely be a larger market for a small ready-to-use NFC tag reader-only if it also comes in a nice case.

And our core is about firmware. I have looked at this repo, and i think we will make full compatible code version for Chhavi.

The upstream ESPHome project does support ESP32 (and even a another fingerprint reader) but no native NFC reader support yet:

https://esphome.io

https://esphome.io/components/fingerprint_grow.html

https://github.com/esphome/esphome

PS: FYI, I have also posted the same question in the hardware section of the Home Assistant community for end-user discussions:

https://community.home-assistant.io/t/chhavi-esp32-based-fingerprint-and-nfc-tag-reader-compatibility-with-esphome-and-home-assistant-tags-crowdfunding-campaign-product-on-on-crowd-supply/344938/

akshar001 commented 2 years ago

https://github.com/esphome/esphome/discussions/2464

adonno commented 2 years ago

Wow that looks amazing This is what you can achieve when you have the right knowledge

RichieFrame commented 2 years ago

For those that want to know, the 7150 offloads NFC library code onto the controller so it does not have to run on the ESP, making things far more simple. Also, it has about 150th the power usage of the 532, so you can run it on a properly designed ESP32 board with a slow polling interval on battery alone, though there would be a lot of latency to get on wifi, so that might be better combined with a Thread or LORA radio for quick response times

akshar001 commented 2 years ago

@RichieFrame yes, that was the goal to use for 7150, and price difference was also less.

Hedda commented 2 years ago

Also, it has about 150th the power usage of the 532, so you can run it on a properly designed ESP32 board with a slow polling interval on battery alone, though there would be a lot of latency to get on wifi, so that might be better combined with a Thread or LORA radio for quick response times

Guess that discussion is way off-topic for an ESPHome based project and this thread, however, I agree that it would be very cool to in the future also see Silicon Labs EFR32MG21 Series 2 Multiprotocol Wireless SoC based NFC tag reader. I mention EFR32MG21 because it supports Bluetooth, Zigbee and Thread / Matter (formerly Project CHIP), and not only that, EFR32MG21 have the capability of supporting both Zigbee and Thread / Matter (formerly Project CHIP) running at the same time, which I believe is why the Naby Casa hardware drivers chose it for the Home Assistant Amber. Supporting both Zigbee and Matter at the same time would make it a privacy concern personal area network device that should be easy to operate a long time on a couple of CR2032 batteries and potentially be future-proof

akshar001 commented 2 years ago

CHIP also supports ESP32, so yes there can be a useful, way to integrate this, back to our main discussion, https://github.com/esphome/esphome/tree/dev/esphome/components/nfc

This is c/c++ code that i have found, i will just use the same functions with different class and implement it. So everything will be same just add the support for chhavi

Hedda commented 2 years ago

...back to our main discussion, https://github.com/esphome/esphome/tree/dev/esphome/components/nfc

This is c/c++ code that i have found, i will just use the same functions with different class and implement it. So everything will be same just add the support for chhavi

@akshar001 Would you be willing to code this yourself and submit patch for PN7150 NFC as a pull request to upstream ESPHome?

akshar001 commented 2 years ago

@Hedda yes i will submit a Chhavi NFC in ESPHome as patch

akshar001 commented 2 years ago

We have integrated the ESPhome with chhavi i will send you a repo soon.

Hedda commented 2 years ago

@adonno Is PN7150 (and thus also Chhavi hardware) now supported by your tagreader project?

adonno commented 2 years ago

No actually These are two different Projects. My that would require a complete different yaml . right now PN7150 isn't supported buy ESPHome at all. For the rest you will be able to copy the Tag segment.

Therefore i closed the issue.