From 7e67f08d7394bb83d575ed1172110fef846488f1 Mon Sep 17 00:00:00 2001 From: Andrea Donno Date: Wed, 6 Oct 2021 21:05:53 +0200 Subject: [PATCH 1/3] Update README.md enhanced the Readme with additional Tag reader functionalities --- README.md | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 31332b8..a41dd63 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,38 @@ The tag reader is a simple to build/use NFC tag reader, specially created for [H > I am selling a pre-built version, a DIY version (assembly required) or just the case (use with own components). Check it out on [my website](https://adonno-crafts.myshopify.com/). -![Photos of the final product](docs/cases.jpg) +The tag reader allows to easily read 13.56 MHz tags also known as NTAG 215 and passes the Tag Id Home Assistant in the form of a alphanumeric ID i.e `XX-XX-XX-XX-XX`. +In Home Assistant you can create automations based on this tag ID. Since the mobile companion app isn't able to read these tags as they are, we added the possibility to write either a specific or a random NDEF message on the tags with the tag reader so that they can be read by both, the reader and the companion app. The reader also allows to erease tags if necessary. + +## Usage + +The tag reader works on an USB-C connector for the newer versions or on an Micro USB for the DIY version and requires 5V 0.5A power. The tag reader will beep and flash a green led when it connects to the API. + +The different availble function modes can be accessed via the services +tagreader_services.PNG + +The tag reader uses it's LED to display the different modes + + * Read Mode -> OFF + * Write Mode Custom ID -> RED + * Write Mode Random -> Purple + * Clean Mode -> Orange + +On successful read of a tag the Reader buzzes and the green Led blinks + +We also added the possibility to play a "fail sound". This could be used for access control with an automation that checks if the scanned Tag is authorized for a specific function an then the sound can be played. + +Scanned tags can be managed from the tags interface in Home Assistant. You can find it under config -> tags. + +![Screenshot of the Home Assistant tag UI](docs/tag-ui.gif) + + + ## Building the tag reader +![Photos of the final product](docs/cases.jpg) + To build your own tag reader, you need the following components: - [ESP8266 D1 Mini](https://s.click.aliexpress.com/e/_d8l72oB) @@ -48,7 +76,7 @@ If you're new to ESPHome, we recommend that you use the [ESPHome Home Assistant ![Open Case](docs/inside-case-completed.jpg) -## Configuring for use with Home Assistant +## Configuring for use with Home Assistant The tag reader requires [Home Assistant](https://www.home-assistant.io) 0.115 or later. @@ -56,11 +84,7 @@ If the tag reader is unable to connect to a wifi network, it will start a WiFi a The tag reader will be automatically discovered by Home Assistant once the tag reader is connected to the same network. You can follow the instructions in the UI to set it up. -## Usage -Scanned tags can be managed from the tags interface in Home Assistant. You can find it under config -> tags. - -![Screenshot of the Home Assistant tag UI](docs/tag-ui.gif) ## Disclamer From 9394f2bff3c5f7853f8e3444dd4ab9a13c365e19 Mon Sep 17 00:00:00 2001 From: Andrea Donno Date: Wed, 6 Oct 2021 21:11:32 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a41dd63..a2bc71c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ In Home Assistant you can create automations based on this tag ID. Since the mob The tag reader works on an USB-C connector for the newer versions or on an Micro USB for the DIY version and requires 5V 0.5A power. The tag reader will beep and flash a green led when it connects to the API. The different availble function modes can be accessed via the services -tagreader_services.PNG +![Screenshot of the tag reader modes](docs/tagreader_services.PNG) The tag reader uses it's LED to display the different modes From 44dc1a84307cb8b4dc4708781b19f20effa8ff7b Mon Sep 17 00:00:00 2001 From: Andrea Donno Date: Wed, 6 Oct 2021 21:23:34 +0200 Subject: [PATCH 3/3] Update tagreader.yaml --- tagreader.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tagreader.yaml b/tagreader.yaml index ad14342..2c9e3d1 100644 --- a/tagreader.yaml +++ b/tagreader.yaml @@ -86,6 +86,12 @@ api: - service: write_tag_random then: + - light.turn_on: + id: activity_led + brightness: 100% + red: 65% + green: 0% + blue: 100% - lambda: |- static const char alphanum[] = "0123456789abcdef"; std::string uri = "https://www.home-assistant.io/tag/"; @@ -103,7 +109,11 @@ api: message->add_uri_record(uri); ESP_LOGD("tagreader", "Writing payload: %s", uri.c_str()); id(pn532_board).write_mode(message); - + - wait_until: + not: + pn532.is_writing: + - light.turn_off: + id: activity_led - service: write_tag_id variables: