How we create a Virtual Feedback in VoxCommando and how we use it?
VoxCommando has a powerful action group that is called File. This action group has commands for writing, reading, copying, moving and deleting files or text line in files (pic 01). Some of this actions can we use to create a Virtual Feedback
A Virtual Feedback is sometimes useful when you control a device that you cant see.
For an example: a light outside the house
To use this command as here written, you must have extra hardware like a HALi-Controller (
http://lifetek.co.uk/forum/showthread.php?tid=13) or a USB-UIRT (
http://www.usbuirt.com/)
or similar that can be used with VoxCommando. I will show you only the structure of the command to realizing a TTS playback of a state of a device with VoxCommando.
For first this works only correct if you use VoxCommando to control the device. VoxCommando works here as control unit and always saves the switched state of the device. If you control the device with the original hardware remote, VoxCommando cant detect this.Not all VoxCommando users control lights with VoxCommando, so we use here as example to turn an amplifier ON or Off.
Here the task of: We want to know is the amplifier turned ON or OFF.
1. We create a group in VoxCommando Tree Editor with two commands. The first turned the amp on and the second off. Important is that you write the correct text in the File.WriteLine action to On command ON and in off command OFF (red marked in pic 02).
The File.WriteLine action write this text in a specified file which represent the current state of the device.
[attachment=1]
2. What we need as next is a command that read the inner text in this file and can distinguish between ON and OFF. To realizing that we must use the File.Read action combined with a logic block. (pic 03)
The File.Read action stored the inner text of this file (ON or OFF) and we can use it as {LastResult} value in a logic block (If-Then-Else).
If {LastResult} = ON -> Then -> TTS.Speak the amplifier is current on
Else -> TTS.Speak the amplifier is current off
[attachment=3]
This is not a feature that you absolutely needed, but it shows what can be achieved with this action group. I use similar actions with a prototype of HALi controller to control my lights. This makes much easier, because VoxCommando can scrape the state of the lights and also the temperature from a sensor in it directly from the HALi controller over network. For more information of the HALi controller you can take a look here:
http://lifetek.co.uk/forum/showthread.php?tid=13 or write a PM here in VC-Forum to xtermin8r
http://voxcommando.com/forum/index.php?action=pm;sa=sendI hope this short workshop gives you an insight into mostly unknown but effective actions of VoxCommando.
Kalle