{"id":18691071,"url":"https://github.com/ffissore/badger","last_synced_at":"2025-11-08T09:30:29.818Z","repository":{"id":26430524,"uuid":"29881044","full_name":"ffissore/badger","owner":"ffissore","description":"An RFID tracker made with Arduino","archived":false,"fork":false,"pushed_at":"2015-06-03T10:55:43.000Z","size":1152,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-28T02:43:38.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ffissore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-26T20:52:26.000Z","updated_at":"2022-06-08T12:11:56.000Z","dependencies_parsed_at":"2022-08-29T06:00:50.416Z","dependency_job_id":null,"html_url":"https://github.com/ffissore/badger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffissore%2Fbadger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffissore%2Fbadger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffissore%2Fbadger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffissore%2Fbadger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ffissore","download_url":"https://codeload.github.com/ffissore/badger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239550272,"owners_count":19657541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T10:53:10.151Z","updated_at":"2025-11-08T09:30:29.725Z","avatar_url":"https://github.com/ffissore.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BADGER\n\nBadger is a badge (RFID) reader application built with the Arduino Yun and the Adafruit NFC Shield.\n\nIt was made to track employees entraces and exits.\n\nEvery time a known badge makes the Badger bip, its number and associated description/name are added to a local storage \nof logged badges. Every 10 minutes this storage is backupped to a configured Google Spreadsheet.\n\nThis way, once set up, you can forget about the Badger and give access to that Google Spreadsheet to someone of the HR office.\n\n# SETUP\n\nEnsure you're running the latest and greatest OS version for your Yun: http://www.arduino.cc/en/Main/Software#other\n\nConnect your Yun to your network using an ethernet cable: replace IP_ADDRESS below with the actual IP of your Yun.\n\nFrom a terminal, run the following command\n\n`scp -r yun/* root@IP_ADDRESS:/`\n\nSSH into the Yun and run:\n\n```bash\nopkg update\n#install additional packages\nopkg install python-sqlite3 sqlite3-cli python-openssl python-expat lsqlite3\ncd /tmp\nwget --no-check-certificate https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/oldpackages/python-crypto_2.6-1_ar71xx.ipk\nopkg install python-crypto_2.6-1_ar71xx.ipk\ncd -\n#resets the 32u4 at the end of the boot\nsed -i 's/#reset-mcu/reset-mcu/g' /etc/rc.local\n#precompile python code for a faster start up\npython -OO -m py_compile *.py gspread/*.py oauth2client/*.py httplib2/*.py\n#synchronize google spreadsheet every 10 minutes\necho '*/10 * * * * /root/sync' \u003e /etc/crontabs/root\n```\n\nIn order to add additional security, please run the following commands as well:\n\n```bash\n#stop the webserver from listening to port 80: port 443 (https) remains active\nsed -i 's/\\tlist listen_http\\t0.0.0.0:80/#\\tlist listen_http\\t0.0.0.0:80/g' /etc/config/uhttpd\n#disables wifi: too easy to crack\nuci set wireless.radio0.disabled=1\nuci commit\n#having disabled wifi, there's no need to check if it's working\nsed -i 's/wifi-live-or-reset/#wifi-live-or-reset/g' /etc/rc.local\n```\n\n# CREATING A GOOGLE API KEY\n\nIn order to give your Badger access to your spreadsheet, you need to create a `client_email` + `private_key` pair. \nFollow [the instructions](http://gspread.readthedocs.org/en/latest/oauth2.html) until you download a `.json` file. Open that `.json` file \nand collect `client_email` and `private_key` keys values.\n\n# CONFIGURATION\n\nAccess your Yun web panel, click \"Configure\", click \"advanced control panel\", click on the \"Badger\" tab.\n\nConfigure the Badger by specifying the title of the Google Spreadsheet, and `client_email` and `private_key` previously set up.\n\nFill the badges database: add RFIDs and associate a description/name to each of them.\n\n# FINAL TEST\n\nPut one of the badges near the Badger.\n\nWhen everything goes well, the GREEN led blinks and then stays lit for a second: a short beep is heard.\n\nWhen there's something wrong, the GREEN led blinks and then the RED led lits for a couple of seconds: a long beep is heard. \nTwo possible problems may be the cause: the badge was unknown or the disk space of the Yun is full. In the latter case, \nmove the database to an uSD card and modify the python code accordingly.\n\n# UPGRADING FROM VERSION 1.0.0\n\nCreate a Google API key (see previous paragraph)\n\nCopy all the files\n\n`scp -r yun/* root@IP_ADDRESS:/`\n\nInstall an additional package:\n\n```bash\ncd /tmp\nwget --no-check-certificate https://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/oldpackages/python-crypto_2.6-1_ar71xx.ipk\nopkg install python-crypto_2.6-1_ar71xx.ipk\ncd -\n```\n\nRecompile python scripts:\n\n`python -OO -m py_compile *.py gspread/*.py oauth2client/*.py httplib2/*.py`\n\nAccess webpanel and configure Badger using the information contained in the `.json` file downloaded when you created a Google API key\n\n# CREDITS\n\nThis project was *inspired* by [FablabDoorman](https://github.com/FablabTorino/FablabDoorman). Thanks to @Fede85 and the guys at [FabLab Torino](http://fablabtorino.org/) for their awesome work!\n\n# LICENSE\n\nBadger, an RFID tracker made with Arduino\nCopyright (C) 2015 Federico Fissore\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffissore%2Fbadger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fffissore%2Fbadger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffissore%2Fbadger/lists"}