Tutorial: Using the new Auth system with tasker


#21

I’ve managed to stop the errors, and get the task to run.
But nothing happens in HA.


#22

Same here. And funny thing is that the old taks I had, with the API password in the url is still working fine.

Can anyone help out get this new authentication way working?

UPDATE: Ok so I got it working using the duckdns url. I first tried with my local url and actually that is what I want to do. So that tasks only run when I’m actually in the same network. If anyone knows how I can achieve that…?


#23

My old tasks with the API password don’t work.
I can’t use tasker in conjunction with HA at all no.
Sad times


#24

You don’t say if you tried to set it up like mentioned in the topic start.


#25

Sorry thought it was clear,
Yeah I’ve set it up exactly as explained in the first post.

Maybe someone who has it working could export the xml from tasker and share?


#26

I was struggling to get this to work. No error messages in Hassio or Tasker. Finally realized that url need to have also port if you are running Home Assistant in some other port than default SSL.

So correction for me was to set global variable %HA_ADDR to https://my_site_name.duckdns.org:8123


#27

thank you so much for posting this, i was able to get this setup in 10 minutes and it has opened up the door to automations for me.


#28

im getting this error:

Log Details (WARNING)

Login attempt or request with invalid authentication from


#29

Make sure you have his script formatted correctly in tasker. If you copy->paste to your phone it may be incorrectly formatted. That is what is causing alot of the error posted above. I was using Join to send the text to my phone through chrome and if f’ed it all up on the transfer.

ie. turn your phone sideways and make the line of text EXACTLY the way his is.


#30

This is incredible! I’m sure this saved me hours of troubleshooting and research. Very easy to follow and I updated my existing HTTP Post state “Perform task” with very little effort. I spent more time trying to figure out why I was getting an error popup after Home Assistant rebooted. Even though the entities were updating properly. For my purposes I actually took out the last three lines so I wouldn’t get the error message when my entities updated for the first time after a reboot.

if( xhttp.status != 200 ) { 
    console.error(xhttp.status + ' - ' + xhttp.responseText); 
}

#31

@bokub Finally got al my Tasker shortcuts back, thanks a lot!


#32

Thanks for the info. I can’t for the life of me get this to work. I have followed the OP’s tutorial exactly, and absolutely nothing happens when I run this task. No error messages on my phone, and nothing happens within Home Assistant.

I am able to use HTTP Post with my API password to accomplish the same thing, but I’d much rather use this token method. Is there something additional that I need to do within Home Assistant besides creating the token? I’m kind of a newbie with this. Please help!

Phone: Google Pixel XL
HA: Docker container - QNAP NAS


#33

Thanks for your tutorial.
Im new at Tasker and first i tried with the api_password methode form Bruh Automation (https://www.youtube.com/watch?v=CvSYZnKS0es) and i didn’t worked now i tryed it with the Turial but I have the problem that i get the error Massage 400 Bad Request.
In Ha there’s no Log whats going wrong.
Does anyone have any idea what else I can do that it works?


#34

API method isn’t preferable these days so I wouldn’t try that.

Did you create a token for Tasker?

Other option these days is to use Webhooks. Works pretty well with Tasker.