Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adonno update readme #133

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
![Screenshot of the tag reader modes](docs/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)
Expand Down Expand Up @@ -48,19 +76,15 @@ 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.

If the tag reader is unable to connect to a wifi network, it will start a WiFi access point with a captive portal to allow you to enter your WiFi credentials.

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

Expand Down
12 changes: 11 additions & 1 deletion tagreader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/";
Expand All @@ -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:
Expand Down