Virtual plugin

The plugin Virtual allows the creation of virtual equipment and virtual controls.

In this documentation, we will name a device created by this plugin as a virtual equipment.

Virtual equipment can be useful for the following needs :

IMPORTANT

Virtuals should not be abused because they lead to general overconsumption (cpu / memory / swap / disk), longer latency times, wear of the SD card, etc ! Virtuals are tools to be used sparingly only when necessary.

Configuration

Plugin configuration

This plugin does not require any special configuration and must simply be activated after installation.

Create/Update Jeedom monitor

Button allowing you to create Jeedom internet equipment which will give you internal information on jeedom :

Equipment configuration

Virtual devices are accessible from the menu Plugins → Programming → Virtual.

Click on a virtual device to access its configuration page :

TRICK

Concerning I’Return url, be sure to add /jeedom after #IP_JEEDOM# if necessary.

At the top right you have access to 3 buttons in addition to those common to all plugins :

Commandes

By clicking on the tab Orders, you will find the list of virtual controls :

INFORMATION

Each virtual device has a command Refresh which allows to force the update of all info commands.

Virtual examples

Virtual switch

To make a virtual switch, you have to add 2 virtual actions like this :

virtual5

Then you save and there Jeedom will automatically add the virtual information command :

virtual6

Add in the orders “action” On and Off, The command Etat (this allows Jeedom to make the link with the state command).

To have a nice widget, you have to hide the status command :

virtual7

Assign a widget that manages the status feedback to the 2 action commands, for example here the light widget. To do this click on the small notched wheel in front of the control On and in the 2nd tab select light as widget :

virtual8

Save and do the same for the order Off. And you will get a nice widget that will change state when clicked :

virtual9

Virtual slider

To make a virtual slider, you have to add a virtual action like this :

virtual12

As before after the backup, Jeedom will automatically create the info command :

virtual13

And as before, it is advisable to link the action to the status command and to hide it.

Toggle switch

This is how to make a toggle type switch (or push button), for this you have to create a virtual action of this type :

virtual14

Then you save to see the status command appear :

virtual15

Here it is necessary in the value of the action command to put not(#[...][...][Etat]#) (replace with your own order) and link the state to the action command (be careful, you must not hide the state command this time). You must also place the info command in binary subtype.

Multiple orders

To do a calculation on multiple orders, it’s very easy ! Simply create a virtual command of type info/Numérique and in the value field put your calculations. The expression tester can help you with this step to validate. For example, to average 2 temperatures :

virtual10

Several points to be done correctly :

We will see here how to make an order which will turn off 2 lights. Nothing could be simpler, just create a virtual command of type action/Défaut and put the 2 commands separated by a && :

virtual11

It is imperative that the subtype of the command is the same as the subtypes of the controlled commands. All the commands in the value field must therefore have the same subtype (all “other” or all “slider” or all of type “color”, etc…).

Virtual status feedback

When using equipment which does not have a status feedback and if this equipment is controlled only by Jeedom, it is possible to have a virtual status feedback. This requires creating a virtual that takes the actions commands (ex: On & Off) of the equipment and which has an info command (the). You must then complete the Parameter column for each action command, by selecting the name of the info command (status) and giving the value it must take.

We can also imagine a virtual one that turns on / off several lamps (actions commands separated by &&) and thus have a status of this general command.

Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site web. Si vous continuez à utiliser ce site, nous supposerons que vous en êtes satisfait.