For anyone who isn’t aware Tasker had a new update come out with quite a few new features, one of which is HTTP Request (from what I can tell all the various HTTP types rolled up into one action).
This was awesome until I had a task kick off and update a state via HTTP POST action triggering two long vibrations on my phone (not something I enjoyed hearing as I was about to hit the bed for sleep). And yes there is a Stop reminding me option with the notification, but I know as soon as I hit that I will never get around to fixing the action to use the new method.
Anyone savvy enough to know how to setup the HTTP Request to interface with OH. Currently the word on the street is that HTTP POST isn’t going anywhere and will continue to work, however as this is something on a computer/device we all know that this has a possibility to be sunsetted.
Current stable version is 5.8.1 and I grabbed it off of the dev’s drop box share as the Play Store hasn’t provided an option to update.
Is that what that was? It happened when I closed the garage on the way to work. Obviously I didn’t get a chance to see what the alert was while driving and I lost it by the time I got to work.
I’ve not tested it but the following should work.
||[item name] is case sensitive name of the Item
||Content-Type: text/plain Accept: application/json
||Put them on separate lines, the Accept may be optional
||The command to send to [item name]
||adjust as desired, default is 30 seconds
Note that if you have any following Actions or other tasks that care about the return code, the new variable is
%http_response_code instead of
NOTE: This must mean that the updates have rolled out to the Play store as I did get a Tasker update this morning before the double buzz happened.
I just tied to create one of my “HTTP POST” actions as the new “HTTP Request” and it worked as posted by @rlkoshak
Here are the settings for the old and the new action.
My server name and port are stored in variables.
I did not need to define
@rlkoshak & @christoph_wempe Kudos to both of you, I was missing the ‘Content-Type: text/plain’ as the Header portion (or it just wasn’t clicking, that i need to have that as part of the Header request).
Now on to updating the doco I have on the forums to display both ways - Tasker with myopenHAB.org (Screenshots for tasker)
The new method is still not working for me.
I’m testing with “GET” and “FLASH” tasks and all I’m getting is “unauthorized” response.
“user” is an email address. Is there a formatting requirement? It works in my web browser.
I finally had success!
I used the “HTTP Auth” task with “Method: Username and Password” prior to “HTTP Requests” task
Awesome contrib @Dustin_Thurston I do recall reading new auth methods for tasker, but I didn’t actually test it out (have SNMP from a switch providing phone detections).
There were issues previously and was easily resolved if you stored the username/password values in variables within tasker and then put those place within the URL. My email has some periods (which in retrospect I need to go back in time and slap myself for setting it that way, as it has caused me grief with a couple of other things), and I believe they were causing issues with my login to OH cloud from being successful.