hjelev / rpi-mqtt-monitor

Raspberry Pi MQTT Monitor gathers system information and sends it to a MQTT server.
GNU General Public License v3.0
155 stars 41 forks source link

Feature Request: Shutdown Button #75

Closed genestealer closed 5 months ago

genestealer commented 5 months ago

A shutdown button that can shutdown the RPi on demand. Simular to https://github.com/hjelev/rpi-mqtt-monitor/issues/29 but for shutdown.

hjelev commented 5 months ago

This is implemented now.

The button can be combined with wake-on-lan switch, unfortunately it can't be created with mqtt discovery message.

Here is how the wake-on-lan switch should look:

  - platform: wake_on_lan
    mac: "A8-A1-59-82-57-E7"
    host: "192.168.0.200"
    name: "ubuntu-pc-switch"
    turn_off:
      service: mqtt.publish
      data:
        topic: "homeassistant/update/ubuntu-pc/command"
        payload: "shutdown"