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.
    • RussR
      Russ
      last edited by

      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
      • RussR Russ referenced this topic on
      • First post
        Last post