Building an Android interface to the ISY Home Automation system

This uses Tasker, Commandr and AutoRemote.

In Tasker, I created two variables.
‘%IsyUrlExternal’ ‘https://user:[email protected]:1234’
‘%IsyUrlInternal’ ‘http://user:[email protected]
(192.1.1.2 is the IP of the ISY, somehost.dyndns.org:1234 is the external URL for the SSL port forwarded ISY.)

Next, two tasks, each containing one line:
‘Home-Arrive’  ‘1. Variable Set ‘Name: %IsyUrl’ ‘To: %IsyUrlInternal’
‘Home-External’  ‘1. Variable Set ‘Name: %IsyUrl’ ‘To: %IsyUrlExternal’
Run each task in turn, look at the new ‘%IsyUrl’. It should change to reflect the correct URL. We’ll use this as the base to communicate with the ISY – while minimizing SSL delays when on your LAN (since ISY SSLs powers are slow).

Next, two ISY Scene tasks, again only one line in each:
‘ISY-Scene-ON’ ‘1. HTTP Get ‘Server:Port: %IsyUrl’ ‘Path: /rest/nodes/%par1/cmd/DON’
‘ISY-Scene-ON’ ‘1. HTTP Get ‘Server:Port: %IsyUrl’ ‘Path: /rest/nodes/%par1/cmd/DOF’
(You may need to select ‘Trust Any Certificate’ if your cert is not issued by a trusted provider)

Next Tasker task performs the setting of Tasker variables in response to incoming status via AutoRemote:
‘AR-SetVar’ ‘1. Variable Set ‘Name: %%arpar2’ ‘To: %arcomm’

Now, a couple of profiles. First – the location profile:
‘State’ ‘Wifi Connected’ – Set the SSID to your home network.
If you have multiple, separate them with / and list them all. The criteria is that the internal URL must work from these networks. Add ‘MAC’ addresses of your AP(s) if you want to be more specific.
On Entry: Task ‘Home-Arrive’
On Exit: Task ‘Home-Leave’

‘State’ ‘AutoRemote’ ‘Event Behaviour’ ‘Message Filter: SETVAR’
On Entry: Task ‘AR-SetVar’

Finally, two more tasks for your first scene. However, since we are using ‘PArform Task’ we need to exit Tasker and re-run it before creating these (otherwise the task we want to run won’t be listed)
‘SC-FamilyRoomCorner-ON’ ‘1. ‘Perform Task’ ‘ISY-Scene-ON’ ‘Parameter 1: 12345’
‘SC-FamilyRoomCorner-OFF’ ‘1. ‘Perform Task’ ‘ISY-Scene-OFF’ ‘Parameter 1: 12345’
(12345 is the ID of the scene – you’ll need to look this up on your ISY admin console)

Test – run the ‘SC-FamilyRoomCorner-ON’ and ‘SC-FamilyRoomCorner-OFF’ tasks. The scene should turn on and off. Test with wifi on (connected to home network) and WiFi off (disconnected).

In Commandr, go into ‘Tasker Commands’. Find your ‘SC-FamilyRoomCorner-ON’ and ‘SC-FamilyRoomCorner-OFF’ tasks. Turn them on – and set the phrase you want to say to activate them. For multiple matches, seperate with a comma. For ‘SC-FamilyRoomCorner-ON’ I have ‘family room on,turn on family room,turn family room on’.