You need to properly setup an HTTP profile in order to send and/or receive HTTP messages as well as for using REST API and JSON API.

Go to Plugins –> Big5 –> Big5 Configuration

Scroll down to HTTP profiles and you’ll see this

Name: pick any name that you will refer later to

Method: GET for most common applications and for “listening” mode (see below), Use POST, PUT and DELETE for REST API and JSON API mainly after coordinating closely with your API provider.

URL: The URL of your destination for outgoing HTTP profiles. For incoming (listening) HTTP profiles – The URL of your HS3 server plus port number plus name of the script.

Example: If your device is sending out an HTTP request like this

http://192.168.1.242:83/myapp.asp?name=test&temp=72&hum=66&sensor=on

than your icoming (listening) HTTP profile must have URL setting like this

http://192.168.1.242:83/myapp.asp

IMPORTANT NOTE about URL in HTTP output (client) profiles

Effective version 1.26 and going forward the HTTP GET output has ${input} at the end.

Put your main URL in the HTTP profile found in Big5 settings plus ${input} at the end like this

Example: http://www.for-example.com/api?${input}

${input} will be replaced with whatever you put in Big5 action box in HS3 event. This allows for great flexibility and reduces the number of HTTP profiles.

For the above Example: if you put “get_me_data_” in Big5 HTTP action box in HS3 events than the URL that will go out as part of your GET HTTP action will be

http://www.for-example.com/api?get_me_data

Request/Response body (new v.1.24) The effect of this optional box depends on the profile

Put any additional strings in the Big5 HTTP action box (see p.1 and 2 above)

For HTTP POST, PUT and DELETE Output profiles the content of this box will be sent out each time the profile is addressed by HS3 Big5 HTTP action from the action drop-down menu of HS3 event. Please note that this duplicates the action. So you have two choices to setup the content in the Action menu and keep the box empty in the HTTP profile or vice versa keep the action box empty and fill the body in the profile setup. Do not do both !

For ALL HTTP listening profiles, the role of this box is to setup a custom response to any reference to this profile (GET, PUT, POST or DELETE).

The body has the standard RegEx format as you would use in HTTP Action body.

Examples:

${ “any text here” }

${ val1411 } – will send out the value of HS3 device 1411

${ if (val123 > val234 than “level=high”, “level=low”)}

Extra headers: To be used with REST API and JSON API. Multiple headers are possible. Each one on new line.

Listen mode: If checked than this profile will act as HTTP (Web) Server. External devices will be able to communicate with HS3 in fashion similar to the above Example. If unchecked than this Big5 profile will act HTTP (Web) client.

IMPORTANT ! If “listen mode” is checked your profile is a server if unchecked it is a client.

Note: Output (non listening) HTTP profiles can also create HS3 devices and trigger HS3 events, by the input received as a result of an output action. For example if you have output HTTP profile GET it may return some valuable information that could be used to create HS3 devices and store values.

Training: Create HTTP GET profile based on this URL
http://httpbin.org/get

and use Big5 triggers to trigger HS3 event by string matcher for the word “Cookie”

ID Parameter: 

The box called “Id parameter (optional)” is used ONLY for a “listening” HTTP profile to create multiple HS3 devices with the same name prefix, found in the input.

Example: if the input is this

192.168.1.1:84/wireless.asp?temp=71.50&name=T5&event=0&hilo=1&hum=28.126

and you put “name” in the “Id parameter” box than the string T5 will be retrieved from the input …name=T5… and used as a prefix creating HS3 devices named (respective values retrieved from the HTTP input next to it)

T5-temp (78.50)
T5-event (0)
T5-hilo (1)
T5-hum (28.126)

Locked: If checked than Big5 will not create new HS3 devices but will keep updating existing ones.

Num as string (New v 1.24): If this box is checked than the input will be imported both as HS3 device value and as HS3 device string. If the box is unchecked than the input will be imported as HS3 device value only.

Device create expression (optional): Must be logical expression resulting in “true” or “false”. New HS3 devices will be created only if true.
This field was renamed “Device affect expression” effective version 1.28 and higher. We’ve made changes to this filter to filter unwanted input not just when Big5 creates HS3 devices but also when Big5 updates devices.

Device name expression (optional) : Used to extract device names from the input. The device names will be used for creating/updating HS3 devices.

Device value expression (optional) : Used to extract device values from the input. The device names will be used for creating/updating HS3 devices.

Example: If the HTTP input is

Confirmation 201 keypad: gate button: 6 pressed: 0

than you can use this simple expressions to fetch name “gate” and the button number as value.

Name expression:  Words(input)[2]

Value expression: Numbers(input)[1]

This will create HS3 device with name “gate” and value 6.

Training: What HS3 device name and value will be created by same Big5 profile if the input changes to

Confirmation 201 keypad: entry button: 2 pressed: 0

Training: Create name and value expressions to fetch the status of the button pressed.