ironsheep / RPi-Reporter-MQTT2HA-Daemon

Linux service to collect and transfer Raspberry Pi data via MQTT to Home Assistant (for RPi Monitoring)
GNU General Public License v3.0
460 stars 64 forks source link

Option to restart remote Raspberry Pi #80

Closed dylanpedro closed 1 year ago

dylanpedro commented 1 year ago

Is it possible to add a feature to the script so it allows to restart the remote Raspberry Pi Node?

ironsheep commented 1 year ago

This is likely a no-go. The script runs under the Daemon:Daemon user which does not have root access. One can't do a shutdown or reboot unless it is done as root which is usually done via the sudo command (which the Daemon user is not authorized nor do we want it to be authorized.)

ironsheep commented 1 year ago

@dylanpedro I have a user that has contributed this capability (optional, needs to be configured, of course) so we are working on adding this now...

dylanpedro commented 1 year ago

Look forward to this being added, main reason is sometimes when we restart home assistant our remote nodes don't render correctly so it's easier if we could just send a command to restart it

ironsheep commented 1 year ago

Changes committed and now avail. in v1.8.0 and later.