Web Relay

Web Relay is a feature, which effectively lets your device make calls to any Web service API. It can also make multiple different calls simultaneously.
For example, let's say you want to build a meteo station that reads temperature, humidity and atmospheric pressure and you want to pass your meteo station's readings down to some meteo site on the internet.
You can easily do that by adding a Web Relay to the project of your meteo station and configure this Web Relay up to the specific meteo website's requirements. What's more, you can add more Web relays to the same project, so that your meteo station would send data to multiple websites simultaneously.


Check the Web Relay example for a detailed look on how a project can use this functionality


Here's how sending data to web sites and services (APIs) works.
The sender puts the data in something called HTTP request and passes this request to the recepient server. The server then receives this HTTP request and acquires the data from it. Simple as that.

To use Web Relay and pass your device's data to a web server, you simply go to any of your projects and in the Web Relay section, you add a new web relay or select an existing one.
In the Web Relay page, you can configure the HTTP request, which is to be sent to the desired website or web api. The URL determines the recepient, but it may also contain data values.

You can embed your device's readings into the HTTP request by using the relay parameters. These parameters are actually the names of your device's properties, surrounded by double curly brackets, for example {{AirSensor.temperature}}
This way, wherever you put {{AirSensor.temperature}} in the HTTP request's body or URL, it will be replaced by the actual value of the supposed air sensor's temperature reading. Analogically, you can embed any properties of your device.

If needed, you can also convert values using Logicode Scripting.
For example, the AirSensor.temperature gives you a value in Celsius, but if you have a service, which only accepts Fahrenheit, you'll have to do a conversion.
This case is covered in the Logicode info page

Coming up

Web relays are planned to become objects of their own, so that you can reuse one web relay in many projects
They will be objects similar to peripherals and will accept input from other objects.

This is part of our Smart development v2.0 vision for intuitive and uniform device design, which will come with version 2 of IoT.Cafe

Concept, Smart development 2.0