Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - nime5ter

Pages: 1 [2] 3 4 ... 8
16
---
Unless you already have a good understanding of http requests, home automation, and VC, please start by reviewing Nodo's great, brief intro to Domoticz + VC:

http://voxcommando.com/forum/index.php?topic=2405.0

--
NOTE: You'll need to replace the Domoticz server IP address and port number in these commands with your own.

Personally, I store this info in a map table and access it as a map variable so that I don't have to type the address manually for every scrape action.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.6-->
<commandGroup open="True" name="Domoticz switches" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="173" name="Domoticz switch {1} to {2}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>http://{M:Domoticz.serverIP:Port}/json.htm?type=command&amp;param=switchlight&amp;idx={1}&amp;switchcmd={2}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Domoticz switch</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\domoticzSwitches.xml</payloadFromXML>
    <phrase optional="true">to</phrase>
    <payloadList>On,Off</payloadList>
  </command>
  <command id="149" name="Domoticz switches GenXML" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\domoticzSwitches.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>http://{M:Domoticz.serverIP:Port}/json.htm?type=command&amp;param=getlightswitches</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExSingle</cmdType>
      <params>
        <param>"Name"\s:\s"(.*?)".*?"Idx"\s:\s"(.*?)"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.MatchToXML</cmdType>
      <params>
        <param>payloads\domoticzSwitches.xml</param>
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>GenXML switches</phrase>
  </command>
</commandGroup>

18
rio14 has alerted me to a text-to-speech option that may be of interest. The free voices I've tested are very good. I don't know if they're all of equal quality.

The problem is that Yakitome's server is pretty slow, so there is often a wait of several seconds before the voice responds. I have done multiple tests with different browsers etc., and so far I have not found a way to consistently get faster responses, but this service may still be of interest to some of you, because of the quality of some of the voices relative to other free TTS voices.

What you need to do:

