Virtual HTTP Input

With the Virtual HTTP Input, values can be read from a web page. This facilitates the data retrieval from devices with a web interface.

From the Loxone Library suitable templates for the integration of devices can be imported.

Only the Basic Authentication Scheme is supported.

Automated extraction of data from websites (Web scraping) and any subsequent use of the extracted data should be conducted in accordance with the website's terms of service, local regulations and applicable standards.
Loxone does not assume liability for any consequences arising from non-compliance.

Table of Contents


Summary Description Unit Value Range Default Value
URL URL for HTTP(S) request
- - -
Polling cycle Polling cycle in seconds (Minimum 10s) s 10...604800 -
Timeout Time that the Miniserver waits for a response from the device after a read or write command before the operation is considered to have failed.
Increase for slow devices or poor connections.
ms 10...8000 -
Number of permitted timeouts Number of failed queries before a system message is displayed. 0 deactivates monitoring. - 0...100 -

Programming example

First, a "Virtual HTTP Input" is created under Virtual Inputs:

The web address, a suitable polling cycle, timeout and the number of permitted timeouts are defined in the properties window.
In this example, the value of the "Temperature" input is retrieved from the Miniserver using a web service command.
If user authentication is required, the user name and password can be entered as follows: http://User:Password@IP-address

Virtual HTTP Input Command

To extract values from this page, a "Virtual HTTP Input Command" is required.
Any number of commands can be created to retrieve values.

The search pattern is defined in the settings. Therefore, an editing window can be opened, here the source code of the website is displayed to make it easier to navigate to the desired value.

This input can be moved to the programming page via drag & drop.

Command Recognition

Command recognition can be used to navigate in a text or source text and to retrieve values.

In the following example, we always want to extract the current price of natural gas:

Since the indication "Natural Gas" is always the same, we jump to this position in the text. To skip the time indication in order to have the price retrieved, there are various possibilities:

Variant 1 via \d\a
With \d single digits and with \a single characters can be skipped:

Variant 2 via \#\w
With \# a number and with \w any word can be skipped:

Variant 3 via \s8
Since in this example the time will always have the same number of digits and characters, they can be skipped with \s8: