Shutdown a Raspberry Pi from dzVents

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
peterbos
Posts: 93
Joined: Saturday 07 November 2020 21:41
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Shutdown a Raspberry Pi from dzVents

Post by peterbos »

Hi,

I searched the internet but did not find a solution, not even a faint hint for my question. I want to shutdown a Raspberry Pi (not the one running Domoticz) from within dzVents. I found out that my Picoreplayer (running on a Pi 4), active loudspeakers, television and settopbox use about a kWh per day - just being idle for the most of the day. I want to switch them off with a smart plug when they are in idle state. That's no problem for the loudspeakers, the tv and the box, but the Pi must be shutdown of before switching the power off to avoid corruption of the SD card. My idea is to shutdown the Pi first and then after a minute or so (or when the Pi doesn't answer to a ping or something similar) switch off the power plug.
Switching the power plug is not my problem, I know how to do that. I'm looking specifically for a way to shutdown the Pi.

Peter
User avatar
waltervl
Posts: 6691
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Shutdown a Raspberry Pi from dzVents

Post by waltervl »

You can use executeShellCommand https://www.domoticz.com/wiki/DzVents:_ ... _execution to use ssh to your remote RPi
Eg
ssh [email protected] 'shutdown'
More info see https://www.shellhacks.com/ssh-execute- ... ipt-linux/
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest