Tuicemens

Pages: [1]

Author Topic: Can Ultra respond to web requests?  (Read 1761 times)

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3855
  • Making Home Automation Fun!
    • Tuicemen.com
Can Ultra respond to web requests?
« on: February 23, 2015, 09:55:12 AM »

Answer:
Yes Although a bit lengthy.
Currently you can request any task which you can trigger from the web page its self.
The syntax:
If Ultras address is 192.168.1.116 and the port is 45099
It expects text like this http://192.168.1.116:45099/send?type=text&msg=txt
where "txt" is a text message

It expects X10PLC for "A3 ON" like this http://192.168.1.116:45099/send?type=sendplc&address=a3&command=ON   

It expects X10RF  for "A3 ON" like this http://192.168.1.116:45099/send?type=sendrf&address=a3&command=ON

It expects User commands like this http://192.168.1.116:45099/send?type=usercommand&task=>Weather?<
where >Weather?< is the user command
« Last Edit: April 06, 2015, 06:25:47 PM by Tuicemen »
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!

Tuicemen

  • Administrator
  • Hero Member
  • *****
  • Helpful Rating: 26
  • Offline Offline
  • Posts: 3855
  • Making Home Automation Fun!
    • Tuicemen.com
Re: Can Ultra respond to web requests?
« Reply #1 on: April 06, 2015, 06:23:57 PM »

With the latest build of Ultralight I've also enabled the ability to run batch files and programs with or without command line arguments.
to run a batch file it must be in the batchfiles folder as should a exe or script file you plan to use.
Ultra expects the command  like this:
ip:portsend?type=shell&ex=batchfile or program&Arg=Commandline argument if one
note: the extentsion is needed for the file
for example if your IP is 192.168.0.100 and port is 45900  and you wish to open/run Kill_PCC.bat (included)
the line you send is http://192.168.0.100:45900/send?type=shell&ex=Kill_PCC.bat&Arg=
note: the argument is left blank
Logged
Get the inside scoop and member perks in the
Members Only Section!

Please don't email me Automation questions 
The forum is for that!
Pages: [1]