⚙️ Using Tasker with Home Assistant (V2)

Thank you. The issue I had was I created the Automation only for this routine and did not have an actual Trigger defined.

Then that is definitely better suited to be a script. Well done!

It seems pretty unrealiable on newer android versions: https://github.com/MarkAdamson/home-assistant-plugin-for-tasker/issues/14

Would be awesome but it’s not working any more.

It’s still working for me, and so are rest url’s. Two things…must be https connection and second, one aspect of Tasker plugins is that most-often you need to ‘wake up’ the plugin after a phone reboot. I find I need to do that with this plugin as well. Literally, I go into Tasker and manually run the Task or even open the Task and ‘Test’ the server/Action. May I add…this is why the process herein so valuable…thanks to the latest update, its all easily possible right in Tasker.

I couldn’t get it to work, as consistently I get “network error”.

It seems that HA could work the request on its own API through http, not only https: https://www.home-assistant.io/integrations/http/#apis

Soon after I started using HA, I was advised to do everything via https…not bad advise. I switched my ddns over duckdns, which is already encrypted. Everything works, plus its more secure.

@bokub, I configured my HA with duckdns and https. But I’m not using it exposed to WAN, as I have a VPN to my installation and only access HA through it or the LAN.

I’m getting the usual unverified SSL error:

javax.net.ssl.SSLPEERUnverifiedException: Hostname not verified

How can I surpass this issue?


Even with self signed certificates for local access, now the error changes to:

javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found

Any help is appreciated, please.


Can you open the HA call-service task, go to action number 7 (HTTP Request) , and check “Trust Any Certificate”?

If it works, I’ll edit my tasks

1 Like

Thanks, bokub. That’s solved! :smiley:

But now I get “401 unauthorized”. That is odd as the token is correct and valid. I’m on HA 0.102.1.

Solved by removing the Authenticated plug-in (https://github.com/custom-components/authenticated), deleting the existing token and creating a new one.


@bokub Thank you for the excellent guide, this made it so much easier!

Any tips on how to change the icon based on the entity state? For example, I have a quick toggle to open/close the garage door and it would be awesome to have the icon reflect the current state of the door.


1 Like

Great news! I’ve updated the two generic tasks with the “Trust Any Certificate” set to true so future users don’t encounter the problem

1 Like

I was testing this but I get: “javax.net.ssl.SSLhandshake Exception : handshake failed”
is some one experince this also? and how did you fixed it?

Is your HA_ADDR http or https ?

Is your HTTPS working properly ?

Can you open the HA call-service task, go to action number 7 (HTTP Request) , and tell me if “Trust Any Certificate” is checked ?

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: