mm28ajos/php-reolink-camera-api
Composer 安装命令:
composer require mm28ajos/php-reolink-camera-api
包简介
A minimal PHP API for Reolink cameras.
README 文档
README
A PHP class which provides access to Reolink's IP cameras.
This class can be installed manually or using composer/packagist for easy inclusion in your projects.
Requirements
- a Reolink camera (tested with RLC-420-5MP, Build No. build 19061408, Hardware No. IPC_51516M5M, Configuration Version v2.0.0.0, Firmware Version v2.0.0.448_19061408)
- a web server with PHP installed (tested with PHP cli Version 7.3.11-1~deb10u1)
- network connectivity between this web server and the camera and port (normally TCP port 80)
Installation
You can use Composer, Git or simply Download the Release to install the API client class.
Composer
The preferred method is via composer. Follow the installation instructions if you do not already have composer installed.
Once composer is installed, simply execute this command from the shell in your project directory:
composer require mm28ajos/php-reolink-camera-api
Or you can manually add the package to your composer.json file:
{ "require": { "mm28ajos/php-reolink-camera-api": "^1.0" } }
Finally, be sure to include the autoloader in your code:
require_once('vendor/autoload.php');
Git
Execute the following git command from the shell in your project directory:
git clone https://github.com/mm28ajos/PHPReolinkCameraAPI.git
When git is done cloning, include the file containing the class like so in your code:
require_once('path/to/src/Client.php');
Download the Release
If you prefer not to use composer or git, you can simply download the package, uncompress the zip file, then include the file containing the class in your code like so:
require_once('path/to/src/Client.php');
Example usage
A basic example how to use the class:
/** * load the class using the composer autoloader */ require_once('vendor/autoload.php'); /** * initialize the Reolink API connection class, log in to the controller and request disable the motion detection e-mail alert * (this example assumes you have already assigned the correct values to the variables used) */ $reolink_connection = new \Reolink_API\Client($user, $password, $camera_ip); $login = $reolink_connection->login(); if ($login) { $results = $reolink_connection->toggleMotionEmail(false); // returns a PHP boolean to signale the success/failure of toggeling the motion e-mail alert $logout = $reolink_connection->$logout(); }
Please refer to the examples/ directory for some more detailed examples which you can use as a starting point for your own PHP code.
API Requests Implementation:
GET:
- Login
- Logout
- Display -> OSD
- Recording -> Encode (Clear and Fluent Stream)
- Recording -> Advance (Scheduling)
- Network -> General
- Network -> Advanced
- Network -> DDNS
- Network -> NTP
- Network -> E-mail
- Network -> FTP
- Network -> Push
- Network -> WIFI
- Alarm -> Motion
- System -> General
- System -> DST
- System -> Information
- System -> Maintenance
- System -> Performance
- System -> Reboot
- User -> Online User
- User -> Add User
- User -> Manage User
- Device -> HDD/SD Card
- Zoom
- Focus
- Image (Brightness, Contrass, Saturation, Hue, Sharp, Mirror, Rotate)
- Near Infrared Light
- Advanced Image (Anti-flicker, Exposure, White Balance, DayNight, Backlight, 3D-NR)
- Image Data -> "Snap" Frame from Video Stream
SET:
- Display -> OSD
- Recording -> Encode (Clear and Fluent Stream)
- Recording -> Advance (Scheduling)
- Network -> General
- Network -> Advanced
- Network -> DDNS
- Network -> NTP
- Network -> E-mail
- Network -> FTP
- Network -> Push
- Network -> WIFI
- Alarm -> Motion
- System -> General
- System -> DST
- System -> Reboot
- User -> Online User
- User -> Add User
- User -> Manage User
- Device -> HDD/SD Card
- Zoom
- Focus
- Image (Brightness, Contrass, Saturation, Hue, Sharp, Mirror, Rotate)
- Near Infrared Light
- Advanced Image (Anti-flicker, Exposure, White Balance, DayNight, Backlight, 3D-NR)
Contribute
If you would like to contribute code (improvements), please open an issue and include your code there or else create a pull request.
Credits
This class is based on the initial work by the following developer:
The Readme is based on:
- https://github.com/Art-of-WiFi/UniFi-API-client/blob/master/README.md
- https://github.com/Benehiko/ReolinkCameraAPI/blob/master/README.md
Important Note
All of the functions in this API client class are not officially supported by Reolink and as such, may not be supported in future versions of the Reolink cameras.
mm28ajos/php-reolink-camera-api 适用场景与选型建议
mm28ajos/php-reolink-camera-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 4, 最近一次更新时间为 2019 年 11 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「client」 「IP」 「camera」 「Reolink」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mm28ajos/php-reolink-camera-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mm28ajos/php-reolink-camera-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mm28ajos/php-reolink-camera-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Mock PSR-18 HTTP client
A Filament form action for scanning barcodes and QR codes using the device camera with html5-qrcode library
onvif protocol
Asynchronous MQTT client built on React
Shim repository for WebcamJS
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-11-07