Jump to content

Android Tasker and ISY


ferdies

Recommended Posts

Posted

Hi,

 

This is my first attempt on Tasker and it seemed I could not get it right.

 

http://login:password@192.168.xx.xx/rest/nodes/40070/cmd/DON/

 

Any expert opinion on this? Thanks.

post-3905-140474164827_thumb.png

Posted
The "/rest/nodes/..." part has to go in the Path field.

 

Sent from my SPH-D710 using Tapatalk

 

Thanks for the reply.

 

I tried this and it is still not working:

 

Server:Port

http://username:password@192.168.xx.xx

Path
/rest/nodes/40070/cmd/DON/


 

Am I still missing something? BTW, this rest command works on a browser.

Posted

Does that work from the browser on my desktop, I seem to think you have the format wrong off the top of my head but at the wrong computer to check it. You had to have username AND password in there.

 

Alan

Posted
The "/rest/nodes/..." part has to go in the Path field.

 

Sent from my SPH-D710 using Tapatalk

 

Thanks for the reply.

 

I tried this and it is still not working:

 

Server:Port

http://username:password@192.168.xx.xx

Path
/rest/nodes/40070/cmd/DON/


 

Am I still missing something? BTW, this rest command works on a browser.

This works from a browser on your phone or only on your computer? Is this phone connected to your local network via WiFi? Otherwise 192.168.xx.xx would not be the correct IP address. Also is "40070" just to disguise your actual device address? It doesn't seem like a correct address normally used.

Posted

Yes, the rest command works on a browser of my tablet connected via WIFI. While I am learning tasker, I am not using fqdn so this is within my local network only.

 

I tested the command on a PC browser, without any issue as well.

 

To further isolate the problem, I tried doing a curl command on my linux machine and it just worked.

 

curl -s -u username:password http://192.168.xx.xx/rest/nodes/40070/cmd/DON/


Thanks.

Posted
I just noticed now that you are using the HTTP POST action. You need to use HTTP GET.

 

You're right! Thanks for spotting that.

 

BTW - rest command could be also in the same line as the URL. No need to use the "path" option.

 

 

So if I am not using WIFI and using my Cell network and I dont have an SSL certificate - I understand this is a bit unsecure, below is the command I used but I again, error occurred. Is there an option to ignore SSL?

 

HPTT Get:


Server:Port
https://username:password@test.dyndns.biz:2000/rest/nodes/40070/cmd/DON/

Posted

Unfortunately not. You will need a certificate from a certificate authority. I got one for free from cacert.org.

 

Sent from my SPH-D710 using Tapatalk

 

EDIT: The above statement is no longer correct. With the latest version of Tasker you do not need a certificate from a certificate authority anymore. See the next 2 posts.

Posted

I'm interested in this topic.

 

On your question for SSL, do the following:

Make sure your 443 (or whatever) port is forwarded to your ISY.

On Tasker Action > Net > HTTP GET do the following:

Server:Port = https://USER:PASS@DDNS:PORT

Path = /rest/status/node

 

At the bottom check Trust Any Certificate.

 

This should enable you to do your web based connection.

 

Be sure to test the above in your browser first.

 

 

 

This is an example of two of my programs:

Here we update the status of a fan including a query.

1401224323450
1401419118168
14
Master Fan Status
10
1

118
false
http://USER:PASS@IP:PORT
/rest/query/21 6A 24 2








118
false
http://USER:PASS@IP:PORT
/rest/status/21 6A 24 2








547
%masterfan_httpd
%HTTPD




590
%masterfan_httpd
formatted="



590
%masterfan_httpd2
"



547
%MasterFan
%masterfan_httpd21




547
%MasterFan
Error




%masterfan_httpd21
10
*\s*




Next we have a task that changes the Widget to a yellow button while running. It then gets the status of the fan and cycles through Off, High, Med, Low. Last it verifies the state of the fan and changes the widget to be a Black, Red, Silver, Green fan symbol.


1401228917726
1401419519570
15
Master Fan
10
1

549
%MasterFan



152
Master Fan

nn_standby
net.dinglisch.android.ipack.ilikebuttonshd



130
Master Fan Status


%priority+1






35







%MasterFan
8





152
Master Fan

tape_reel2
net.dinglisch.android.ipack.transparentglasshd



%MasterFan
0
Off




152
Master Fan

tape_reel2
net.dinglisch.android.ipack.redgoldpainthd



%MasterFan
0
High




152
Master Fan

tape_reel2
net.dinglisch.android.ipack.glossysilverhd



%MasterFan
0
Med




152
Master Fan

tape_reel2
net.dinglisch.android.ipack.greenfloralhd



%MasterFan
0
Low




152
Master Fan

cust_warning



%MasterFan
0
Error




130
Master Fan Status


%priority+1






35







%MasterFan
8





118
false
http://USER:PASS@IP:PORT
/rest/nodes/21 6A 24 2/cmd/DON/255








%MasterFan
0
Off




118
false
http://USER:PASS@IP:PORT
/rest/nodes/21 6A 24 2/cmd/DON/191








%MasterFan
0
High




118
false
http://USER:PASS@IP:PORT
/rest/nodes/21 6A 24 2/cmd/DON/63








%MasterFan
0
Med




118
false
http://USER:PASS@IP:PORT
/rest/nodes/21 6A 24 2/cmd/DOF








%MasterFan
0
Low




549
%MasterFan



30







hl_zzz_tasker

Posted

 

At the bottom check Trust Any Certificate.

 

Wow this is something new and I didn't know about it. I just updated Tasker on my phone & this option is now available there. So I take back what I said before. You do NOT need a certificate from a certificate authority. You can use a self signed certificate. Just check off the "Trust any Certificate" box in Tasker.

Posted

You should be aware that trusting any certificate gives you a false sense of security. It leaves you just as potentiality vulnerable as if you have no certificate at all. Any intermediate provider can intercept your connection and recover you credentials without you knowing.

 

Michael.

Posted

Thank you, maddbomber83!

 

I got it to work with your help.

 

As I cannot decipher your xml program, did you store the result of ISY /rest/status into a task variable?

 

I would like to use the variable to determine the next steps of my tasks program.

 

Thanks.

Posted

Correct. You would use the XML split function in tasker. There is also another post that just got a bunch of new posts where the OP has some really nice programs already made and ready for import into tasker that accomplishes the above with some more robustness.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...