how to make a batch file for X10 control on mac



  • how can i create a batch file to control x10 devices on a mac--ive seen on windows but not mac



  • @George-Contento, I found that this seems to be the only remaining Mac software that's still supported:
    http://www.indigodomo.com/downloads.html

    I also found you can still download the Thinking Home software here, but it's not supported anymore.

    I haven't tried either one myself yet.

    Terminology-wise, a "batch file" is a .bat file and only works on Windows. For Mac and Linux you'd want to make a bash script (usually with a .sh extension) like this:

    #!/bin/bash
    if [ "$1" == "off" ]
    then
      echo turn light $1 >> /tmp/on_off.log
      # Put your command to turn the light **off** here.
    else
      echo turn light $1 >> /tmp/on_off.log
      # Put your command to turn the light **on** here.
    fi
    

    You'd create that file (/Users/(your user)/on_off.sh for example) then make it executable with a command like this:

    chmod +x /Users/russ/on_off.sh
    

    Enable parameters on your command so TRIGGERcmd will add a on or off parameter to the command that runs the script via the TRIGGERcmd Smart Home Alexa Skill or Google Assistant Action.

    Your command would be the full path to the script, like this: /Users/russ/on_off.sh


Log in to reply