CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


Sidebar

software:gui-designer:system-manager:http-request-commands

This is an old revision of the document!


HTTP Request Commands

Overview

Some devices only have a HTTP control protocol. These devices can be controlled from a web browser by entering specific URLs into the browser.
To control these devices via iViewer, the command value to send needs to be crafted to follow the HTTP Request standard formatting.

Basic Format

Below is an example of a basic HTTP Request in the format you would need when creating a command within guiDesigner:

GET /sample.html?power=0 HTTP/1.1\x0D\x0AHOST: 192.168.0.179\x0D\x0A\x0D\x0A

Lets break that down:

  1. GET defines a HTTP GET request. Another options would be POST (although we wont cover HTTP POST requests here).
  2. The next part is the URL to access, prefixed with a forward slash.
  3. HTTP/1.1 defines the HTTP protocol version. Another option would be 1.0 (although 1.1 should work fine in most cases).
  4. Then a newline (a carriage return is also required by some systems - as shown in the above example).
  5. HOST defines the IP address or hostname where the request is being sent. You could enter the static IP address of the device, or a web address such as www.commandfusion.com (if the device is accessible in this manner)
  6. Finally end the request with two new lines (with carriage return if your system requires it).

The command value is simply entered into the Command Properties when creating (or editing) a command in guiDesigner.

The system the command belongs to needs to be defined to use port values of 80 (or whichever port the device listens on for HTTP requests, if unsure, try port 80) and set to TCP mode.
You should leave all other options empty. Checking 'maintain constant connection' might work with your device, so give it a try with or without this option checked. It will make a difference (good or bad) to the speed at which commands are received by the system.

More Details

software/gui-designer/system-manager/http-request-commands.1345516666.txt.gz · Last modified: 2012/08/21 02:37 by aaron