Integrating a Wiegand Tag Reader with Indigo

Posted on
Tue Jun 20, 2017 8:04 am
racarter online
User avatar
Posts: 237
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Integrating a Wiegand Tag Reader with Indigo

I have a side gate fitted with an electronic deadbolt which is operated by Indigo via a Fibaro relay module. I recently decided to fit a tag reader to the gate to make unlocking a little easier.

In summary, I connected a Wiegand proximity tag reader (bought on eBay for a few pounds) to a Raspberry Pi Zero W, which reads the tag and writes the tag number to an Indigo variable. If the tag number changes, Indigo runs a Python script to compare the number to a list of valid tags, and unlocks the gate if there's a match.

I'd be happy to share wiring and coding details if anyone is interested.

Posted on
Sun Jul 02, 2017 10:11 pm
howartp offline
Posts: 3862
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Integrating a Wiegand Tag Reader with Indigo

I'm interested - not directly for Indigo but for general Wiegand understanding.

Btw, do you really trigger on "if tag number changes" or if "last updated changes"?

The former presumably won't work if the same users re-presents their card before another user as the number won't change?


Sent from my iPhone using Tapatalk Pro

Posted on
Sun Jul 02, 2017 11:07 pm
Asconasny offline
Posts: 156
Joined: Jan 16, 2015

Re: Integrating a Wiegand Tag Reader with Indigo

racarter wrote:

I'd be happy to share wiring and coding details if anyone is interested.


yes, please :)

Posted on
Mon Jul 03, 2017 1:09 am
racarter online
User avatar
Posts: 237
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Integrating a Wiegand Tag Reader with Indigo

@howartp

The Raspberry Pi sends the tag number to an Indigo variable. A Python script triggered by the change in tag number then decides if the tag is valid or invalid and acts accordingly, then sets the variable to "-" ready for the next tag.


@Asconasny

Here’s a guide:

Prerequisites:

A Raspberry Pi or Pi Zero (I used a Pi Zero W), running Raspbian Jessie Light or similar, connected to your LAN

A 12v DC power supply for the reader.


I bought this Wiegand reader from eBay:

http://www.ebay.co.uk/itm/125KHz-Waterp ... 2749.l2649


And these tags:

http://www.ebay.co.uk/itm/10pcs-125khz- ... 2749.l2649


Here’s how to connect the reader to the Pi. You need a voltage divider because the Wiegand output voltage is too high for the Pi GPIO inputs. Bear in mind that the cable colours are different, and you don’t need the LED:

https://github.com/leosac/leosac/wiki/R ... ep-by-step

It’s only an approximate guide - the author hasn’t finished it - but it should be enough. If you have any problems give me a shout.


Then install the PIGPIO library onto the Pi:

http://abyz.co.uk/rpi/pigpio/index.html


Here’s the Pi Python script to read the tag:

https://www.dropbox.com/s/78kady4th1b8j ... y.zip?dl=1

(You’ll need to modify a couple of things towards the bottom of the script; see comments.)


Put the following lines into Pi /etc/rc.local just before 'exit 0' to keep things running after a reboot:

sudo pigpiod
sudo python /root/wiegand.py &

When you’ve done all this you should be able to tap a tag against the reader and have its number show up on Indigo.

Good luck!

Posted on
Mon Jul 03, 2017 7:34 am
Different Computers offline
User avatar
Posts: 1943
Joined: Jan 02, 2016
Location: East Coast

Re: Integrating a Wiegand Tag Reader with Indigo

Could you show us the deadbolt setup too? Real novice here when it comes to those.

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Mon Jul 03, 2017 9:08 am
racarter online
User avatar
Posts: 237
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Integrating a Wiegand Tag Reader with Indigo

@Different Computers

It's one of these:

http://www.onlinesecurityproducts.co.uk ... locks.html

It needs 12v DC to operate, and there's a 12v 'Unlock' signal to release the bolt. There's a sensor in the lock which detects that the gate/door has been opened, which causes the gate to lock again when closed (assuming the 'Unlock' signal is not present).

I use one of these:

http://www.vesternet.com/z-wave-fibaro- ... tch-2-gen5

to switch power and 'Unlock' via Indigo. To lock (if unlocked), apply power. To unlock, apply power and 'Unlock'. Once lock is in required state you can remove power if required; the lock will stay in the last state it was powered to. I have a sensor on the gate too, and have Indigo switch on the power when the gate is opened manually so that it auto-locks when closed.

