Esphome Keypad

1 view
Skip to first unread message

Libby Cowen

unread,
Jul 25, 2024, 11:42:53 PM7/25/24
to Hindi Lyrics for MSI

Some keypads are preconfigured by the factory to act as Wiegand inputdevices. In order to work with this component, they may need tobe reconfigured to act as Wiegand 26 output or Wiegand 34 outputdevices.

on_raw (Optional, Automation): An automation to performfor any data sent by the device. The value is in a variable called value, the number ofbits is in a variable called bits. Note that this will include parity bits as well andno parity checking is done.

That device has many brands and they all look similar. I have the same one too and the instructions for putting it into wiegand output mode were totally different. I was also still able to toggle the relay in wiegand mode.

nice work. I see the benefit of having the the esp device do the unlocking as a failsafe for when home assistant is down. But I would like to do user management and automations from whiting homeassistant itself. Will always have the key as backup for when HA or power is down. Can already do that with tags using the tag scanned trigger in HA thanks to this line in the config.

Would like to do the same with pin code, just send them to home assistant and let it handle it. No big expert in yaml esphome stuff so your code and the other repo will come in handy to get this working!

Oh ya, I think its kind of silly to have HA do all the tag/pin processing then send an action back to the esp board to open the door, that kind lf seems like a no brainer. I agree with HA doing user management and setting access. That repo I sent you, it does both. Users and access can be done on the keypad just like it comes from the factory or you can do it in HA, it creates a number of input_select entities to give or remove permissions or add new users.

I think thats what theyre showing you in the wiring diagrams. I didnt plan to use mine so I didnt investigate a whole lot but, im pretty sure you can. I just dont know if the bell and relay are triggered with 5v?, 12v? 5v for one and 12v for the other? No clue on that one
.

You realize the internal features can all be duplicated in HA as well as have it do logging. The problem with using the internal features is you have to be standing st the keypad to change anything or edit what users/codes have access. I didnt want to use the relay in mine but its simple enough to just add a relay with the esp board thats right there reading the rfid/key inputs. As far as the little goofy buzzer in them, well those are logic level and have wires for them.

I will say, the wiring diagram and instructions are not user friendly at all but, 2 same color blue wires for +/- 12v isnt normal for anywhere, not even the wild wild west of quality control, china. The blue wires appear to be some sort of logic output to trigger door bells.

I just started with Esphome and want to integrate a 4x4 matrix keypad.
So far the ESP8266 (nodemcu V3) is connected to Esphome, but I dont see any keys pressed in the log. Dont know if it is a configuration problem or a hardware problem.

I saw this project for a WiFi Duck where you can use a small esp8266 as a usb keyboard to send keyboard commands to a computer using ducky script. I thought maybe this functionality to use an esp8266 as a usb HID keyboard could eventually be implemented in ESPHome. Combined with AutoHotKey, this could create some really powerful automations on your computer.

Bottom line, yes an esp can easily emulate an hid keyboard. There are arduino libraries that make it easy to do. Not sure if they have been ported to esphome, but you could always do the arduino code yourself and use mqtt instead.

Another complicated alternative if esphome is needed (and no ported libs available) is hook an arduino nano up with uart to the esp. Nanos are the easiest arduino to setup as an hid device (using arduino libraries). Then use esphome UART to send keys to a serial port on the nano board, which is hooked to your surface usb port and will appear just like a keyboard to windows.

Yes, at the end of the day github is the final stage for feature adds. So might as well start there to fast forward the process a bit. This idea does sound like it would have popular applications. So would be nice to see an official esphome component for it, vs custom components and how to guides.

One option would be to emulate a bluetooth keyboard, and skip the USB altogether. This device made me think of it Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller - v1.2 - discontinued, but they probably make something else now.

Have you seen this?
It creates an Esphome project which can read IR codes and sends BLE HID keyboard keys.
The project includes the YAML file and the custom BLE component as a header file for the BLE HID keyboard. It uses the well-known library -vK/ESP32-BLE-Keyboard

It feels a bit ironic to build a device with physical buttons to control stuffover Wi-Fi after having put effort into moving it to home-assistant to make them"smart", i.e. replacing physical switches with virtual ones.

