PHPackages                             peinhu/pm25alert - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. peinhu/pm25alert

ActiveProject[Utility &amp; Helpers](/categories/utility)

peinhu/pm25alert
================

alert you when PM2.5 index is higher than a certain value

19152PHP

Since Sep 25Pushed 8y ago2 watchersCompare

[ Source](https://github.com/peinhu/pm25alert)[ Packagist](https://packagist.org/packages/peinhu/pm25alert)[ RSS](/packages/peinhu-pm25alert/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PM2.5告警
=======

[](#pm25告警)

当PM2.5浓度在订阅者们**指定的时间**达到**一定数值**时分别进行告警。

[![示例3](https://camo.githubusercontent.com/cf4f4f199119cc048968ae21c6d26397114353a85c7f1ccb21b5129653a21554/687474703a2f2f7777332e73696e61696d672e636e2f6d773639302f363965323330353667773166626461666674796f776a323036393062343379712e6a7067)](https://camo.githubusercontent.com/cf4f4f199119cc048968ae21c6d26397114353a85c7f1ccb21b5129653a21554/687474703a2f2f7777332e73696e61696d672e636e2f6d773639302f363965323330353667773166626461666674796f776a323036393062343379712e6a7067) [![示例2](https://camo.githubusercontent.com/2de9636e17885e14d66afabc5619898fa01bdd80019264786977f411b7a52591/687474703a2f2f7777332e73696e61696d672e636e2f6d773639302f36396532333035366777316662386f7573377831616a32303639306234676d642e6a7067)](https://camo.githubusercontent.com/2de9636e17885e14d66afabc5619898fa01bdd80019264786977f411b7a52591/687474703a2f2f7777332e73696e61696d672e636e2f6d773639302f36396532333035366777316662386f7573377831616a32303639306234676d642e6a7067) [![示例1](https://camo.githubusercontent.com/1cd3081d965e732a4ce7558e7c545b42fcb45529d517502ab8fd2b5f80ffd089/687474703a2f2f7777322e73696e61696d672e636e2f6d773639302f36396532333035366777316662386f7572747534636a32303639306234337a712e6a7067)](https://camo.githubusercontent.com/1cd3081d965e732a4ce7558e7c545b42fcb45529d517502ab8fd2b5f80ffd089/687474703a2f2f7777322e73696e61696d672e636e2f6d773639302f36396532333035366777316662386f7572747534636a32303639306234337a712e6a7067)

要求
===

[](#要求-)

PHP&gt;=5.4
composer
cron

安装
===

[](#安装-)

执行`composer create-project -s dev peinhu/pm25alert`。

在`config/notification.php`中设置通知方式的相关参数，在`config/subscribers.php`中设置订阅者的相关信息。

执行`crontab -e`，在末尾增加一行`* * * * * /usr/bin/php /path-to-project/index > /dev/null 2>&1`，注意`/usr/bin/php`请以实际为准，`path-to-project`替换成项目文件夹的路径。

说明
===

[](#说明-)

按PM2.5浓度而非AQI（空气质量指数）进行计算分级，分级标准参照中国/美国标准，结果仅反映PM2.5的污染情况。

默认使用pm25.in提供的api，也可换用其它api，创建一个新的DataProvider并将数据整理成标准数据格式即可。

默认使用email进行通知，也可自行扩展其它通知服务。

发送记录和错误日志位于`log/notification.log`。

许可证
===

[](#许可证)

使用GPLv2许可证, 查看LICENCE文件以获得更多信息。

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/28e39cdff1890a997ff0c33048bc2478dcf7050682e8a1c0e26afa80bcdbee19?d=identicon)[peinhu](/maintainers/peinhu)

---

Top Contributors

[![peinhu](https://avatars.githubusercontent.com/u/8167724?v=4)](https://github.com/peinhu "peinhu (18 commits)")

### Embed Badge

![Health badge](/badges/peinhu-pm25alert/health.svg)

```
[![Health](https://phpackages.com/badges/peinhu-pm25alert/health.svg)](https://phpackages.com/packages/peinhu-pm25alert)
```

###  Alternatives

[openpsa/ranger

Formatter for date and time ranges with i18n support

76177.6k3](/packages/openpsa-ranger)[backpack/activity-log

Activity Log for Backpack

3487.5k1](/packages/backpack-activity-log)[pirsch-analytics/laravel-pirsch

Official Laravel integration for Pirsch Analytics.

4746.1k2](/packages/pirsch-analytics-laravel-pirsch)[techdivision/ckstyles

Neos package which enables you adding your custom style classes for the CkEditor with a simple Yaml configuration

21166.3k](/packages/techdivision-ckstyles)[laravie/geotools

Geo-related tools PHP 7+ library

19105.4k1](/packages/laravie-geotools)[denniseilander/pulse-about-application

A Laravel Pulse card that displays application information by leveraging the output of the php artisan about command.

15101.3k](/packages/denniseilander-pulse-about-application)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
