-
Notifications
You must be signed in to change notification settings - Fork 26
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
Wiegand interface #211
Comments
I think the RDM6300 uses wiegand - could you try with the rdm6300 integration? |
The RDM6300 seems to use a standard UART protocol. Wiegand is its own beast. It would require some interrupt-driven communication for accuracy, but does seem fairly simple. There's a good library that can figure out the number of bits in the data automagically. If I had time, I'd port it. Any takers? https://github.com/paulo-raca/YetAnotherArduinoWiegandLibrary |
That would be very good. I have a weigand reader outside, knowing the tag read would be perfect for integrating it into Home Assistant. |
I have a couple of Siemens AR6182-MX readers (w/keypads) that can be configure to use a Wiegand interface, would be interesting to get this hooked up to EspHome. Tried the YetAnotherArduinoWiegandLibrary and it works on arduino but not ESP8266. Found https://github.com/esprfid/esp-rfid which uses https://github.com/monkeyboard/Wiegand-Protocol-Library-for-Arduino.git but this didn't boot on my NodeMCU board at all. Might poke more later, but in case the links are of interest ☝️ |
This fixes the library used in esp-rfid as linked to above Unfortunately I need other bitcounts than standard depending on card type and optional pin length so I'll probably do a AR6182-MX library instead of a generic Wiegand. |
@beikeland I am using esp-rfid project on my nodeMCU since a couple of weeks, just use version 1.0.2 since latest one has problems with MQTT messages for tags. |
My primary motivation for looking into using ESPhome was to not rely on MQTT. I've got the library working and sorted out separating Pin, Card and Card+Pin in an Arduino sketch running on a NodeMCU-devkit. So just have to wrap my head around the abstraction needed to write a new component for the Wiegand bus and a sensor or something on top of that, or find that someone beats me to it while trying to understand the ESPhome code:) |
I understand that, I just replied to the fact that it wasn't booting on your nodeMCU ;) |
That was due to the missing ICACHE attribute for the interrupt handler in
the underlying library. Fixed it.
…On Thu, Jul 18, 2019 at 1:34 PM nerdosity ***@***.***> wrote:
I understand that, I just replied to the fact that it wasn't booting on
your nodeMCU ;)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#211?email_source=notifications&email_token=AAUTS3RPMROPNEK6IKZNRDLQABINZA5CNFSM4HKTC32KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2IGHOQ#issuecomment-512779194>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUTS3URDCHZMNLVY22GOADQABINZANCNFSM4HKTC32A>
.
|
Still trying to work out how to add the components to ESPHome, maybe one day. |
I have a bunch of HID Prox readers, would love a component to use them with ESPHome! Currently using them with https://github.com/TomHarkness/homeID |
Any news on that? I've bought a keypad that use this protocol and would like to wiring it to an ESP32 running ESPHOME |
Also interested in using wiegand keypads connected to an ESP8266/ESP32. |
Can you help me building the plugin ? |
I’d be happy to give it a go, but I’m not much of a programmer these days. More of a scripter I’d say. While I’m thinking about it, one feature I’d like to see is the ability to set codes/card numbers in HomeAssistant (or whatever frontend) and have them cached locally on the ESP. |
You must need the card number to be passed to home assistant, then you can
do what you want with it.
…On Sun, 12 Jan 2020, 12:49 am Caleb Edwards, ***@***.***> wrote:
I’d be happy to give it a go, but I’m not much of a programmer these days.
More of a scripter I’d say.
While I’m thinking about it, one feature I’d like to see is the ability to
set codes/card numbers in HomeAssistant (or whatever frontend) and have
them cached locally on the ESP.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#211?email_source=notifications&email_token=ABP5BVHK2LB73ZEJCCAAB2DQ5HE53A5CNFSM4HKTC32KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWCK5A#issuecomment-573318516>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABP5BVCRMOCRY5SU5SE65U3Q5HE53ANCNFSM4HKTC32A>
.
|
If you want local cache / standalone control, you might want to look at the esprfid project. It can also talk to Mqtt so can also be manually integrated with stuff like Hass.
https://github.com/esprfid/esp-rfid
You don't need their special board, any esp8266 will do. I used it to handle card reading/users and had Hass control the lock. Worked quite well.
Still would be good to have weigand in esphome, to keep everything on one platform.
Sent from Nine<http://www.9folders.com/>
…________________________________
From: Caleb Edwards <[email protected]>
Sent: Saturday, January 11, 2020 8:49 AM
To: esphome/feature-requests
Cc: Wade J. Weppler; Comment
Subject: Re: [esphome/feature-requests] Wiegand interface (#211)
I’d be happy to give it a go, but I’m not much of a programmer these days. More of a scripter I’d say.
While I’m thinking about it, one feature I’d like to see is the ability to set codes/card numbers in HomeAssistant (or whatever frontend) and have them cached locally on the ESP.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#211?email_source=notifications&email_token=AAGOH54GIWWMK5GXAEOSI53Q5HE53A5CNFSM4HKTC32KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWCK5A#issuecomment-573318516>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAGOH5Y4SLFAYOZPNN365CDQ5HE53ANCNFSM4HKTC32A>.
|
I'm not interest of just RFID. I would like the complete wiegand protocol. Either Keypad of RDIF will be pass to HA. And like @edwardscaleb9 said, it would be great to program the keypas via HA. I've found online a library for Weigand, but dont have the skills to implement it with ESPHOME. Someone with those skill would want to help us ? |
I was able to implement a CustomAPIDevice using code from this Github repo without any issues. The code works as is (I had to drop the I can post the sample custom device code if anyone is interested. |
@gdoerr i’m really interested to see how you did it !! |
Save the code below as wiegand_device.h and include it as a custom component in your YAML file.
|
Wow @gdoerr , that's a greate job you did! Thanks ! Thanks again! |
And i'm using a ESP-32 for now, can I use any GPIO pin ? |
You'd have to restructure the Wiegand class into a TextSensor. I don't recommend this because you're not interested in state, you really want the event which is why I call a service. You should be able to find the example code on esphome to implement a custom text sensor. You should be able to use any GPIO pins on the ESP32 but the order is important...swap D0 and D1 if your're getting weird results. Good Luck! |
What would you recommend to write in the script to call to received as a event ? |
You can use either a yaml script or a python script. I use a python script to validate the code sequences against a dedicated outlook.com calendar to control access to my garage. |
Or maybe only share your how implentation, that's help me reverse engineering and understand or to implement it for my use. |
I've tried to change the class declaration from CustomApiDevice to TextSensor and add PublishState(keyCode) to CallHaService without success |
@pricard32 Rather than mucking up this feature request thread with a specific problem, perhaps you can post your question on Stack Overflow which is better suited and then post a link to the problem here. I'm happy to help but you'll need to provide more information than you tried something without success. When you ask the question, be sure and post exactly what you tried and what errors you're getting. Otherwise it's difficult to help you without writing the software for you... |
I'm yet looking for a version that can work on esp32. Tried versions posted above but nothing work on esp32cam... |
@keith721 @cheisig As @keith721 suggested, there are some compilation issues only if you use the wiegand component as external, because the version of the esphome that would use the external component is more recent than the component itself, thus the compilation issues. The component is slightly outdated and needs to be fixed using the modifications that @keith721 suggested. @cheisig, If you want to give it a try, you should use my fork (stefan-golinschi/esphome dev branch) which contains the wiegand component modifications onto the esphome rev.: 3d71e2e1890a94d0caee3dda2403184b98fdbfde. So, in order to use the component, you should use an older version of esphome(ie. revision 3d71e2e1890a94d0caee3dda2403). |
@OttoWinter this seems quite stable, how can we apply for an official integration? |
Hi, I used code from @avwuff https://github.com/avwuff/esphome-wiegand and found that the number it extracts is quite different than expected.
I don't understand why this correction is needed.
I hope it will be useful to someone. |
Does it work on esp32? |
Hi Guys! Any update? |
It's a pitty, I've this implemented in home assistant with ESPHome over a esp8266 working great, but the official implementation will work even better for sure. |
+1, for me the integration (after patching it) worked great. |
@gio-dot, @lednicazar and @nerdosity, thanks for letting us know that you were able to get the Wiegand integration to work with Home Assistant. After reading all the posts here and many more online, I am ready to try this out. I am pretty novice with this type of integration and I would like to get a little bit more details on the steps to get it to work. I do have a simple garage door control with an ESP8266 and relay board working and I also have my alarm system connected via an ESP32. Both of them with ESPhome. However, I am a little lost when it comes to h files and scripts with parameters. My goal is to read the code entered at the keypad, compare it to a list of approved code, and then open the garage door. Could you post your implementation steps? Which version the wiegand_device.h did you use? ESP32 or ESP8266? Could you also show an example of a script that uses the code provided by Wiegand? I have a couple keypads coming in for testing: the Retekess T-AC03 and the T-AC04. Both should be compatible with Wiegand 26-bit. Let me know what you use so if I can not be successful with these, I can order your keypad brand. Thanks again to all |
Hi, I'm using an Amazon one, the one with the metal body and the internal embedded inside resin. I connected it to an ESP8266 and refleshed it with this:
Apart from the Italian bits, you should be able to use it. Then it built and flashed perfectly. |
@nerdosity Thank you!. Could you provide additional information on the manual patching ? I am confused with what appears to be two methods: One with 3 files (stefan-golinschi/esphome@c4e283e) and some patching to do
and another one with one file:
What is the current recommendation. Where should I get the files from as it seems to have numerous repositories and forks with similar code. |
Getting closer.
Method 2: Using the wiegand_device.h file only. I can compile and upload. All good. I am able to read the digit submitted at the keypad, but only 1 digit at a time. I could not find out how to get the 4-digit code submitted. Each digit shows as individual tag in HA. |
Ok, I got it to work using the one file method. I modified the files (.ymal and .h) to handle keypad entries and RFID tags and correct issues with alpha numeric values or code starting with 0. See my repository if you are interested by a simple method. |
I'm pretty new to all this, but want to do the same thing as you. But I am a novice and need a bit of hand holding. I have home assistant working and have an ESP8266 board and an keypad that outputs wiegand over two wires. Can you walk me through the steps? Thanks! |
@HGupta2018, you should take into account that most Wiegand readers use 12v logic, so you will need to use a level shifter between the esp8266 and the reader. Edit: https://github.com/stefan-golinschi/esphome/tree/dev |
The readers I've used have maximum 5V output on the data pins, so you don't need a level shifter. Check what yours puts out before worrying about that. |
Same. The one I used didn't require a level shifter. The power supply used for the keypad was garbage though and caused my data lines to go wonky (keypad would get spammed with key presses whenever data lines were connected). Had to replace with my own 12v power supply. Sort of sucked because the Chinese power supply handled opening the drop locks. Had to buy a relay and do all that manually. |
great to know. I will measure before I start. I know it has to be a basic question, but how do I get the wiegand_device.h file onto the ESPhome? |
Here's a working external component: https://github.com/ssieb/custom_components/tree/master/components/wiegand. |
Hi Samual,
any chance you could provide more infos about the working of it?
Thanks
Am Do., 22. Sept. 2022 um 04:04 Uhr schrieb Samuel Sieb <
***@***.***>:
… Here's a working external component:
https://github.com/ssieb/custom_components/tree/master/components/wiegand.
—
Reply to this email directly, view it on GitHub
<#211 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGBFNNYXET3Y4IIG7424OPDV7O5BHANCNFSM4HKTC32A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There's a README for each component that describes how to configure it and the top-level of the repo describes how to include the components. |
@ssieb that's great ! I'll definitely give it a try. Do you have any plan to try to make it an official component? |
I have "plans", but it requires getting around to writing documentation pages for the components. |
Thank you @ssieb. |
Implemented: https://esphome.io/components/wiegand.html |
Wow! At long last! Thank you! |
Describe the problem you have/What new integration you would like
I am using wiegand access. It would be nice to be able to integrate this kind of equipment to ESPHome
Please describe your use case for this integration and alternatives you've tried:
At the moment, I am using a home made script. Having one solution for all would be nice.
Additional context
The text was updated successfully, but these errors were encountered: