My ESPHome device can successfully decode an RFID tag. The ESPHome device has been added to HA. However, I don’t see any entities in this device. Other ESPHome devices do have entities that can be used to create Automations. Below is the ESPHome yaml code and the serial output of the device. I’m new to HA and sure that it’s something obvious. Any hints would be appreciated.
The wiegand component doesn’t create any entities, it reads a tag or keypad and decodes it. If you want sensors or entities then you need to create them. For mine, I assigned a name to each code and tag. On a code or tag scan if it matches a user, a sensor is “last user” sensor is updated. If it doesn’t match then it’s an invalid user. There’s a ton of stuff you can do here, it depends on what you want and your willingness to read the documentation.
This guy made a whole program to add users or codes from the HA font end, he also made it so you can reset codes from the keypad itself. It’s kind of overkill IMO and takes some time to understand the program flow but, you might find it useful or find inspiration by looking through his code.
Just out of curiosity, which one did you go with? As far as which keypad/tag scanner. There are so many on the market, I’m just curious which ones people have good results with.
In HA go to Settings → Tags. When you scan a new tag it automatically shows up in the list and you can add a friendly name and then add an automation if you like.
You know the same automations can be done right there in esphome? The problem with your “easy” one liner is its going to be useless in the event there’s a breakdown in communication between the node and HA or HA is down. You could have used an esp8266 and wouldn’t have needed logic shifting too. Rfid reader straight to esp board and done.
I didn’t know the ESP8266 supported 12V logic. The datasheet says 3.6V max. Edit: It looks like wiegand uses 3-5v logic…I’ll check it out on a scope. It would be great to remove the logic level converter.
Every Wiegand tag reader/keypad I’ve seen, they output roughly 4.96v. The gpios on the esp8266 are indeed 5v tolerant and is exactly how mine and many others are wired. 12v is the operating voltage of the keypad, not the data output.
An esp board… Esphome is for esp boards… to make things simple id recommend an esp8266 NodeMCU. That board you can wire the keypad directly to it because its 5v tolerant whereas the esp32 isnt and you’d also need a logic level converter.
Once you hook up the keypad the esp board sends the tags scanned and keys pressed to HA. The instruction book will tell you what wires are for what. You will likely need a 12v power supply to power the keypad and you need a 5v power supply for the esp board. The keypad will have 2 data wires, those go to the esp board and you will need a common ground so the 5v and 12v grounds need connected together.
Depending on the keypad it may or may not come in Wiegand26 output by default, mine didnt but, the manual tells you how to do it, you gotta read it, you gotta make an effort.