跳转到主要内容

Python守护进程,从psutil获取信息到mqtt代理以集成Home Assistant。

项目描述

PyPI version

ps2mqtt

Python守护进程,从psutil获取信息到mqtt代理以集成Home Assistant

安装

您可以从PyPI安装ps2mqtt

$ pip install ps2mqtt

如果您希望通过systemd运行ps2mqtt,请从本存储库下载ps2mqtt.service文件,并根据您的系统进行编辑。

然后将文件复制到systemd路径,并在启动前启用该服务

$ sudo cp ps2mqtt.service /etc/systemd/system/

$ sudo systemctl enable ps2mqtt.service 

$ systemctl start ps2mqtt.service 

选项

ps2mqtt有几个命令行选项,您应该在自定义ps2mqtt.service时使用它们

  -h, --help                                  show this help message and exit
  --config CONFIG                             configuration file, will be created if non existing
  --period PERIOD                             updates period in seconds
  --mqtt-server MQTT_SERVER                   MQTT server
  --mqtt-port MQTT_PORT                       MQTT port
  --mqtt-username MQTT_USERNAME               MQTT username
  --mqtt-password MQTT_PASSWORD               MQTT password
  --mqtt-base-topic MQTT_BASE_TOPIC           MQTT base topic
  --ha-discover-prefix HA_DISCOVER_PREFIX     HA discover mqtt prefix
  --ha-status-topic HA_STATUS_TOPIC           HA status mqtt topic

您还可以将所有选项存储在一个文件中,只需运行所有选项加上--config /etc/ps2mqtt.yaml即可将所有参数存储在配置文件中。下次运行时,只需使用--config /etc/ps2mqtt.yaml

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

ps2mqtt-0.0.7.tar.gz (6.0 kB 查看散列)

上传于 来源

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面