How to run commands from Home Assistant


  • administrators

    Home Assistant (aka Hass.io) is a popular automation system sort of like SmartThings but it's open source.

    Here's how you trigger commands on your computers from Home Assistant using a RESTful Command.

    Add this to the end of your configuration.yaml file:

    rest_command:
      triggercmd_calculator:
        url: 'https://www.triggercmd.com/api/run/triggerSave'
        method: "post"
        content_type: "application/x-www-form-urlencoded"
        payload: "trigger=calculator&computer=russfam&token=(your token from Instructions page)"
    

    You can test it by clicking the little cell phone icon in the lower left under Developer tools, then select rest_command.triggercmd_calculator in the Service field, then click CALL SERVICE. This is what it should look like:

    TRIGGERcmd with Home Assistant

    I installed Home Assistant on my QNAP nas as a Docker container. If you do that, I recommend these two settings:

    1. Create a folder you have access to, and mount it as /config in your container. That will give you easy access to the configuration files, and when you upgrade the container, you can re-mount this folder to /config.
    2. Use HOST networking, so you can access Home Assistant at a URL like http://nas:8123.

Log in to reply
 

Looks like your connection to TRIGGERcmd Forum was lost, please wait while we try to reconnect.