Skip to content

Virtual client

A virtual client is a client that doesn't exist but can be interpreted in a rule as a real client.
If a voice rule contains a virtual client, it will be automatically returned to the plugins by the data.toClient variable.

Take the following rule passed from the Living room client, where Kitchen is a virtual client:

turns on the light in the kitchen

The plugin's action function will have the following values in its data object:

{
  client: 'Living room',
  toClient: 'Kitchen',
  ... // Other parameters
}

data.toClient can then be used directly in an action:

turn on the light in ${data.toClient}

Create a virtual client

A virtual client must be created from a real client.
To create a virtual client:

  1. Left-click on a client in the server interface.
  2. Select the Settings menu.
  3. Enter a virtual client name:

  4. Click on Save.

  5. Restart A.V.A.T.A.R.
  6. Place the virtual client node in the interface.
Note

The node position is automatically saved when you exit A.V.A.T.A.R.

The virtual client has a default image.
To select another image:

  1. Left-click on the virtual client.
  2. Click on Settings:

  3. Choose an image in .png format.

  4. Test in the interface and/or click on Save.

Note

You can choose an image in .png format from any folder.
When saved, it will be copied to the app/assets/images/rooms folder.



Getting started