1. Sign up for a free API key on the site: https://www.yakitome.com/
2. You can look at their documentation (https://www.yakitome.com/documentation), including reviewing their list of voices to try different free voices. https://www.yakitome.com/documentation/tts_voices

In my example below, I am using Mike. You can change this in the URL of the Scrape.Post action.

This solution involves generating the voice synthesis on the Yakitome site's web servers, and then playing that audio file in a web browser. (We can do this in a hidden RoboBrowser window, rather than opening a browser window for each request.)

The Yakitome API works by having users send an HTTP Post request to their server. The API key is needed for this request.

Their server's response to that Post request contains the URL for the streaming TTS. This response is stored in {LastResult} as always. We use a regular expression to capture that URL, and pass it to our hidden RoboBrowser window.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.6-->
<commandGroup open="True" name="Yakitome" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="121" name="++Yakitome talks back (wait for it)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape.Post</cmdType>
      <params>
        <param>https://www.yakitome.com/api/call/json/tts?api_key={M:logins.yakkey}&amp;voice=Mike&amp;speed=5&amp;text={1}</param>
        <param />
        <param />
        <param />
        <param>application/x-www-form-urlencoded</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>"iframe":."(.*?)"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Select</cmdType>
      <params>
        <param>yak</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Show</cmdType>
      <params>
        <param>True</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <params>
        <param>1000</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RoboB.Navigate</cmdType>
      <params>
        <param>{Match.1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>yak</event>
  </command>
  <command id="153" name="Tell yakitome to say {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.TriggerEvent</cmdType>
      <params>
        <param>yak</param>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase optional="true">Tell yakitome to</phrase>
    <phrase>Say</phrase>
    <payloadList>how are you, what is your name, my name is Mike</payloadList>
  </command>
</commandGroup>

My API key is stored in a Map Table. This is used in the Scrape.Post URL that is in the ++Yakitome talks back command.

You can either paste your API key where I have used "{M:logins.yakkey}" or use your own map variable.

Enjoy.

19
Bug Reports / MOVED: Windows 10 launch problem
« on: January 17, 2016, 07:35:31 AM »
Support question, not a bug report. This topic has been moved to Support >> VoxCommando Basics and Core Features.

http://voxcommando.com/forum/index.php?topic=2471.0

20
This has been discussed before, but:

While IFTTT sucks for some things, if you use a recipe that involves sending an email to IFTTT to trigger a THEN behaviour, it does work quite quickly.

This can be useful if you want to communicate with VC remotely.

1. You need to enable the email channel and the Dropbox channel in your IFTTT account.
2. You need to enable the Watcher plugin in VC.
3. Create a Watcher that looks something like the attached image.

In other words, set Watcher up to watch a particular Dropbox folder.

I use it with this recipe: https://ifttt.com/recipes/361463-send-email-to-voxcommando-watcher-plugin

Although this requires that you avoid typos in your email, it is a versatile way to communicate with VC.

In the body of your email, you specify the actions that you want VC to execute. If you have selected "Execute on Create" and "Then Delete!" in your file watcher, then as soon as the file appears in your Dropbox, as long as VC is running the Watcher plugin will immediately try to execute the message, and it will then delete the file. Which means that you can continue to send messages without need to create new files all the time in Dropbox.

So, you can trigger events in VC by send an email:

Code: [Select]
Subject line: #vc
Message: VC.TriggerEvent&&LightsOn

You can trigger specific commands if you know the voice command:
Code: [Select]
Subject line: #vc
Message: VC.TellVox&&Listen to music

You can execute specific actions, rather than commands:
Code: [Select]
Subject line: #vc
Message: TTS.Speak&&Hi honey. I'll be home in half an hour.


In other words, simply use the standard VC API syntax:
http://voxcommando.com/mediawiki/index.php?title=API_Application_Programming_Interface

21
XML Exchange / Windows navigation commands/keyboard emulation
« on: December 04, 2015, 11:30:51 AM »
Attached is a collection of command groups that provide some basic Windows control.

In some cases, these are merely providing some examples for you to customize according to your own needs. Everyone's system is different.

It includes:
  • Basic keyboard emulation/navigation (go up, down, etc./scroll up down fast slow etc.)
  • Launch programs (this provides examples -- you can add your own programs and you may need to make some file path adjustments for your own system)
  • Open various standard Windows folders (requires that you place the attached Shell_folders_shortcuts.xml payload XML file in your payloads folder)
  • Control your windows (focus/close/maximize/next window/etc.)
  • Scan folders/subfolders (for more advanced users, probably)

Take a look at the screenshot attached here to see the kinds of commands included.

Many of you already have the keyboard emulation command group, so beware of duplications!!

In general, keep an eye out for voice commands that may use command phrasing you're already using in your existing configuration.

*Note*: The launch command uses a payload XML file called launchprograms.xml. You may already have this file in your payloads folder. If you're using VC 2.2.09 or earlier, and you haven't already customized that file, then replace it with the file that is attached here and start with this one.

22
Tips and Tricks / Fun with files
« on: December 04, 2015, 10:44:35 AM »
Here's a fun one for folks who like to kick it old-school.

**Caution: For experienced users or those with more technical background**

Scan any directory/subdirectory and capture all the file paths etc. Nice if you want to generate payload xml to access certain files directly, rather than through one of the standard media player plugins, for example. Of course, there are other uses as well.

James originally experimented with this using Launch.CMD, but using Launch.Capture turns out to be much neater and more reliable across systems (I think). So, once again: hat-tip to Master James. ;)

http://voxcommando.com/mediawiki/index.php?title=Actions#Launch

Here is an example where we scan our NAS movies directory and then generate a payload xml of all the movie files. Included are some sample commands that then launch and play any of the titles using your default movie player if you have one.

You could do the same thing with folders of Word documents, or whatever.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<commandGroup open="False" name="example - scan movie folders to create payload xml" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="344" name="Scan movie folder" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch.Capture</cmdType>
      <params>
        <param>C:\Windows\System32\cmd.exe</param>
        <param>/C dir \\NAS\video\Movies\*.??? /s /b /A:-D</param>
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>RegExTool.Open</cmdType>
      <params>
        <param>True</param>
      </params>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>(.*\\)(.*?)(  \.mkv  |  \.avi  |  \.mp4)</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\myMovies.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <params>
        <param>payloads\myMovies.xml</param>
        <param>{Match.{i}}</param>
        <param>{Match.{i}.2}</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>created xml with {#m} movies</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Scan my movie folder</phrase>
  </command>
  <command id="345" name="play my movie" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Launch.OpenFile</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.Speak</cmdType>
      <params>
        <param>Now playing {PF.1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>play my movie</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\myMovies.xml</payloadFromXML>
  </command>
  <command id="381" name="play a random movie" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>PayloadXML.GetRandomP</cmdType>
      <params>
        <param>payloads\myMovies.xml</param>
        <param>1</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>Now playing {Match.1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.GetValue</cmdType>
      <params>
        <param>payloads\myMovies.xml</param>
        <param>{Match.1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Launch.OpenFile</cmdType>
      <params>
        <param>{LastResult}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>play a random movie</phrase>
  </command>
</commandGroup>

If you're too young to know how to use command line stuff, now's your chance to see how it works and explore how these fundamental concepts can be enriched in the VC environment.

To experiment with the above xml, you'll have to replace our NAS path with an appropriate equivalent on your system.

I find the SS64 website is a great reference for command syntax. http://ss64.com/nt/ (in this case, follow the "Dir" link)

23
Для VoxCommando была добавлена поддержка русского языка в интерфейсе. Для установки русского языка необходимо скачать версию программы 2.2.0.7, или более позднюю, затем перейти в опции и выбрать в "display language" значение "ru", после чего следует перезапустить VoxCommando.


24
General / Russian question
« on: October 25, 2015, 11:33:14 AM »
Hello to our more bilingual Russian friends.

We are wondering whether any of you could translate just 2 sentences for us?

It seems that a lot of Russian users don't know that VC recently added a Russian-language user interface. We would like to alert them to this update. We have a new video that will show how to change the display language in Options.

If one of you could translate the following text, it would be really helpful!

Title for VoxCommando video:
Quote
Russian UI for VoxCommando

Description text:
Quote
The VoxCommando user interface has been translated into Russian.  Download version 2.2.0.7 or later and set  "display language" to "ru" in options, then restart the program.

** ​notes:
If there is no equivalent for "UI" in Russian then just "interface" or "user interface" or "display language" is fine, whatever makes sense.

In the description, please leave "display language" and "ru" in English, if possible, because these will be in English in their configurations until they change the options.

Many thanks in advance!

25
VoxCommando Basics and Core Features / MOVED: Skype Plugin
« on: October 15, 2015, 09:42:28 AM »
This topic has been moved to Support ยป Plugins.

http://voxcommando.com/forum/index.php?topic=2359.0

26
Integration Ideas / MOVED: Lifx Bulb Scrape.Put
« on: October 11, 2015, 11:40:36 AM »
This support question regarding the Scrape.Put action has been moved to Support > VoxCommando Basics and Core Features.

http://voxcommando.com/forum/index.php?topic=2357.0

27
Bug Reports / MOVED: Unhandled Exception Error with RoboB plugin
« on: October 05, 2015, 12:25:39 PM »

28
Recently we redoubled our efforts to translate more of the UI for VoxCommando into languages that we know some of you are using.

We are hoping to add Spanish and Italian to the mix.

If this is something that you would like to help with, please see our blog post for more information.

http://voxcommando.com/home/2015/08/06/ui-translations/

29
Bug Reports / MOVED: Please help solve the problem
« on: August 27, 2015, 08:47:52 AM »
This support question that was not a bug report has been moved to Support > VoxCommando Basics and Core Features.

http://voxcommando.com/forum/index.php?topic=2330.0

30
***2017 UPDATE***

As of VC Version 2.2.3.4, a sample web remote is packaged with the program. You do not need to download the scripts in this thread.

When you enable the TCP Plugin's web server and click "Launch in browser" you will see a link for:
Advanced web remote with javascript - VoxRemote example

Click on that link to test the example. To customize the remote, look for the voxremote.html, styles.css, and vc-link.js files in your [VC]\plugins\TCP\html folder. Be sure to create a backup copies before editing.

***


On another thread we've been discussing various ways to interact with VC from a mobile device.

James mentions that one versatile option (which requires no other apps) is to use the TCP plugin's simple web server and create your own customized web page. You can basically create your own remote control and put a shortcut on your phone's home screen for easy access.

For anyone who is interested in this solution but who would like help getting started, I posted a mobile-friendly example html page that you are welcome to download and customize to your own needs.

The full post with some instructions: http://voxcommando.com/forum/index.php?topic=2307.msg20038#msg20038

The javascript in the html attachment includes some explanatory commenting, but not a lot, so if you'd like more details or clarification feel free to ask.

The script makes use of VoxCommando's API to communicate with VC (executing specific actions in VC and asking for information from VC): http://voxcommando.com/mediawiki/index.php?title=API_Application_Programming_Interface





Pages: 1 [2] 3 4 ... 8