syofyanzuhad/filament-zkteco-adms
Composer 安装命令:
composer require syofyanzuhad/filament-zkteco-adms
包简介
Package to receive data from zkteco device through adms
README 文档
README
A Filament plugin to receive attendance data from ZKTeco devices via ADMS (Automatic Data Master Server) protocol. This package provides ADMS endpoints, database storage, and a complete Filament admin interface for managing devices and attendance logs.
Version Compatibility
| Package Version | Filament | Laravel | PHP |
|---|---|---|---|
^2.0 |
^4.0 |
^11.0 | ^12.0 |
^8.2 |
^1.0 |
^3.0 |
^10.0 | ^11.0 |
^8.2 |
Features
- ADMS protocol endpoints (
/iclock/cdata,/iclock/getrequest,/iclock/devicecmd) - Automatic device registration
- Attendance log storage with user sync
- Device command queue (reboot, clear logs, sync users)
- Full Filament admin panel integration
- Configurable table prefixes and route settings
- Event dispatching for real-time integrations
Installation
For Filament 4.x:
composer require syofyanzuhad/filament-zkteco-adms:^2.0
For Filament 3.x:
composer require syofyanzuhad/filament-zkteco-adms:^1.0
Publish and run the migrations:
php artisan vendor:publish --tag="filament-zkteco-adms-migrations"
php artisan migrate
Optionally, publish the config file:
php artisan vendor:publish --tag="filament-zkteco-adms-config"
Usage
1. Register the Plugin
Add the plugin to your Filament panel provider:
// app/Providers/Filament/AdminPanelProvider.php use Syofyanzuhad\FilamentZktecoAdms\FilamentZktecoAdmsPlugin; public function panel(Panel $panel): Panel { return $panel // ... ->plugin(FilamentZktecoAdmsPlugin::make()); }
You can selectively disable resources:
->plugin( FilamentZktecoAdmsPlugin::make() ->deviceResource() ->attendanceLogResource() ->userResource(false) // Disable user resource ->commandResource(false) // Disable command resource )
2. Configure Your ZKTeco Device
On your ZKTeco device, configure the ADMS settings:
- Go to COMM > Cloud Server Setting (or ADMS)
- Set Server Address:
your-domain.comor IP address - Set Server Port:
80(or your app's port) - Enable Domain Name if using a domain
- The device will connect to
/iclock/cdata
3. Available Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/iclock/cdata |
GET, POST | Device registration & data submission |
/iclock/getrequest |
GET | Device fetches pending commands |
/iclock/devicecmd |
GET, POST | Command acknowledgment |
/iclock/test |
GET, POST | Connection test |
4. Filament Admin Panel
The plugin adds four resources to your Filament panel:
- Devices - View and manage connected ZKTeco devices
- Attendance Logs - View attendance records with filters
- ZKTeco Users - View synced users from devices
- Device Commands - View and manage command queue
5. Sending Commands to Devices
You can send commands to devices programmatically:
use Syofyanzuhad\FilamentZktecoAdms\Models\Device; use Syofyanzuhad\FilamentZktecoAdms\Services\DeviceCommandBuilder; $device = Device::where('serial_number', 'ABC123')->first(); $commandBuilder = app(DeviceCommandBuilder::class); // Reboot device $commandBuilder->reboot($device); // Clear attendance logs on device $commandBuilder->clearAttendanceLogs($device); // Get device info $commandBuilder->info($device); // Add user to device $commandBuilder->addUser($device, [ 'pin' => '1', 'name' => 'John Doe', 'card' => '12345678', 'privilege' => 0, // 0 = user, 14 = admin ]); // Delete user from device $commandBuilder->deleteUser($device, '1'); // Sync time $commandBuilder->syncTime($device);
6. Listening to Events
The package dispatches events that you can listen to:
// app/Providers/EventServiceProvider.php protected $listen = [ \Syofyanzuhad\FilamentZktecoAdms\Events\AttendanceReceived::class => [ \App\Listeners\ProcessAttendance::class, ], \Syofyanzuhad\FilamentZktecoAdms\Events\DeviceConnected::class => [ \App\Listeners\OnDeviceConnected::class, ], \Syofyanzuhad\FilamentZktecoAdms\Events\UserSynced::class => [ \App\Listeners\OnUserSynced::class, ], ];
Example listener:
// app/Listeners/ProcessAttendance.php namespace App\Listeners; use Syofyanzuhad\FilamentZktecoAdms\Events\AttendanceReceived; class ProcessAttendance { public function handle(AttendanceReceived $event): void { $log = $event->attendanceLog; $device = $event->device; // Process attendance... // e.g., sync to HR system, send notification, etc. } }
Configuration
// config/zkteco-adms.php return [ // Database table prefix 'table_prefix' => env('ZKTECO_TABLE_PREFIX', 'zkteco_'), // Route configuration 'routes' => [ 'prefix' => env('ZKTECO_ROUTE_PREFIX', 'iclock'), 'middleware' => ['api'], 'domain' => env('ZKTECO_ROUTE_DOMAIN', null), ], // Device settings 'device' => [ 'auto_register' => env('ZKTECO_AUTO_REGISTER_DEVICES', true), 'offline_threshold_minutes' => env('ZKTECO_OFFLINE_THRESHOLD', 10), ], // Event dispatching 'events' => [ 'dispatch_attendance_received' => true, 'dispatch_device_connected' => true, 'dispatch_user_synced' => true, ], // Filament navigation 'filament' => [ 'navigation_group' => 'ZKTeco ADMS', 'navigation_icon' => 'heroicon-o-finger-print', 'navigation_sort' => 50, ], ];
Customizing Models
You can extend the default models by updating the config:
// config/zkteco-adms.php 'models' => [ 'device' => \App\Models\CustomDevice::class, 'attendance_log' => \App\Models\CustomAttendanceLog::class, 'user' => \App\Models\CustomZktecoUser::class, 'device_command' => \App\Models\CustomDeviceCommand::class, ],
Testing
composer test
Screenshots
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
syofyanzuhad/filament-zkteco-adms 适用场景与选型建议
syofyanzuhad/filament-zkteco-adms 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 60 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 12 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「syofyanzuhad」 「filament-zkteco-adms」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 syofyanzuhad/filament-zkteco-adms 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 syofyanzuhad/filament-zkteco-adms 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 syofyanzuhad/filament-zkteco-adms 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Alfabank REST API integration
A conversational chatbot flow builder plugin for Filament v3 with conditional logic and floating chat widget
Laravel package for Accurate Online API integration.
Shared RCX Laravel DataTables UI and configuration helpers.
Boot a Laravel project on any machine with one command: app:serve installs missing tools (PHP, Node, Composer, Herd, Docker), creates .env, sets up the database, runs migrations, builds assets, starts a queue worker and serves via Herd, Sail or artisan serve; app:down cleanly stops everything it sta
Branded, diagnostic error pages (500, 403, 404, 419, 503) for Filament — native Filament UI, dark mode and translations out of the box.
统计信息
- 总下载量: 60
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-30