It's not super-secure, but it does what I want. (People could climb over the gate or fence if they REALLY wanted to get into the garden!)

Any further questions, give me a shout.

Alan

Posted on
Mon Jul 03, 2017 11:22 am
Different Computers offline
User avatar
Posts: 1943
Joined: Jan 02, 2016
Location: East Coast

Re: Integrating a Wiegand Tag Reader with Indigo

Very helpful, thanks!

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Tue Oct 15, 2019 5:45 am
siclark offline
Posts: 1032
Joined: Jun 13, 2017
Location: UK

Re: Integrating a Wiegand Tag Reader with Indigo

Hi Alan,

Should have known I should just ask you first! I have been looking to see how to add an external keypad to my texecom to unlock the side gate. Unlike you I have the texecom control the gate via the panel output, but controlled via Indigo thanks to your plugin. I have come across the fact that the texecom Prox can have a wiegand reader so was looking to get one of those along with the wiegand reader, but now seen I could do it a potentially cheaper way.

Could you send me the details for the Pi setup please, and what was the keypad you bought? Is it going strong still? There seems to be generic Chinese ones on amazon/ebay for £30 or proper ones at £70-120 on security supply sites. Trying to decide what to go for.

Simon

Posted on
Tue Oct 15, 2019 6:06 am
racarter online
User avatar
Posts: 237
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Integrating a Wiegand Tag Reader with Indigo

Hi Simon

I didn't use a keypad; I used one of these:

https://www.ebay.co.uk/itm/125khz-Grey-Black-Plastic-EM-ID-Wiegand-26-Wired-RFID-Proximity-Card-Reader-UK/262199467293?epid=5007455945&hash=item3d0c4e5d1d:g:O8YAAOSwm79dLX0c

with these:

https://www.ebay.co.uk/itm/10Pcs-Tk4100-Keychains-125Khz-Rfid-Proximity-Id-Card-Token-Tags-Key-Fobs-IYNFK/123916961993?hash=item1cda06c8c9:g:ahEAAOSw4m9cCjsT

When a tag is presented to the reader it outputs a Wiegand signal to the Pi Zero W and the signal is decoded using a Pi Python package available online. A simple Python script sends the tag ID to an Indigo variable. A standard Indigo trigger then runs a Python script which compares the tag ID to a list of permitted ones and unlocks the gate if a match is found.

If you're interested in trying this instead of a keypad I'd be happy to share more details.

Best regards

Alan

Posted on
Tue Oct 15, 2019 7:09 am
siclark offline
Posts: 1032
Joined: Jun 13, 2017
Location: UK

Re: Integrating a Wiegand Tag Reader with Indigo

Ah ok. Yeah, I really need a keypad. I think the python package you use woul work for a keypad, but then its probably more complicated to get that number that is entered into Indigo, ie when does the number finish being entered.... However if I could make a trigger to compare the pin entered to a variable, and then open if matches, I could setup user codes from my phone!

Maybe I go with the texecom route instead. £60 for their prox reader then plug the keypad into that. Zero programing involved and can setup codes via wintex.

Posted on
Tue Oct 15, 2019 7:26 am
racarter online
User avatar
Posts: 237
Joined: Jun 18, 2016
Location: North Yorkshire, UK

Re: Integrating a Wiegand Tag Reader with Indigo

Some keypads have an Enter key. Presumably you enter the number then press Enter?

Anyhow, I've just ordered a weatherproof keypad/tag reader on eBay for a tenner. Just to play with, you understand... :lol:

Posted on
Tue Oct 15, 2019 8:03 am
siclark offline
Posts: 1032
Joined: Jun 13, 2017
Location: UK

Re: Integrating a Wiegand Tag Reader with Indigo

Haha... let me know how it goes.

Posted on
Tue Oct 15, 2019 8:11 am
siclark offline
Posts: 1032
Joined: Jun 13, 2017
Location: UK

Re: Integrating a Wiegand Tag Reader with Indigo

There are the £10 versions... then there is this!

http://www.eholovision.com/products/model-538/

Gate control via indigo/texecom and camera footage via security spy of my car and front of house, in one stylish package. Doubt I could afford it though even if they did ship to the UK.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests