• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Turn a Windows PC on or off with your Raspberry Pi

Raspberry Pi
1
1
1.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    Russ
    last edited by May 23, 2020, 3:05 PM

    This is the bash script for the Raspberry Pi that I showed in this video:

    #!/bin/bash
    if [ "$1" == "off" ]
    then
      echo turn computer $1 >> /tmp/computer_on_off.log
      /usr/local/bin/tcmd --trigger "Shutdown now" --computer DS
    else
      echo turn computer $1 >> /tmp/computer_on_off.log
      wakeonlan C4:65:16:2B:95:97
    fi
    

    You can download the tcmd utility from here.

    To easily install the Raspberry Pi OS and the TRIGGERcmd agent, I recommend the setup.bat script you can get here.

    Russell VanderMey

    1 Reply Last reply Reply Quote 0
    • R Russ referenced this topic on Feb 21, 2022, 10:18 PM
    1 out of 1
    • First post
      1/1
      Last post