Jump to content

Tasker


Physpher

Recommended Posts

Posted

Hi All,

 

I am trying to figure out how to get Tasker to send REST commands to my ISY99i. I have tried using shell commands with WGET and using the HTTP Get command in Tasker to no avail.

 

I have tried:

https://user:pass@IP:Port/rest/nodes/ /cmd/DON

wget --user=user --password='password' https://IP:Port/rest/nodes/ /cmd/DON

As well as HTTP Get with the above added to the first field.

 

Any help would be greatly appreciated.

Posted

Could you guys expand on that a bit more.. Do we need the network module?

 

And so you have your tasker do what when you get into the area or out of the area?

Posted
Could you guys expand on that a bit more.. Do we need the network module?

 

And so you have your tasker do what when you get into the area or out of the area?

 

 

No need for the network module for this. /REST commands are directly supported by the base ISY configuration. As for TASKER, Dunno, I'm on iOS and us iOS users don't get to have nice things like TASKER since old mother Apple need to save us from ourselves.

Posted

That is the command I currently use and it works well every time as long as it is not tasker issuing commands. What I am trying to do is get my nfc tags to adjust lighting and TV without bringing up 17 browser windows. It currently works, just not gracefully. I think my weak point is not fully understanding the best named tasker. :-D

 

Sent from my SCH-I605 using Tapatalk 2

Posted
That is the command I currently use and it works well every time as long as it is not tasker issuing commands. What I am trying to do is get my nfc tags to adjust lighting and TV without bringing up 17 browser windows. It currently works, just not gracefully. I think my weak point is not fully understanding the best named tasker. :-D

 

Sent from my SCH-I605 using Tapatalk 2

 

Oh do tell..

 

the little 50 cent tags you can put your phone or tap against to get them to "activate"?

 

Share more on your tasker set up and the challenge you speak of here please. I am guessing that tasker opens the browser to send the command and then that tab is left open and you have to come along and close it manually?

Posted
That is the command I currently use and it works well every time as long as it is not tasker issuing commands. What I am trying to do is get my nfc tags to adjust lighting and TV without bringing up 17 browser windows. It currently works, just not gracefully. I think my weak point is not fully understanding the best named tasker. :-D

 

Sent from my SCH-I605 using Tapatalk 2

 

Oh do tell..

 

the little 50 cent tags you can put your phone or tap against to get them to "activate"?

 

Share more on your tasker set up and the challenge you speak of here please. I am guessing that tasker opens the browser to send the command and then that tab is left open and you have to come along and close it manually?

 

 

You got it exactly. Url method works fine, the part that is hurting my brain is the http get (wget) function. When I am remote, I get a Java error that I do not understand. When I do it locally, just sits there. Somewhat frustrating.

 

I couldn't find any of those tags for $.50, they were closer to a dollar. But you are correct on the sticky part I got a 10 pack to test the waters. I like them, I just don't like trying to do more complex things with them as I have been beating my head on the wall for the past few days :roll:

 

I know I'll get it eventually, I always do, it's just a long painful road Haha.

 

Sent from my SCH-I605 using Tapatalk 2

Posted

This is the first time using it for the isy. I have it do just normal phone stuff. It is actually very quick to react to the built in tasks (toggling wifi, sending texts and all the other stuff).

 

Sent from my SCH-I605 using Tapatalk 2

Posted
Url method works fine, the part that is hurting my brain is the http get (wget) function. When I am remote, I get a Java error that I do not understand. When I do it locally, just sits there. Somewhat frustrating.

Are you getting an error that looks like this:

"Input/Output error for https://example.com/blah: javax.net.ssl.SSLHandshakeException: java.security.cert. CertPathValidatorException: Trust anchor for certification path not found..."

If so then it's probably related to you using a self-signed SSL certificate. Here's a message I posted to the Tasker forum about it a little while back:

https://groups.google.com/d/topic/taske ... discussion

Posted
I'm on iOS

 

This surprises me from one who likes to tinker such as you.

 

Hehe. Me too, kinda. I do really enjoy the stability and reliability that comes from iOS however. Been down the jailbreak road a few times and have decided that it's not worth the effort. I still have my old Nokia N810 but don't generally carry that anymore. I have been able to do most of what I want externally and just use the iPhone/iPod/iPad to trigger those external scripts/functions. That said, an app like tasker would be most welcome.

 

-Xathros

Posted
I do really enjoy the stability and reliability that comes from iOS however.

 

Yes. Sometimes it is nice simply to use devices as intended. There can be a lot of freedom when the ability to tinker with devices is taken away...it gives us more time to spend doing more important stuff.

Posted
Url method works fine, the part that is hurting my brain is the http get (wget) function. When I am remote, I get a Java error that I do not understand. When I do it locally, just sits there. Somewhat frustrating.

Are you getting an error that looks like this:

"Input/Output error for https://example.com/blah: javax.net.ssl.SSLHandshakeException: java.security.cert. CertPathValidatorException: Trust anchor for certification path not found..."

If so then it's probably related to you using a self-signed SSL certificate. Here's a message I posted to the Tasker forum about it a little while back:

https://groups.google.com/d/topic/taske ... discussion

 

