GithubHelp home page GithubHelp logo

rfid-poc's Introduction

Description

This is a sample script reading the input from an USB RFID reader connected to a Raspberry Pi to trigger on/off commands controlling a LED light bulb.

The RFID used is a RFIDeas pcProx 125 kHz which basically simulates keyboard input.

The python script uses evdev to read the input and make a POST request to a controller server that manages the light bulbs.

Documentation

Once you plug the RFID reader to the Pi's USB, if you run the lsusb command it should be listed there:

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 005: ID 0c27:3bfa RFIDeas, Inc pcProx Card Reader

Once your device is recognized, you can run the script:

$ sudo python rfid_light.py -o 2714

The -o option is the RFID card number that will be used to trigger the on command. Any other value will trigger the off command. Simple as that.

Config

[auth]
uuid: '3444d6844dd36514dd44411455cfb596'
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'

[requests]
uri = '/command/'
host = 'myserver.com'
url_template = 'http://%s%s%s'

rfid-poc's People

Contributors

goliatone avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.