Using Tasker to wget or curl url that requires user and password

843 views
Skip to first unread message

FrayAdjacent

unread,
Aug 12, 2012, 8:30:53 PM8/12/12
to tas...@googlegroups.com
So I just recently learned that my home automation controller (ISY99i) has an API that is pretty simple to use.  I've already figured out the url strings to request to perform functions.  I'd love to add this to Tasker tasks so that I can involve my home automation in some of my tasks.

I got BusyBox all set up and installed the Locale Execute plugin so that I could use wget.  Well, it doesn't work.  When I drop to a terminal and try the command like the following:

wget -q --user=myuser --password=mypass http://somesite.net/rest/vars/set/2/7/1

it's telling me the '--password' argument is invalid.  

I would use curl, but busybox doesn't seem to include it.  I can't find anything that would provide the functionality I need.  I do not have the option of bypassing authentication, so the user and password are needed.  Can it be done through Tasker? 

Lex

unread,
Aug 12, 2012, 10:06:46 PM8/12/12
to tas...@googlegroups.com
I just came across the app zshaolin, which, among other things, contains an Android build of curl. If you're rooted, you can snitch the binary and put it somewhere useful like /system/bin.

FrayAdjacent

unread,
Aug 13, 2012, 12:51:14 AM8/13/12
to tas...@googlegroups.com
I found something simpler...  Someone compiled a more complete wget and posted it here:


I moved the busybox wget to wget.old, moved this version in place, chmoded it so it was executable, and BAM!  It works!  

rubber necker

unread,
Sep 24, 2012, 11:46:39 PM9/24/12
to tas...@googlegroups.com
I'm trying to swap out the busybox wget with the ported wget but I'm unable to (read-only file permission)

Is there a special way to do this?  I'm using terminal emulator after giving it su permission but I can't rename the old wget even.

M

unread,
Sep 25, 2012, 1:52:54 AM9/25/12
to tas...@googlegroups.com
Before you mess with your busybox, try the standard approach of providing credentials in a URL like https://username:password@server/uri

-M

Harsh

unread,
Oct 29, 2012, 12:47:43 PM10/29/12
to tas...@googlegroups.com
Do you mind posting a link to the said API? or any examples that you may have found? I am very new to HA, and want to make sure the system I purchase will be extendable to my needs.

Thanks,
Reply all
Reply to author
Forward
0 new messages