PHPackages                             creatcode/think-iotmonitor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. creatcode/think-iotmonitor

ActiveComposer-plugin

creatcode/think-iotmonitor
==========================

IoT monitoring, protocol handling, and traffic analytics for ThinkPHP applications with Workerman TCP services.

v1.2.1(1mo ago)01MITPHPPHP ^7.2 || ^8.0

Since Jul 14Pushed 1mo agoCompare

[ Source](https://github.com/creatcode/think-iotmonitor)[ Packagist](https://packagist.org/packages/creatcode/think-iotmonitor)[ RSS](/packages/creatcode-think-iotmonitor/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

creatcode/think-iotmonitor
==========================

[](#creatcodethink-iotmonitor)

面向 ThinkPHP、FastAdmin 与 Workerman TCP 服务的物联网监控组件。

组件提供协议拆包、Redis 与数据库连接管理、TCP 流量统计、设备与队列总览，以及无需注册框架路由的独立监控页面。

功能
--

[](#功能)

- 支持 ThinkPHP 5.0、5.1、6、7、8，以及使用 `topthink/framework: dev-master` 的 FastAdmin 项目。
- 支持 Workerman 4、5。
- 内置 Modbus TCP、Modbus RTU、LoRa、温度协议辅助能力。
- 提供 Redis 与数据库连接探活、断线重连及安全调用方法。
- 支持 TCP 收发流量、上报包数的分钟级 Redis 统计。
- 提供设备活跃状态、上报积压、Redis 队列和 Workerman 进程总览。
- Composer 安装或更新时自动发布配置、独立监控入口和静态资源。
- 监控入口不依赖 ThinkPHP 路由，关闭路由、绑定模块或使用自定义后台入口时仍可访问。

环境要求
----

[](#环境要求)

- PHP `^7.2 || ^8.0`
- `ext-redis`
- `topthink/framework`：ThinkPHP 5、6、7、8 或 FastAdmin 使用的 `dev-master`
- `workerman/workerman`：4 或 5
- Composer 1.1+ 或 Composer 2

TP6、TP7、TP8 使用数据库 Facade 时，建议安装：

```
composer require topthink/think-orm
```

安装
--

[](#安装)

```
composer require creatcode/think-iotmonitor
```

Composer 2.2 及以上版本需要在项目 `composer.json` 中允许插件执行：

```
{
  "config": {
    "allow-plugins": {
      "creatcode/think-iotmonitor": true
    }
  }
}
```

安装或更新后，插件会自动发布以下内容：

环境配置文件TP5 / TP5.1`{app-path}/extra/iotmonitor.php`，默认是 `application/extra/iotmonitor.php`TP6 / TP7 / TP8`config/iotmonitor.php`同时发布：

```
public/iotmonitor.php
public/iotmonitor-assets/

```

已有同名配置、入口或资源不会在安装、更新时被覆盖。

配置
--

[](#配置)

发布后的 `iotmonitor.php` 提供以下主要配置：

```
