現場 · 業務自動化
NFC Attendance System
カードをかざすだけで打刻が完結。Raspberry Pi 2 と 100円の NFC カードで作った 勤怠管理システム。Google スプレッドシートへ自動同期し、給与計算まで自動化する。
Raspberry Pi 2 Python PCSC GAS Discord Webhook systemd
Demo
カードをタッチして打刻をシミュレートできます。IN → OUT → IN と交互に切り替わります。
勤怠 · キオスク --:--
# attendance-log
給与計算シート
| 氏名 | IN | OUT | 勤務時間 | 給与 |
|---|
⚡ デバウンス5分。二重打刻を自動で無視。
⏱ 15時間タイムアウトで退勤漏れを検知。
¥ 5分単位で丸め、時給から給与を自動計算。
↻ 毎日定時にGASへ同期、Sheetsが更新される。
NFC カードをタッチ
Architecture
[NFC Card] → [Sony RC-S300] → [Pi 2 / Linux PC]
│
attendance_reader.py (PCSC · state machine)
│
┌─────────────────┴──────────────────┐
attendance_discord.py attendance_payroll.py
(tail events → Discord) (daily cron → GAS)
│ │
[Discord Webhook] [Google Sheets]
[Kiosk Display] [給与自動計算] Stack
Edge
Raspberry Pi 2
Sony RC-S300 / PCSC
Logic
Python 3.11+
stdlib only · no pip
State
State machine
debounce · timeout · rollover
Backend
Google Apps Script
Spreadsheet sync
Notify
Discord Webhook
Kiosk display
Infra
systemd user
3 services + timer