⚙️ Using Tasker with Home Assistant (V2)

Number 7 is checked.
without http(s):// I get the ssl error. And with http(s):// it is changed to Unable to resove host “https”: no address associated with hostname.

but if I put the same name in the browser it gets to the right address (http://xxxxxxx.duckdns.org:8123/)

If http://xxx.duckdns.org:8123 works in your browser without any error or warning, you have to set HA_ADDR=http://xxx.duckdns.org:8123, without any trailing slash.

I don’t understand how you could have a javax.net.ssl.SSLhandshake Exception if you’re not using HTTPS.

Don’t we need a third version for posting states?
for things like HTTP sensor or HTTP binary sensor

HA post-state:
URL: %HA_ADDR/api/states/%par1

This article is in spanish but you can import the two task with tasker share https://eshome.es/controla-home-assistant-con-tasker/ :wink:

Did you managed to get it working?

This article is nothing more than a translation of my old tutorial, which has nothing to do with the current one.

You link is totally misleading and I suspect it’s just a bad way to advertise your blog :confused:

Was this implemented, or did you manage to find a workaround? thanks

same with me - can’t get past this “network error” after setting up the HA server entry and selecting “test server”. It’s a reported issue on his github, but still open.

I first tried to use the Tasker plugin, but that didn’t work for me, so I’m now carefully following your nice instructions. One thing you might add is to be sure to turn off Beginners mode in Tasker, otherwise the VARS tab does not show up.

My problem now is that I’m unable to import the generic tasks. Using method 1, the green Import button does nothing in Chrome. No popup to import data or anything.

So on to method 2… downloaded both xml files fine - but when selecting the tasks to import, tasker crashes. Rebooted, tried again several times. No go.

I’m repurposing an old Galaxy S3 phone running Android 4.4.2 in an attempt to dedicate it as a Tasker server for various HASS automations. From all that I’ve read, this older version of Android should be usable with Tasker.

Do you have any advice for me on what I can try next? Is there another way to get those tasks entered?

If you can’t get this project working, you can try this one: Automagic & Home Assistant (plus NFC automation example)

Thanks Giovanni for the advice! I suspect my problem with Tasker is that the Android 4.4.2 version is just too old for the app. I also tried Automagic on this same phone and it also dies with the error javax.net.ssl.SSLException: Connection closed by peer when trying to connect to HA. However, Automagic was able to detect an alert message and auto-open an app. This further implicates an SSL connectivity issue with Android 4.

In any case, I don’t want the automation to be relying on my personal phone. It has to be done on a dedicated phone or tablet which is why I’m attempting to use an ancient Galaxy S3. My next step will be to head over to XDA developers and try to install a custom Android 7 ROM .

The flow is correct. Json is formatted in the third block. It must work as it is.
Check if tou have api enabled in your HA config

Add api string

Maybe you can find a suitable Tasker version here: https://tasker.joaoapps.com/download.html

Thanks @osmoen ! I only found the paid version on GPlay and had no idea there was not only a version suitable for the old Kitkat, but a trial too. I will definitely give this a try as I have had no luck with Automagic authenticating to HA yet.

I have this entry in my configuration.yaml. It is related to api too. You can check if you have that too. I’m speaking about default config row

Giovanni, We should take all further discussion of AutoMagic issues to your initial post and not hijack this Tasker thread. I will be deleting a few of my posts here and moving them to Automagic & Home Assistant (plus NFC automation example) You might also want to delete your last few replies, but I will answer them in the other thread.

Thanks again for all your assistance!

I did try a Tasker version that was supposed to work for KitKat (Android 4.4x), but unfortunately it failed with the same network error as the latest version. Not a dead-end since I will next try installing a custom ROM to bring the old phone up to Android 7.

EDIT: The network error was due to an SSL handshake incompatibility between Home Assistant and the Android 4.4 client. Instead of rebuilding the client - this configuration.yaml http: option solved the server connection error:

  ssl_profile: intermediate

However, importing the XML templates still crashes Tasker. I was able to work around this by using this Tasker plugin.

Been using this setup for a while now with a couple of tasks to switch stuff in HA from buttons on my phone.

I recently tried to set up a switch to be to turned on every 15mins (it runs a automation that then turns the switch back off)

if i run the task by using the “play button” in the task I have never seen in fail and work great.

When i add it to a Time profile to trigger every 15mins then I keep getting the error

java.net.ConnectionException: Failed to connect to …

and the switch does not toggle.

Any ideas

Edit: Some additional testing has shown that it only fails when the phone screen if off. It still works if the phone is locked but the screen is kept on.

Is there a way to add Tasker variables to the service data (%par2) string? I have AutoVoice set up to change the temperature of my thermostat and create a variable of the temperature as %desiredtemp. In %par2 I have:
{"entity_id": "climate.main_floor", "temperature": %desiredtemp} and that gives me an error.
If I put:
{"entity_id": "climate.main_floor", "temperature": 20} it works fine.

How do I allow it to change the number with a variable so I don’t need a profile for every possible temperature change?


Are you sure %desiredtemp is well defined?
Can you use the Flash action to display the whole body before sending it to home assistant?

Also, have you checked the error log of home assistant?