dwyl / smart-home-security-system

Smart Home Security System
GNU General Public License v2.0
4 stars 2 forks source link

Why? What? How? #1

Open nelsonic opened 4 years ago

nelsonic commented 4 years ago

Why?

We are building our own smart home security system - starting with the door entry/access control system - because we want full transparency of the system. We don't want to use a closed-source (security by obscurity) system where we are beholden to a fly-by-night developer using insecure protocols or worse a mega company tracking our whereabouts.

What?

The first piece of the puzzle in our smart home security system is the door-entry (access control).

The secure entry system is based on commodity hardware:

  1. NFC Reader - Todo: research reliable NFC Readers e.g: https://www.amazon.co.uk/dp/B075HQR6MY
  2. Raspberry Pi - Any recent model
  3. Electric Strike - #15

We will have two levels of secure access.

1. "Low Stakes" Access

For low-stakes access to internal doors we assume the person has already verified their device at the external door so we do not need to send them a push notification.

image

2. High Stakes Access

For external entry into the building, we will send the person a push notification to confirm that they have the device in their possession. This is because it's possible to clone an NFC tag so we cannot rely on the tag being "real" for high-security access. see: https://medium.com/insidersec0x42/how-i-finally-managed-to-clone-a-nfc-tag-4a9f64ef49c5

image

View/Edit this diagram: https://docs.google.com/presentation/d/1Q8CekKPniStTpwOm2O1za3yCB7hGMAujfxQZRJvhGYQ

How?

We need to purchase and setup an NFC reader in order to get this work started.

Todo

nelsonic commented 4 years ago

This PN532 NFC HAT for Raspberry Pi could be an option when we deploy the system as it will reduce complexity. https://www.banggood.com/PN532-NFC-HAT-for-Raspberry-Pi-I2C-or-SPI-or-UART-Interfaces-p-1678642.html image The only downside of "Banggood" is that delivery can take 14+ days. ⏳

Watch this overview video: https://youtu.be/kbt4LFZptPk

nelsonic commented 4 years ago

https://www.ebay.co.uk/itm/PN532-NFC-Precise-RFID-IC-Card-Reader-Module-Raspberry-PI/381374529898 image Still comes from China so still need to keep looking for dev.

th0mas commented 4 years ago

Amazon has a similar board in stock here: https://www.amazon.co.uk/Youmile-13-56MHz-Development-Compatible-Raspberry/dp/B07XLKTVN7/

nelsonic commented 4 years ago

@th0mas yeah, that looks like a good dev board based on PN532image

Seems like reviewer "D" was expecting something plug-and-play: image That isn't suggested/implied by the product listing. 🙄

If you are happy to do a bit of digging into the documentation for the board (and write up your findings on GitHub), 📝 then we're happy to move forward with ordering it. 👍 Please see the welcome email I sent you. Once we have your address we will add you to our company Amazon account and get this board sent to you today.

th0mas commented 4 years ago

The board seems to be a rebranded ITEAD PN532 NFC MODULE. They've written up some documentation on using it with a Raspberry Pi:

Once setup, the reviews on the company website seem to suggest once wired up correctly it works perfectly with the standard libnfc

In terms of extra connectors, some jumper wires and a breadboard would be needed to connect to the pi as well, and make development easier.

th0mas commented 4 years ago

Making life easier, there's already an Elixir/Nerves library for interacting with the PN532: https://github.com/jmerriweather/nerves_io_pn532

This seems to be pure Elixir, and very macro heavy but could work well for our use case.

Theres another library: https://github.com/arjan/nerves_io_nfc This seems to be more limited, but delegates communication with the NFC module to libnfc, so it could be worth looking at expanding this

nelsonic commented 4 years ago

Do you think it's worth ordering that ribbon cable: from the itead.cc link you shared? ribbon

Or are you happy to wire it up using a breadboard? breadboard

Annoyingly, the cheaper price is for dispatch from China. So the item will only arrive towards the end of July. ⏳ delivery

Happy to spend an extra £4~ to get it fulfilled by AMZN and delivered this week. 👍

th0mas commented 4 years ago

Very happy to wire it up over a breadboard. It seems simple enough and will allow for more expandability in future

nelsonic commented 4 years ago

Cool. breadboard and wires included in your Amazon order along with Raspberry Pi 4 Starter kit and NFC reader. 📦