Connect-150 Webhook POST
Connect can output sensor data to the web, for use in IoT (Internet of Things) applications. This enables use of I-CubeX devices to trigger an event on the web using an IoT platform such as IFTTT and Zapier. The Web field in the digitizer view window requires a Webhook URL address that may be provided by the IoT platform.
Connect will send the sensor data using a POST message with a JSON attachment, with one of the following formats:
Analog sensors
{\"value1\":\"<sensor_input_number>\", \"value2\":\"<sensor_parameter_number>\", \"value3\":\"<sensor_parameter_value>\"}
where <sensor_input_number> is any number between 0 and 7 representing the sensor inputs 1 .. 8, and <sensor_parameter> is always 0 since analog sensors only output one parameter, ie. the sensor output voltage.
Digital (I2C) sensors, standalone mode
{\"value1\":\"<sensor_input_number>\", \"value2\":\"<sensor_parameter_number>\", \"value3\":\"<sensor_parameter_value>\"}
where <sensor_input_number> is any number between 0 and 7 representing the sensor inputs 1 .. 8, and <sensor_parameter> is any number between 0 and 15 depending on the method selected for the digital sensor. The method determines how many parameter values the sensor outputs.
Digital (I2C) sensors, host mode
{\"value1\":\"<sensor_input_number>\", \"value2\":\"<sensor_parameter_number>\", \"value3\":\"<sensor_parameter_value>\", \"value<2 + 2 * sensor_parameter_number>\":\"<sensor_parameter_number>\", \"value<3 + 2 * sensor_parameter_number>\":<sensor_value>\"<sensor_parameter_value>\"}.
where <sensor_input_number> is any number between 0 and 7 representing the sensor inputs 1 .. 8, and <sensor_parameter> is any number between 0 and 15 depending on the method selected for the digital sensor. The method determines how many parameter values the sensor outputs.
When POSTing to the IFTTT IoT platform, <sensor_parameter_number> is limited by Connect to 1, since IFTTT doesn't accept a larger JSON attachment.
Use EditorX to configure the digitizer to output a sensor value. Note that sending messages to the web continuously at a high rate, eg. at 100 ms interval or less could have unexpected or even undesirable results. With EditorX you can configure the digitizer to use eg. the Threshold or Peak signal processing methods to output a sensor value incidentally as a way to trigger an event.