Announcement

Collapse
No announcement yet.

Suggestion please: Interfacing an external security keypad.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Suggestion please: Interfacing an external security keypad.

    Hi everyone,

    Described below is something I've wanted to achieve with Homeseer since I first started with it:


    Have an external keypad, weatherproof, wall mounted beside my front door. The keypad does not rely on batteries, it is wired to a power supply through the wall.

    When the right security code is entered, an electronic strike on the door is released/opened. The strike also does not rely on batteries, it is mains powered.

    Multiple codes can co-exist for different family members. Logging of which code was used when achievale through device history.

    HomeSeer is the heart of the operation, the decision on whether or not to release the strike based on correct code happens in homeseer.



    The strike/door part is simple enough. EnigmaTheatre's excellent Arduino plugin makes this possible through use of an Arduino output wired to a relay, which is inline to the strike power supply.

    The logic behind whether to open the door also seems achievable enough with homeseer events. Entered keypad codes should write to a virtual device, when the virtual device's value changes, this triggers a branching event that checks the new device value against multiple codes to find a match.


    What I can't see how to achieve, and what I need peoples advice on, is how to interface the keypad and get it writing values into HomeSeer.

    Initially I saw the Popp Z-wave keypad. But it was European frequency only (I use a US frequency SmartStick). Popp was bought by Aeotec but there has been no news from either company in quite some time.
    DanaLock also looked promising with their DanaPad accessory. Initially the company assured me via email that the DanaPad would be releasing with a Z-wave interface option. But it has been on the market ~6 months now and Bluetooth remains the only option.

    Further, after living with an increasing amount of z-wave and zigbee devices over the last year, I've come to deeply dislike anything battery powered. I would like to stick with hardwired/mains powered where ever possible and "always on/always listening" devices.

    Plenty of affordable outdoor keypads exist with a "standard" Wiegand output, you can buy such things on eBay for ~$20-$35. But how to interface the Wiegand output of the keypad into HomeSeer? I don't know of any plugin that would facilitate this.

    Converters exist that can convert Wiegand to USB/RS232 or TCP/IP. The RS232/USB converters are the cheaper option at around $15-$20 each. But as I understand it, their output would be received as ASCII characters on a COM port. Which plugin could listen for this signalling and write it into a device value? Hash/pound key could be used for EOL signalling maybe?

    An excessive solution might be to buy one of the many home security panels for which plugins already exist, and maybe pull entered keypad codes from that communication? But I suspect that would be a fairly expensive solution to achieve a single desired result.


    So, genius members of the HomeSeer community, please lend me your suggestions!

  • #2
    You mentioned :

    Originally posted by Fellhahn View Post
    Hi everyone,

    Converters exist that can convert Wiegand to USB/RS232 or TCP/IP. The RS232/USB converters are the cheaper option at around $15-$20 each. But as I understand it, their output would be received as ASCII characters on a COM port. Which plugin could listen for this signalling and write it into a device value? Hash/pound key could be used for EOL signalling maybe?

    How would "Enable control using ASCII commands" in the setting help you in achieving this?
    And there is also this option :https://www.amazon.co.uk/YAVIS-Stand...%2C321&sr=8-30



    Eman.
    The Closer.

    Comment


    • #3
      Originally posted by Fellhahn View Post
      .
      The strike/door part is simple enough. EnigmaTheatre's excellent Arduino plugin makes this possible through use of an Arduino output wired to a relay, which is inline to the strike power supply.
      Do you have access to change the Arduino code which triggers the relay? If so, add logic to perform a http json call to HS setting the appropriate HS device value.

      Comment


      • #4
        Originally posted by Fellhahn View Post
        Hi everyone,


        Converters exist that can convert Wiegand to USB/RS232 or TCP/IP. The RS232/USB converters are the cheaper option at around $15-$20 each. But as I understand it, their output would be received as ASCII characters on a COM port. Which plugin could listen for this signalling and write it into a device value? Hash/pound key could be used for EOL signalling maybe?
        Try Big5 plug-in. It supports TCP, HTTP, RS232, MQTT - your choice and it will import values into HS3 devices automatically. In addition to that Big5 supports messaging. You can set it up to text you each time someone activates the lock.

        Comment


        • #5
          Originally posted by risquare View Post

          Try Big5 plug-in. It supports TCP, HTTP, RS232, MQTT - your choice and it will import values into HS3 devices automatically. In addition to that Big5 supports messaging. You can set it up to text you each time someone activates the lock.
          Aargh, I'd totally forgotten about Big5! I was scrolling through the lists of plugins under section like "Analog and Digital" and "Utilities". Totally missed it because it's listed under "Lighting and Primary Technology".

          Reading some of the support documentation and examples, looks like an RS232 profile might do what I want. Time to buy some keypads and find out.

          Comment


          • #6
            Fellhahn , this is exciting! I think your project is very closely aligned with one of my own. And if I read your initial post correctly (not something I always do very well), what you have done complements very nicely my own work.

            I purchased a couple of these weatherproof keypads ($31.95 each):
            https://www.amazon.com/TIVDIO-Contro...FN8Z0HX0H0TYJZ

            The keypads include capability to read RFID cards if you buy the right kind. I purchased 100 of these ($21.99):
            https://www.amazon.com/SainSmart-Con...KCJ3TR0MHHR9ZN

            Although I have the Arduino plug-in and an Arduino board with Ethernet hat, I have not yet got around to doing the hardware interface. Here's what I have done:

            I have written Arduino code to read a single number, expressed as a string of digits punched into the keypad. That number is intended to be sent to HS3 as a single device input value, courtesy of the Arduino plug-in.

            The Arduino app converts individual digits entered on the keypad to the binary equivalent of an unsigned decimal number on the fly. So, press the "6" key, and your value is 6. If you then press the 7 key, your value is 67. The code will accept as many key entries as you wish, provided only that the accumulated value is less than 2**32. When you have finished entering your number, you press the "#" key, and the accumulated number -- from 1 to 9 digits -- is sent to the HS3 variable via the Arduino input plug-in. Since I haven't yet written the plug-in interface code, what I have just displays the number that was entered on the keypad.

            If the keypad user enters an incorrect digit, the "*" key can be used to erase the bad digit.

            I have verified that the above RFID cards are compatible with the above listed keypad. Each keycard in the pack of 100 comes with its own prerecorded unique number The code I have written will read any of these cards that is waved in front of the keypad, and the code will be converted to a single unsigned integer. I have the RFID code working, also. But as with manual keypad entry, for now, the number is just displayed by the Arduino UI. What's needed is transfer of the single number (manually entered or RFID) from the Arduino to the Arduino plug-in's HS3 device.

            Here's why I like the architecture I have chosen:
            • For any manual or RFID keypad entry, the Arduino does most of the key processing. Only a single number needs to be sent to HS3 -- no ASCII or any other serial transmission.
            • Manual and RFID entry are fully compatible with each other. You can use either, or both dynamically.
            • My concept locates the Arduino near an Ethernet access point (wired or wireless), which in my case is next to my security panel. Power for the Arduino comes from 12 VDC provided by the security panel. A single Cat-5 cable connects (keypad power and Weigand signal) the Arduino to the keypad installed at my entry door.
            • I can issue RFID cards to housekeepers, gardeners, etc. With trivial effort, HS3 thus becomes a time clock for hourly workers.
            • The Arduino hardware does enough computation to protect the rest of the system from unnecessary overhead.
            • You can define more than a billion code values, to be used in HS3 for whatever you like. Some deadbolt locks have inputs of just 4 digits, and sometimes 1 button supports 2 digits, so the number of possible codes could be as little as 5**4 = 625. My Schlage locks have 10 entry digit buttons, with a choice of either 4 or 6 digit input, so they can support up to 10**6 = 1,000,000 codes. But you are stuck with your 4/6 choice.
            • If you want to reassign the relationship between any particular code(s) and your HS3 events, it is all done within the HS3 event suite -- just test for a different device value.
            • Because there is such a broad range of codes available, it's quite practical to define code ranges or masking algorithms to isolate groups of code entries to functional categories.
            • Presumably, the keypad and the striker Fellhahn has chosen are co-located. If so, spare wires in the single Cat-5 cable could carry the unlock command, which would be issued, as he has indicated, by Arduino output.
            The code I have written is available for free to anyone who wants it. I do, however, make a single request:
            If you implement the interface that moves the computed integer to an HS3 device, please share your work with me and anyone else who wants it. Or, if you wait awhile, one day I'll finish it myself.

            Comment


            • #7
              Hi ericg , glad to know I'm not the only one with this goal

              I have literally just ordered the following items.

              External (weatherproof) Wiegand security keypad:

              https://www.aliexpress.com/item/3280...1a526048kpKVF5

              And a Wiegand to USB serial conversion module:

              https://www.aliexpress.com/item/3291...chweb201603_55


              Your goals around capturing the number entered via Arduino input and sending it to HomeSeer was exactly my first thought about how this should be achieved. However like yourself I've seen no way as yet to get the entered pin from Arduino -> HomeSeer. I'll be watching your posts now to see how you progress.

              At this stage my intention is to use the Big5 plugin capturing RS232 input from a virtual COM port as suggested by risquare .

              The ordered items will take as long as ~3 weeks to arrive . When they do I will post an update here with results. If everything works as intended I will publish a complete how-to in a separate post.

              Comment


              • #8
                Fellhahn and @ericg

                I've used the arduino plugin with the custom api. I have 9 nodeMCUs with sensors that have been running for well over a year. It works. However, since the arduino plugin was developed, it is now much easier for the arduino to use MQTT to send to HS3. For the arduino, there is a nice MQTT library that is simple to use. There are a couple of plugins that will receive the MQTT messages and do various things. For sure taking a value and putting it into a device should be trivial. Big 5 and mcsMQTT come to mind.

                That change in architecture might simplify things for you.

                Comment


                • #9
                  Originally posted by logbuilder View Post
                  Fellhahn and @ericg

                  I've used the arduino plugin with the custom api. I have 9 nodeMCUs with sensors that have been running for well over a year. It works. However, since the arduino plugin was developed, it is now much easier for the arduino to use MQTT to send to HS3. For the arduino, there is a nice MQTT library that is simple to use. There are a couple of plugins that will receive the MQTT messages and do various things. For sure taking a value and putting it into a device should be trivial. Big 5 and mcsMQTT come to mind.

                  That change in architecture might simplify things for you.
                  Now we're talking.

                  In theory, if already using enigmatheatre arduino plugin, it should be possible to add the MQTT library/code as additional in the sketch, and have the arduino perform both functions?

                  Comment


                  • #10
                    It's all good until you have a power cut or if HomeSeer is not responding! But using a standalone unit like ZKTecho you can still tap into it just to just let HomeSeer know about status only which of course you can do with the one you're working on.


                    Eman
                    The Closer.

                    Comment


                    • #11
                      A big part of why I'm keen on strikes instead of flashy consumer crap like August etc, is that it makes it easy to retain the use of physical keys as a backup. And you maintain choice in the look of your door hardware.

                      And as an additional, I haven't had HomeSeer fail on my yet, very impressed with its stability. VM it's in runs on proper server hardware, decent commercial UPS, dedicated circuit for the server stack from the switch board.

                      Comment


                      • #12
                        Originally posted by Fellhahn View Post

                        Now we're talking.

                        In theory, if already using enigmatheatre arduino plugin, it should be possible to add the MQTT library/code as additional in the sketch, and have the arduino perform both functions?
                        Yes, you should be able to do that. When I installed the MQTT library in the IDE, it also installed some samples. In those you get all you need in terms of using MQTT. It would be trivial to add those to the base arduino PI sketch. The mcsMQTT plugin will do what you want as far as getting values into devices. It is free and the author is responsive to questions or problems. Big 5 is surely good too, I just haven't looked at it.



                        Comment


                        • #13
                          Update: I received the the keypad and converter in the mail.

                          When using an RFID tag, the setup works as expected. Running a Putty session listening on the USB TTY port, badged RFID tags are read out as ASCII in the terminal window, complete with EOL.

                          It does NOT work for pin codes. I don't know if this is a limitation of the particular pin pad I purchased or if it's expected behaviour for Wiegand devices. Only the # and * keys work, operating as EOL. Entering numbers gives no output in the terminal.

                          The pin pad has to be put into "card reader" mode for anything to be sent on the D0/D1 pair. And it seems like individual pins are completely disabled in this mode.

                          I have not proceeded to testing with Big5 as I can't get the terminal output I need yet and I don't want to waste my trial.

                          Comment


                          • #14
                            Tagging ericg

                            Update 2:

                            Great success. Tonight I received some of the best customer support I've ever seen. As a last ditch I messaged the makers of the Wiegand/USB converter, explaining the problem. Even though I knew the issue was with the keypad, which isn't their product.

                            They confirmed the issue was the keypad sending 8bit numerals rather than 26 bit Wiegand blocks.

                            Then they contacted their engineer and had him/her tweak the device firmware to solve the issue. I had the new firmware within hours, they literally wrote it today. I was honestly blown away.

                            Anyway the setup now works exactly as desired. I can badge an RFID tag and get an 8 digit ID on the COM port with EOL signal.
                            I can also enter a pin, of any length I want, and have it sent to the COM line once # is pressed. Digits don't appear one at a time, the converter builds them into a string and waits for the # key before sending.

                            Here's a video of it working:

                            https://youtu.be/agG48J-_t4Y

                            Next step is to configure Big5 to read the serial input and write it to a virtual device. Hopefully an easy task. This will open up a lot of possibilities as I plan to use different pin codes for different functions around the yard. Open the gate, open the garage, turn yard lights on/off, put security cameras into privacy mode etc.

                            It's late Friday evening here and my wife and I are going away tomorrow. But hopefully I'll be able to report a rough working setup by Sunday or Monday evening.

                            Comment

                            Working...
                            X