Virtual HTTP Input

INTRODUCTION

The virtual HTTP inputs allows you to readout a value from a website or a XML-File. This feature makes it possible to implement data inquiry of a device with web interface without PicoC.

Fields of application: heating control, PV-inverter, multimedia uses, etc.

CREATE VIRTUAL HTTP INPUT

In the periphery window click on virtual inputs and then select virtual HTTP input.

Loxone_Config_Virtual_HTTP_Input.png

 

In the Properties window of the virtual HTTP input, the protocol, address and port of the device to be controlled can be entered. Furthermore, you can set the polling cycle.

In this example a value from a website gets periodically read out. To keep it simple we use the state of a Miniserver input in this example. However, it works in a similar manner with other devices.

If authentication is needed, you can add username and password to the string as follows: We only support the Basic Authentication Scheme.

http://USERNAME:PASSWORD@IP-address

In this example we connect to the IP 10.44.44.40 with user “admin” and password “admin”.

/dev/sps/io/Test/state is the webservice-command to get the value of input “Test” on the Miniserver.

Loxone_Config_Virtual_HTTP_Properties.png

 

VIRTUAL HTTP COMMAND

So far the website will be reloaded every 10 seconds. To get a value, we need a virtual command.

Highlight the recently created virtual HTTP input in the periphery window and then select virtual HTTP input command.

Loxone_Config_Virtual_HTTP_Input_2.png

 

Now we take a look on the website we would like to analyse.

For that reason we simply open the page in our browser.

As shown in the screenshot, there is the keyword value=” in front of the value we would like to get:

Loxone_Config_Virtual_HTTP_Value.png

 

This is significant for the command recognition.

Our setting: value=”\v

That means: take the value (\v), after value=”

Loxone_Config_Virtual_HTTP_Value_2.png

 

A common mistake is to use \1 instead of \v. On websites, numbers are often displayed as single ASCI signs. If you interpret the sign as ASCI it will be the value it shows plus 38. For example the digit 3 has the ASCI value 41.

Back to the example:

Every 10 seconds we will receive the value of input Test on the Miniserver with the IP 10.44.44.30.

 

Loxone_Config_Virtual_HTTP_Value_Test.png

EXTENDED COMMANDS

Just a brief overview which commands and control signs are available:

Loxone_exclusiv_decodor2.png

 

 

It is possible to use and combine multiple control signs in one command.