The most used lights in my room are controlled via home-assistant. I keep ahome-assistant tab open somewhere to click them on and off or resort to themobile app on my phone when my PC is not on. I find both of that a bitcumbersome for just quickly switching of a light when leaving the room anddecided to build a little macropad.

Six buttons seemed like a good amount, more than enough for the most used lightsand not so many that I won't be able to remember which one does what. The WemosD1 Mini has just about enough GPIO pins to accommodate for them, probably a fewmore if you really try.

Nice feeling switches where easy: From building keyboards in the past I had morethan enough spare cherry-style keyboard switches, as well as some blank DSAprofile keycaps that would do nicely. This macropad uses Kailh brownboxswitches to be precise. Mounting and wiring is normally done on a PCB whenbuilding a keyboard, using diodes in a matrix pattern to save on pins. For sixkeys it is totally enough to just manually wire them to the GPIO pins and readthe output. Instead of a mounting plate, the top half of the case will havefitting holes to press the switches in.

Each switch will be wired between a pin and a common ground connection. Not allthe GPIO pins on the Wemos microcontroller have a pull-up resistor or workproperly in this configuration, but I ended on this wiring diagram which doeswhat you would expect.

While you sure can write all the code for Wi-Fi, the switches and HTTP requestsfrom scratch, esphome is a much easier way to implement this. I use itanyway on a number of devices and all that is needed to generate a firmware forthe macropad is a bit of yaml. As a bonus, we get perfect integration inhome-assistant, a Web UI and fallback hotspots if the connection fails amongother features. Should I want to change the config later it can also be doneover the air, which still feels a bit like magic to me.

As I slight twist, I'm doing my esphome configurations in nix instead of writingyaml for every device. It allows for simpler templating and reuse of config andalso integrates better into the rest of my infrasturcture as it is also mostydefined as Nix code.

It defines a package for every file in the ./configs folder with the samename. That folder will contain device specific configuration which is mergedwith a common.nix file that has all common config like Wi-Fi settings,logging and metrics, ports etc. The device-specific configuration for themacropad in ./configs/esp-macropad.nix is simple:

Adding more devices is just a matter of placing the accordingly named files intothe ./config directory. esphome will compile the firmware and ask for theinterface to flash (or the IP address when flashing over the air).

Using FreeCAD I settled on the following dimensions and design. The hole for theUSB port was measured to fit a cable I had lying around with a reasonably sizedplug. The holes are sized to fit M3 screw inserts that can be melted in with asoldering iron.

To retain the keypads, you must reprogram the old system and use our Interface kit.
However, consider our Conversion kit. It would utilize the existing sensors and sirens. But it would disable the old board and keypad. You could use a tablet in their place to retain that same type of look/feel. Watch Nate's video here on installing a tablet as a keypad replacement.

I pressed the keypad buttons, observing light indicators on the keypad and capturing the signal using Saleae Logic software. It turned out that the protocol is dead simple: first part is a binary code for each button (8 bits) and second part is one bit per zone, light indicator and beep signal (16 bits).

I tried the workaround, but no luck. To resolve the issue with my S2+ opener, I bought an 880LM from Amazon dated 1/24 and I no longer have the panel issue with that one.
SmartThings integration is flawless, door status is updated right away.

Okay, here is something else that has happened after I installed my three blaQs. I have the Liftmaster Wireless Keyless Entry 377LM keypad. The one-button close feature no longer works. To close the door with the keypad, I now have to enter the PIN and press Enter.

Connect your computer to the GDO black using a data-capable micro-USB cable. Go to install.konnected.io, select the GDO blaQ and ESPHome firmware. Now you have the option to choose the stable or dev build.

@slopster Could you share some logs from start-up and after sending a few commands via HA or the web interface? You can stream logs over the network either via browser or command line, see: remote logging how-to

I have built a system for my front door using ESPHome. It started as a simple device to get notifications on my phone every time someone was ringing the doorbell and I was not home, but it became much more.

Reply all
Reply to author
Forward
0 new messages