2 个不稳定版本
0.3.0 | 2022年9月27日 |
---|---|
0.2.0 | 2021年6月6日 |
#599 在 硬件支持
52KB
1.5K SLoC
desktop2mqtt
一个用于将任何PC集成到您家庭自动化系统中的守护进程。主要用于 Home Assistant。
配置
在您的当前工作目录中放置一个 config.yml
文件,内容如下
mqtt:
url: mqtt://<your broker ip/domain>
username: <your broker username> # optional
password: <your broker password> # optional
hass:
entity_id: desktop # will be used to build the different sensors
name: Max Desktop # will be used for the friendly name of the sensors
modules:
idle:
timeout: 5min # duration until this device is reported as unoccupied
poll_rate: 5s # duration to poll for user input while the device is unoccupied (optional)
backlight: none # backlight provider to use (one of: none, stub, raspberry-pi)
notifications: true # enables notification sending via /desktop2mqtt/entity_id/notify with `{ "title": "", "message": "" }` as payload
sensors:
poll_rate: 1s # sensor update rate
types: # sensors to report
- type: load
- type: memory
- type: core-temperature
- type: disk-usage
disks:
- /
- /mnt/games
- type: battery
custom_commands: # exposed as buttons to home assistant
- name: Disable HDMI
command: xrandr --output HDMI-0 --off
icon: mdi:television-off # optional
依赖项
~12–43MB
~669K SLoC