Three ways to send data from Tasker to Raspberry Pi

Getting Raspberries to talk to your Android devices

It’s been two years since my Tasker automation profiles are complimented by a Raspberry Pi board. I understand that spending $30-40 on a new and shiny Raspberry Pi 3 may not be within your reach, but we have Raspberry Pi Zero and ZeroW out and this would be the best $5-10 ever spent! Trust me! I’m going to show you three ways you can connect Tasker and Raspberry Pi together.

Sending data to Tasker and Raspberry Pi

There is a reason why companies want to use a hub or a central server to handle the requests and process the data.  It saves the battery power and CPU use. Plus if you change your phone, or want to add an additional device, the whole process is much simpler to perform.


Price: $3.49

I will assume, that you know how AutoRemote plugin works already. If not please have a look here.

You’ll need curl installed on your Raspberry Pi (new Raspbian Jessie versions should have it already)

 sudo apt-get install curl

Open AutoRemote app and get the personal URL. Open in in the web browser – you will see the URL change once the website is loaded. Copy the key that starts after the: 

you will need this to complete the URL later.

Check your external IP or set up a DNS if you want to have an access to the device from outside of your local network. Google My IP to get the IP address or use   to set up a free domain. Make a note of it.

Edit the following URL accordingly:

curl "$(sudo ifconfig eth0 |grep "inet addr" |awk '{print $2}' |awk -F: '{print $2}')"
YOUR_KEY - The key obtained in the point 2
ANY_UNIQUE_ID - make up an ID ie 314
YOUR_PUBLIC_IP_OR_HOST_NAME - the IP or DNS obtained in the point 3

Modify the URL and open up a terminal on the Raspberry Pi you wish to register. It will register the device running the AutoRemote. Paste the URL and hit enter.

If you are running Raspbian Stretch, please note that the code above refers to eth0, which means you will have to update your interface name in the code or tell Stretch to use old interface names. See this post for a detailed explanation of the changes.

Open up a file /etc/ssh/sshd_config

sudo nano /etc/ssh/sshd_config

and scroll down to the end. You will need to add the following line

KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1

Then Ctrl-X to close and Y to save the changes.

Your device will be visible in the AutoRemote app, you should be prompted to enter SSH username and password. If this won’t happen automatically when clicking on the device in AutoRemote hold down the device to bring up the options.  Enter the username and password  (default:  pi, raspberry)Click a message icon and send a test command:


After a shoer moment you should see a toast with the current date. If you have disabled the toasts previously, you can access the log to check if the message has been received. Each response issued back to the AutoRemote will have the following format:


To send messages back to the tasker you can use either:

curl “”
import urlib.request

NodeRED and HTTP requests

Ever since NodeRED is my favourite way of managing smart devices at home, I needed a better way of interacting between a Raspberry Pi and Tasker. Turns out, that NodeRED and HTTP requests are pretty powerful.  While you can’t really send the HTTP request back to Tasker (I use AutoRemote based node – more on that in a moment) due to unknown IP, you always know your NodeRED server address.  HTTP requests are powerful, as data is processed in a JSON style, available to be used in NodeRED.

Use HTTP POST action in Tasker.

YOUR_IP or DNS:1880
Trust Any Certificate 

The information is sent as JSON style values. For each value you have to specify the name of this value (key). If you want to send multiple values, use a new line.

To receive data in NodeRED, use HTTP POST node connected to a HTTP response node. The POST node has to have the same directory as the one specified in the Tasker HTTP request.

Data is received as as key specific payloads. If I was sending the data above, NodeRED would store it as:

msg.pyload.key1  =  value1
msg.pyload.key2  =  value2

You can use this data and pass it forward as a regular payload using a function node:

msg.payload = msg.pyload.key1;
return msg;

To send the message back to Tasker, use HTTP POST node and AutoRemote link used in a previous method.{{payload}}

AutoTools and SSH

Price: Free+

AutoTools is easier to use and set up, however, the main limitation is that you cannot message the Tasker enabled device directly. When the SSH message is initiated, you will obtain the response from the Raspberry Pi. You will have to forward the port 22 in your router (default one unless changed) and point it to the local IP of the Raspberry Pi. Mine is

  1. Enter the IP or Hostname
  2. Enter the port number (22 is the default one for SSH)
  3. Enter your username (default: pi)
  4. Enter the password (default: raspberry)
  5. Enter a command to run (ie: date)
  6. Enter the name of the variable which will hold the response (ie: result)
  7. If you want to add files add local paths or online folders

Easy enough. Bear in mind, that if want the Raspberry Pi to send a message to the phone or tablet, it won’t be possible until you will add another solution – ie AutoRemote or NodeRED.


You have plenty of choices how to send the data between Tasker and Raspberry Pi. Pick the best suited to your situation. I will be using NodeRED for sure, as this is a very approachable programming tool with a great support for Alexa, Google Home and other devices.

Support NotEnoughTech
A lot of time and effort goes into keeping NotEnoughTech alive! If my work helped you out, consider buying me a coffee or check out exclusive rewards available to Patreon supporters.