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:
- Left-click on a client in the server interface.
- Select the Settings menu.
-
Enter a virtual client name:
-
Click on Save.
- Restart A.V.A.T.A.R.
- 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:
- Left-click on the virtual client.
-
Click on Settings:
-
Choose an image in
.png
format. -
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.