That is the error I am getting (based on my horrible memory at least) I will look into it while at work. Thanks for the information!

 

EDIT: looks like I can't fix this myself. But it looks like mobilinc is looking into tasker integration so I may switch to them instead of conductor if/when they release that feature.

 

Sent from my SCH-I605 using Tapatalk 2

  • 2 months later...
Posted

I just wanted to follow up here with the solution I'm using while the Mobilinc dev continues to work on Tasker integration. What I ended up doing is downloading cURL for Android, and then set Tasker to run a shell script like this:

 

curl https://ISY_URL/rest/vars/set/2/5/1 --insecure

That REST call sets a variable in my set up. The key here is the "--insecure" flag which tells cURL to ignore the SSL certificate warning.

Posted

You don't have to install it. Since my phone is rooted I dropped it into the /system/bin folder which means I can call it from a Tasker "Run Shell" script just by starting the command with "curl". I'd assume that you'd be able to drop this on the SD card portion of your phone as well, but you'll need to use the full path to the curl executable.

Posted

From the reading I was doing, they don't have a execute permission set on the SD card and without root you cannot set it.

 

Perhaps I will have to root my nexus to bring this all online sometime.

  • 3 weeks later...
Posted

Alright. I think I found a way to do this locally and it works flawlessly (for me, at least).

 

In Tasker, make a new task.

Then new action using HTTP Get (Net -> HTTP Get)

When the Action Edit screen comes up, fill out these two fields with the relevant information:

 

Server:Port
http://user:pass@xxx.xxx.xxx.xxx:xxxx
Path:
/rest/nodes/XX XX XX X/cmd/XXX

 

In NFC Task Launcher, create a new task.

Select NFC

Change your tag name

Add action, Tasker (it's at the bottom)

You can then search for your new Tasker task.

Select, then OK.

Save and write.

 

To make all of this transparent:

 

In Tasker:

Menu, preferences
Uncheck run in foreground (Only if your device is newer, else just change the Tasker icon to blank)

 

In NFC Task Launcher:

Menu, settings
Set Notifications to none
Vibrate to never

 

Tada! No new tabs/pages for every device. My phone just makes the NFC sound and that is it. Lights adjust automagically and all. Don't even need to leave some apps to do so.

Posted
Alright. I think I found a way to do this locally and it works flawlessly (for me, at least).

 

In Tasker, make a new task.

Then new action using HTTP Get (Net -> HTTP Get)

When the Action Edit screen comes up, fill out these two fields with the relevant information:

 

Server:Port
http://user:pass@xxx.xxx.xxx.xxx:xxxx
Path:
/rest/nodes/XX XX XX X/cmd/XXX

 

In NFC Task Launcher, create a new task.

Select NFC

Change your tag name

Add action, Tasker (it's at the bottom)

You can then search for your new Tasker task.

Select, then OK.

Save and write.

 

To make all of this transparent:

 

In Tasker:

Menu, preferences
Uncheck run in foreground (Only if your device is newer, else just change the Tasker icon to blank)

 

In NFC Task Launcher:

Menu, settings
Set Notifications to none
Vibrate to never

 

Tada! No new tabs/pages for every device. My phone just makes the NFC sound and that is it. Lights adjust automagically and all. Don't even need to leave some apps to do so.

The only problem with this is that you are using the unsecured http to log in. When you are trying to do this with the secure https you will get the certificate errors mentioned in the previous posts.

 

Sent from my SPH-D710 using Tapatalk 2

Posted

Yes, this is only working locally and would not use this outside of my network (I know, I'm transmitting from my phone, but there are fewer hops as opposed to the public network and don't think people are sniffing wifi traffic around me). Once the certs are squared away, this should work nicely. My issue was two part, silent and then remote.

 

Sent from my SCH-I605 using Tapatalk 2

  • 1 month later...
Posted

Thanks to this thread, I have an autovoice in tasker that lets me turn a couple of lights on or off with a simple voice command to my phone. Will parse this out in a few days to control all the lights when at home so I don't have to go into mobilinc each time I want to do it.

 

The video on youtube had a gester on the home screen to bring up the autovoice, but I may just live with the icon for now.

 

Be pretty cool to use my tablet, or phone to just say, turn off the kitchen lights!

  • 3 weeks later...
Posted
Thanks to this thread, I have an autovoice in tasker that lets me turn a couple of lights on or off with a simple voice command to my phone. Will parse this out in a few days to control all the lights when at home so I don't have to go into mobilinc each time I want to do it.

 

The video on youtube had a gester on the home screen to bring up the autovoice, but I may just live with the icon for now.

 

Be pretty cool to use my tablet, or phone to just say, turn off the kitchen lights!

 

I have a gesture on my phone, shake left and right!

 

New Profile > Event > Sensor > Shake

Axis: Left-Right

Sensitivity: Medium

Duration: Medium

 

Set it to run your task that you have a widget for. Problem solved! No keypresses and you can do it from any app as long as your phone is unlocked and screen is on!

Posted

Got it working that way. Need to play with some sensitivity a bit.

 

So next task is to see if I am on local wifi or not BEFORE I have it go into the auto voice.

 

Anyone solve the HTTPS issue yet?

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.6k
×
×
  • Create New...