Wiegand protocol RFID readers known to work with ESPHome?

Can anyone give me an idea of ​​where the error ?

it was not, but even if I connect it, there is no difference

Edit: Seller responded that this reader no longer supports wiegand. I am going to apply for refund.

1 Like

figures… I can verify that this one does do wiegand26 and wiegand34 output and it’s the one i use, it works well and is rated for outdoors. There are others out there too though but, this one you wont have to guess.
https://www.amazon.com/dp/B088M5ZZCV?psc=1&ref=ppx_yo2ov_dt_b_product_details

Thanks. I went for the same one. Is the wiring straight forward then? Just 2 wiegand pins (d0 and d1) connected to the ESP, and 12V source to power the keypad and converter (12V to 5V) for ESP, all sharing the same GND?

Yep, that’s it. In hindsight I kind of wish I’d still used the builtin relay that way if anything had an issue the keypad itself would still open the door. I havnt had any issues aside from a few small things though.

I am bit paranoid on that end - what if someone would come to my place and swap out with his own keypad, same type. It would just work.
This way, i can build all logic in HA, despite the fact it relies on it. I really need it as a backup way of getting in the place

Ya, I’m sure there are roving gangs who carry 5,000 different keypads and wiring diagrams so they can swap them out to break in homes and garages. Sounds like a reasonable fear to me.

1 Like

Yeah. Probably not. But why just letting someone to short 2 cables and let him in?

@Fallingaway24 so I ordered the very same you linked in the post, byt mine just does not have any reset jumper on the board. It is just the one to set NO/NC output, but nothing else. I need that to change the output mode, correct? Shorting D0 or D1 with GND (either when booted, or since start) does not make green light to blink. Am I missing something?

Well most people who break into homes and what not, they aren’t very smart and they usually are lazy. Doors and windows are far easier to gain access from then popping the cover off a keypad and figuring out which wires to short or have you bricked off those too. I understand your concern, I just think it’s pretty unlikely. This is where automations shine though. If that door is opened without the use of a pin number that could be cause to trigger the alarm. You could add additional sensors to it as well like if there’s no presence detected from your phone or car or odd hours when people are gone or sleeping. You have lots of options available to put your mind at ease but keep in mind things break. 2$ esp boards fail, networking issues, whatever. It’s a good idea to have a way to get in.

I finally went for https://www.aliexpress.com/item/33043239937.html which works very well.
I am just struggling with end keys and clear keys.

    end_keys: "#"
    back_keys: "*"
    clear_keys: "C"

Keypad has ESC and ENT keys, ESC is deleting keys entered (gets identified as key 10), but ENT does not confirm anything. It is identified as key “11”. I tried to define end_keys: "11" but this has no effect.
I can overcome it by setting pin lenght and set end_key_required = false, but it would be still nice to be able to confirm the PIN. Any ideas?

1 Like

I would recommend you ask the author of this integration. He is on the discord server all the time and he’s very helpful, he helped me a lot with mine. ssieb is his name in there.

Im sorry, for some reason i didnt see your question. The one i bought which i linked too. You just short out one of the data lines and hold it until it starts blinking. It doesnt blink green either, it blinks red and it continues to blink red. Now this is a little annoying and i never found a way to get it to work in wiegand26 output and not constantly blink red. Somewhere i posted a step by step how to do this and i dont recall if you actually need to short the reset jumper or just power cycle it but the reset jumper was at the very bottom of the pcb, its just 2 jumper pins by themselves and it has"RESET" printed right by it on the pcb. Im not positive but i believe it was on the opposite side of the board where the 3 relay jumpers are.

That is exactly the problem. That keypad has no jumper on PCB at all. Looks almost exactly as one from Aliexpress I bought initially - which was useless.

I had the same problem with the linked LEXI style keypad, which, looks awesome in person, however, the three different sellers I purchased from all must get them from the same alibaba supplier, there does not seem to be a reset jumper on the pcb anymore.

I did, however, eventually find one that works - if you search for AMOCAM on Amazon there is one with a metal or plastic housing, with a finger print reader. That was straight forward to put into reader mode as described in the manual (no jumpers or shorting required). I haven’t tried setting the finger print reader up yet :smiley: Thanks for all the tips!

Link to the one I bought below:
https://www.amazon.com/dp/B08TBPWZCG?th=1

I can only get raw.

I’ve tested with an esp8266 with several keyboards and I’m wondering if there isn’t a voltage problem. Does anyone have any ideas?

I supply the keyboard with 12v and connect the GND of the esp to the GND of the keyboard.

My code :

esphome:
  name: keypad
  friendly_name: keypad

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "**********"

ota:
  password: "*************"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Keypad Fallback Hotspot"
    password: "iMqlBgbPSO5l"

captive_portal:
web_server:
###

external_components:
  - source: github://ssieb/esphome@wiegand
    components: [ wiegand ]

wiegand:
  - id: keypad
    #you can change the d1 and d0 pins as you like, htis could be mandatory if you change the board
    d0: GPIO5 
    d1: GPIO4
    on_key:
      - lambda: ESP_LOGI("KEY", "received key %d", x);
    on_tag:
      - lambda: ESP_LOGI("TAG", "received tag %s", x.c_str());
    on_raw:
      - lambda: ESP_LOGI("RAW", "received raw %d bits, value %llx", bits, value);

key_collector:
  - id: pincode_reader
    source_id: keypad
    #length can be changed if needed
    min_length: 5 
    max_length: 5
    #end key can be changed if needed
    end_keys: "#" 
    end_key_required: true
    allowed_keys: "0123456789"
    
    #timeout ccan be changed if needed
    timeout: 5s
    on_progress:
      - logger.log:
          format: "input progress: '%s', started by '%c'"
          args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]
    on_result:
      - logger.log:
          format: "input result: '%s', started by '%c', ended by '%c'"
          args: [ 'x.c_str()', "(start == 0 ? '~' : start)", "(end == 0 ? '~' : end)" ]
      - lambda: id(keycode).publish_state(x.c_str());
      - lambda: id(coderec).publish_state(true);
      - delay: 200ms
      - lambda: id(coderec).publish_state(false);
    on_timeout:
      - logger.log:
          format: "input timeout: '%s', started by '%c'"
          args: [ 'x.c_str()', "(start == 0 ? '~' : start)" ]

text_sensor:
  - platform: template
    name: keycode
    id: keycode

binary_sensor:
  - platform: template
    name: code received
    id: coderec

Hello
how did you connect D0 and D1 to the ESP? Are D0 and D1 ready for 3.3V or is a level shifter / opto coupler needed?
Thanks!

Hi your files are not there anymore.

i really would like to install a codelock with wiegand to esphome.
Can you tell me where i can find your code?

The files are not on github any longer, because the were merged into the ESPHome mainline.
The github lines are no longer necessary in your ESPHome YAML.

1 Like

With the RFID reader I use, no level convertor is necessary.
The GPIO lines of the ESP8266 and ESP32 are definitely 5V tolerant.