Hi,
Work has begun on the SiB's ability to perform web requests, which will lead to support for services such as IFTTT.
In the current firmware, the SiB can perform basic HTTP requests using the SiB command "GET". This command has been available in firmware versions since September, 2021. You can update to the latest firmware version to make use of this immediately.
The syntax is as follows:
GET S|N variable_name URL
Where:
S indicates that the variable named (variable_name) should retrieve a text string.
N indicates that the variable named (variable_name) should retrieve a numeric value that can be used in logical and arithmetic operations. At the present time the SiB does not support decimal values.
variable_name should be replaced with any variable name of your choice
Only HTTP URLs are supported at this time, but HTTPS will be supported in the near future.
For example, a server-side script that performs some action can return a 1 for success, and 0 for failure, and a SiB can use it like this:
PROG s
GET N didSucceed
http://myserver.com/sendsmsIF didSucceed=1
IM The action succeeded!
ELSE
IM The action failed!
EI
Another example of a SiB echoing the result of an HTTP request
PROG S
GET S myQuote
http://myserver.com/quote_of_the_dayIMTO 19995551234 myQuote
Limitations:
The SiB does not perform the HTTP calls directly, but instead relays the request to our servers which perform the request and send the result back to the SiB. As such, you will not be able to make requests to servers that are inside of your local network (i.e., 192.168.x.x). This is in place for multiple reasons, but the primary reason is that the GET command will be the starting point for connections to services like IFTTT, as I will describe below...
Coming soon:
We are in the process of implementing a portal on sib.me for SiB owners to manage connections to services like IFTTT. In the portal, users will be able to setup one or more triggers or actions and assign names to them. Once a trigger is setup, the SiB will be able to call it using the same GET command, providing the name of the action instead of the URL.
For example,
GET N didSucceed myFirstIFTTTCall