Create your own personal assistent with Tasker (in multi language) + Google Now integration

Do you mean in your browser? If yes that is EXPECTED behaviour your webbrowser does GET requests the HA API expects POST requests. This has nothing to do with your profile not activating. Nothing strange here.

You need to narrow down on the profile part in tasker this is where your error lies.

~Cheers

right ok.

I get this error now:

Input/Output error for http://XXXX:8123/api/services/switch/turn_on%service?api_password=XXXX: java.io.IOException: Invalid % sequence: %se in path at index 59: http://XXXXX:8123/api/services/switch/turn_on%service?api_password=XXXX

Also I think the error is due to `HTTP Post:

  • Service port: %HASS_SERVICE%service%HASS_PSW`

caused by %service

Where do you get this error? Didn’t you tell me if you press play in the task it works? I am confused right now.

~Cheers

Right so when I follow the OP I get the error that I posted in my previous post.

However I done some tweaking which is :
`HTTP Post:

  • Service port: %HASS_SERVICE%HASS_PSW`

and

- Variable set: %HASS_SERVICE to %HASS_HOST/api/services/switch/turn_on

so there is no need for Variable set: %service to light/turn_on

and using this method when I hit play the lights turn on but voice command fails.

I am not sure if that is correct but the OP doesnt work for me, could the error be due to - Service port: %HASS_SERVICE%service%HASS_PSW

caused by %service

One thing I noticed a lot with tasker is it does some caching. Try to reboot your phone after some changes and see what happens. It maybe that tasker has something old still cached.

~Cheers

Use the command as following:

ask my home (?<task>.+)

Just use in your if function than:

If (%task ~R computer AND %task~R on)
....
End if

~R means match regex
Above an example to power on your pc…

I do not need ANY ifs because I am calling the API.ai which handles the correct calls to HA.

I can say
“OK Google ask my home to turn on the lights”
“OK Google ask my home how it feels”
doesen’t matter as long as I configured does utterances in the API.ai :slight_smile:

~Cheers

Probably you made some mistakes…
In my original post, I made also some typos, however, it seems I cannot edit my post any more
(eg in data / file, the entity_id I had one double quote too much…)

yes, you can do that too :slight_smile:
I cannot do that, because I want everything in my own language…

1 Like

The example where you didnt use %service, that way you can only turn on switches…
If you use %service, then it can be anything what you want and put that in the variable service.
I recommend to check the following things.

  • your global variables
  • your local variables
  • your HTTP post action, especially your data…

Then it should work… I created those since the beginning I had HASS, and it have been working flawless for me…

I have checked your original post, corrected all the mistakes and rebooted my phone but I still get the same error:

Input/Output error for http://XXXX:8123/api/services/switch/turn_on%service?api_password=XXXX: java.io.IOException: Invalid % sequence: %se in path at index 59: http://XXXXX:8123/api/services/switch/turn_on%service?api_password=XXXX

ok I will have a look and post back the results thanks.

yes, it can give a problem if you use %after turn_on, that why you should set it in a variable…

Try to use this:

In your main variable declaration:

Set Var: %HASS_SERVICE to http://xxxx:8123/api/services/
Set Var: %HASS_PSW to  ?api_password=xxxxx

In your task itself:

Set Var: %service to light/turn_on
then use HTTP Post %HASS_SERVICE%service%HASS_PSW

I updated the tutorial here: https://github.com/broesie/Home-Assistant/tree/master/Tutorials/Tasker%20And%20Voice

1 Like

@broesie is it possible to set Command Filter like this:

(?<task>.+) (?<device>.+)

You always have a word between groups (e.g. (?<task>.+) my (?<device>.+) ) but in my native language I don’t need any words in between. With the word between groups all works, but without it doesn’t.

I’ve described my problem here.

your command should be something like this then:

(?<task>.+)

And in your task, it will be something like this:

If (%task ~R computer AND %task ~R on AND %task !~R off )
....
End if

~R means match regex
!~R means doesn’t match regex

Above an example to power on your pc…

@broesie I get the same error:

Input/Output error for http://XXXX:8123/api/services/switch/turn_on%service?api_password=XXXX: java.io.IOException: Invalid % sequence: %se in path at index 45:

Like I said, use variables…

%HASS_SERVICE%service%HASS_PSW

Ps: have you read my updated tutorial version on github (a few posts above)

I have used Variables as you mentioned and I have read your updated version on github, here is my setup:

and here is the error log: