Guides

How to use Tasker with Home Assistant locally

Drive Home Assistant from your Android phone with Tasker: local triggers, profiles for device-state events, and the practical tradeoffs to know upfront.

On this page
  1. 1. Setting up Tasker for local automation
  2. 2. Integrating with Home Assistant and other local systems
  3. 3. Managing local devices with Tasker
  4. 4. Security and privacy considerations

This guide covers driving Home Assistant from an Android phone with Tasker, over your own network, and where that is worth the trouble. Tasker is a capable automation app for Android that allows you to create profiles and tasks that trigger based on time, location, or device state. When paired with Home Assistant, it can help you manage local devices, integrate with local services like HomeKit or Hubitat, and even handle some of the limitations of Home Assistant’s built-in automation.

But integrating Tasker with Home Assistant isn’t without its trade-offs. You’ll need to consider device compatibility, network setup, and the complexity of managing local automation. Let’s walk through how to set this up effectively and what you should be aware of.

Tasker is a useful complement to Home Assistant’s own automations, not a replacement for them. Talk to Home Assistant over its local REST API (or MQTT through a plugin), keep the phone on the same network, and lock down MQTT authentication and HTTPS before you rely on it.

1. Setting up Tasker for local automation

To use Tasker with Home Assistant locally, you’ll need a compatible Android device running Tasker. While Tasker is available on Android, it’s not available on iOS, so if you’re using HomeKit or Hubitat, you’ll need to rely on other tools for iOS automation.

Start by installing Tasker on your Android device. If you want the automation brain to stay local too, pair it with a local-first smart home hub. Once installed, you can begin creating profiles that trigger based on events. For local automation, the most useful triggers are time-based or device state changes. For example, you might want to turn off lights at a specific time or trigger a scene when a motion sensor detects movement. Tasker’s location triggers also make your phone a handy presence source for Home Assistant.

To integrate with Home Assistant, you’ll need to use HTTP requests or MQTT to send commands to your Home Assistant instance. If your Home Assistant is running on a local network, you can use MQTT to connect directly, which is faster and more reliable than HTTP for frequent commands.

If you’re using a Home Assistant instance that’s accessible via a local IP address, you can configure Tasker to send HTTP POST requests to that IP. For example, use Tasker’s built-in HTTP Request action (Tasker has no curl command; stock Android ships no curl binary) to send an authenticated POST to http://<HA_IP>:8123/api/services/switch/toggle, adding an Authorization: Bearer <long-lived-access-token> header and a JSON body such as {"entity_id": "switch.desk_lamp"}. Easier still, the community Home Assistant Plug-In for Tasker adds a Call Service action that handles the token and endpoint for you.

Alternatively, if you’re using MQTT, you can set up a MQTT broker on your local network (like Mosquitto, one of the Home Assistant add-ons everyone should install) and have Tasker publish messages to the correct topic. Tasker has no built-in MQTT action, so this route needs an add-on such as the MQTT Client or TaskerMqtt plugin. This is especially useful if you’re working with devices like Shelly Plus Plugs, which speak MQTT natively. (A Philips Hue Smart Plug is a Zigbee device, not an MQTT one; you can only reach it over MQTT by pairing it to Zigbee2MQTT, which republishes it on an MQTT topic.)

2. Integrating with Home Assistant and other local systems

Once you’ve set up Tasker to communicate with Home Assistant, the next step is to integrate it with other local systems like HomeKit or Hubitat. These platforms often have their own automation tools, but they can also be controlled via MQTT or HTTP, which makes them compatible with Tasker.

For example, if you’re using HomeKit with a local Home Assistant instance, you can use Home Assistant’s HomeKit integration to expose your devices to HomeKit. Then, you can use Tasker to send HTTP requests to Home Assistant to control those devices. This is a great way to use Tasker to trigger HomeKit scenes or control HomeKit accessories that are managed through Home Assistant.

If you’re using Hubitat, you can use its REST API to control devices. Tasker can send HTTP requests to Hubitat’s API endpoints, allowing you to control lights, locks, and other devices from within Tasker. This is especially useful if you want to automate tasks that involve both Home Assistant and Hubitat, such as turning off lights and locking doors when you leave home.

One thing to keep in mind is that Tasker doesn’t support Home Assistant’s native automation. If you want to use Home Assistant’s built-in automation features, you’ll need to rely on Home Assistant’s own tools. However, for more complex automation that involves multiple systems, Tasker can be a powerful complement.

3. Managing local devices with Tasker

When working with local devices, it’s important to ensure that your Android device is on the same network as your Home Assistant instance. If your Home Assistant is running on a local server, you’ll need to make sure that your Android device can reach it via the local IP address. The simplest test is to open http://<HA_IP>:8123 in the phone’s own browser: if the Home Assistant login page loads, Tasker can reach it too. Do not reach for curl here; as noted above, stock Android ships no curl binary.

Another consideration is device compatibility. Not all devices support MQTT or HTTP, so you’ll need to check if your devices are compatible with the communication method you’re using. For example, Philips Hue plugs are Zigbee devices, not native MQTT hardware, so to drive one over MQTT you first pair it to Zigbee2MQTT (there is no separate MQTT vs non-MQTT Hue plug model). If you’re using a Shelly Plus Plug, you can use MQTT to control it from Tasker.

If you’re using Home Assistant’s local integration, you can also use Tasker to control local services like Home Assistant’s MQTT integration or Home Assistant’s local MQTT broker. This allows you to manage your local network more effectively and reduce reliance on cloud services.

4. Security and privacy considerations

Local communication still needs a secure network and properly configured devices. For example, if you’re using MQTT, you should enable MQTT authentication to prevent unauthorized access to your network.

If you’re using HTTP requests, you should use HTTPS to encrypt your communications. This is especially important if you’re exposing your Home Assistant instance to the internet, even if it’s behind a firewall. You can use Let’s Encrypt to obtain a free SSL certificate for your Home Assistant instance.

Another important consideration is device security. If you’re using Z-Wave or Zigbee devices, make sure that your Z-Wave USB dongle or Zigbee coordinator is properly configured and that your devices are securely enrolled. This helps prevent unauthorized access to your network and ensures that your automation is reliable.

Keep going

All articles →
Article

How to add driveway arrival detection locally

Detect when you arrive at your driveway using local hardware and Home Assistant, with practical notes for HomeKit and Hubitat users.

Read article →
Article

How to detect package deliveries locally

Learn how to detect package deliveries locally using Home Assistant, HomeKit, and Hubitat with practical, no-nonsense recommendations.

Read article →
Article

Thread border router reliability

A practical look at Thread border router performance for local Home Assistant setups, covering real-world reliability, tradeoffs, and which devices hold up.

Read article →
New guides and product notes, no inbox required. Follow via RSS →