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 - Haddood

Pages: 1 [2] 3 4 ... 9
16
Feature Requests / Repeating IF block
« on: February 03, 2016, 01:21:01 PM »
James,
If you can introduce a field for the if statement to repeat like other commands ... then we will have a loop with If statement

do you think it can be done?

17
VoxCommando Basics and Core Features / translating cURL to Scrape
« on: January 04, 2016, 05:24:34 PM »
I am working on integrating DashingIO with VC ... to update the widgets with new info they posted example of cURL ... and it look like this (for windows):
curl -X POST  -H "Content-Type: application/json" -d "{ \"auth_token\": \"pass\", \"text\": \"Off\" }" http://localhost:3030/widgets/VoxCommando

i am trying to use scrape post, but I keep getting error:
JSON:: ParserError - 757: unexpected token at ' 'auth_token' : 'pass', 'text': 'Off' '
when I am using a command like the one below... I tried double qoutes ... with slashes and without ... non is working  :bonk :bonk

anyhelp appreciated


Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.4-->
<command id="878" name="Send Status to Dashing" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Scrape.Post</cmdType>
    <params>
      <param>http://localhost:3030/widgets/VoxCommando</param>
      <param> 'auth_token': 'pass', 'text': 'Off'</param>
      <param />
      <param />
      <param>application/json</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

18
Let's hope it t comes out soon ... And can be integrated with VC
http://www.bbc.com/news/technology-34581694

19
Off Topic (not related to VC) / Smart Toilette
« on: August 25, 2015, 09:48:57 AM »
guys check this out ...
http://homeautomationguru.com/automate-your-toilet/

I think one can link it to VC ... and instead of having an sms .. VC will announce it to the whole house :D

20
Haddood's Gems / Gems of the Gems !!!!
« on: August 22, 2015, 06:10:33 PM »
this thread will track, la créme de la créme commands ... you might find links to the same commands in other threads as well ....
enjoy!

21
Bug Reports / TTS.GetLastText
« on: August 05, 2015, 08:26:21 PM »
the new action in TTS plugin ... always gives me an error "No TTS text has been spoken yet" ...
version 2.206 ...  IVONA 2 Brian - British English male voice

if logs needed ... will upload it

22
Feature Requests / Prefix, Alternate generation option.
« on: July 07, 2015, 04:36:56 PM »
Based on discussion here
http://voxcommando.com/forum/index.php?topic=2065.msg17902#msg17902

I think it will be helpful for open-air mic setup, if we have an option that would suppress generating alternates when prefix mode is enabled, unless prefix.start event happens ...

23
Feature Requests / Last Spoken Variable (from TTS plug-ins)
« on: July 06, 2015, 07:07:33 PM »
Based on discussion here
http://voxcommando.com/forum/index.php?topic=2076.msg17980#msg17980

it would be helpful to introduce a variable of {TTSLast Spoken} or something similar

24
Tips and Tricks / Boolean AND in Logical blocks
« on: July 05, 2015, 04:48:35 AM »
I often find I need to use AND in Logical blocks ... for example;
if the action = entered and location = home then unlock the door
till now I solved these kind of situation with work around ... that I did not like or complicated ...(VC do not offer AND in traditional way)

as I was working on integrating IFTTT maker channel with VC I realized that it is very easy to do that without any work around ... by creating a logical block (assuming action is passed as payload 1, and location as payload 2):

if (A)==(B)    {1} {2}   ----  entered home .... and voila, we have the AND operator ...
not sure if this was mentioned before in the forums or it is in the wiki ... but it made my life much easier



25
Bug Reports / Typo in Action Builder Parameter Help
« on: July 03, 2015, 07:22:16 AM »
in the window of Action Builder Parameter Help, there is a typo.... loop iteration is listed as {J} instead of {j} ...and if {J} used it won't be replaced .... this might be confusing to new Voxteers

26
VoxCommando Basics and Core Features / Map delete key
« on: May 28, 2015, 05:26:27 PM »
is there a way to delete a map entry ? maybe using Map.Query with SQL delete ... if so some examples will be great help (been more than 5 years since i last wrote sql queries)

27
I finished building 4 lines LCD using arduino with PY that gives me feedback when a command recognised (send to serial then arduino displays it on LCD)...
however, since I use VC machine mostly without a monitor, it would be great if I can reflect all the feedback (what is being recognised) that VC shows on top of it is screen in the LCD ... is there a way to achieve this ?

28
VoxCommando Basics and Core Features / Get profile
« on: April 15, 2015, 02:50:39 AM »
Is there a way to know which profile is current, apart from tracking it manually ?

29
General Discussion / VC and Windows 64
« on: April 10, 2015, 04:59:53 PM »
I am thinking to upgrade VC machine to windows 64bit ... any known issues recommendation ...etc. I would love to hear from other users experience before I do the upgrade

P.S. I searched the forums .. and did not find much info

30
XML Exchange / Unit Converter
« on: April 01, 2015, 05:17:41 AM »
this unit converter relies on Google, so it need internet connection. the advantage that it can convert from any unit to any unit... just add what you use to xml payload

check https://support.google.com/websearch/answer/3284611?hl=en-CA#unitconverter for full list of supported units ...

here is a new command, that is memory & SP version friendly .... this version requires PY plug-in and attached PY script to be loaded at start-up ( based on http://voxcommando.com/forum/index.php?topic=1769.msg15399#msg15399 which list james PY script)
range is limited between - 999999999.xxx to 999999999.xxx (can be increased !!!!)

I would build multiple commands based on conversion type, ie. one for weight, one for volume ...etc. to increase recognition accuracy (avoid converting 3 cubic meters to square centimeters)

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<command id="226" name="Unit Converter" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="&lt;H2 class=r style=&quot;FONT-SIZE: 138%; DISPLAY: inline&quot;&gt;20 kilograms = 44.0924524 pounds&lt;/H2&gt;">
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>Number</param>
      <param><![CDATA[ ]]></param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetLastResult</cmdType>
    <params />
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>{LastSpoken}&amp;&amp;point</ifParams>
    <then>
      <action>
        <cmdType>Results.RegEx</cmdType>
        <params>
          <param>(.*?)\spoint\s(.*?){PF.1}</param>
          <param />
          <param>{LastSpoken}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>PY.ExecString</cmdType>
        <params>
          <param>result = txt2int ("{Match.1.2}")</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>Number</param>
          <param>.{LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Results.SetLastResult</cmdType>
        <params>
          <param>{Match.1.1} {PF.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>Results.SetLastResult</cmdType>
        <params>
          <param>{LastSpoken}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <action>
    <cmdType>Results.Replace</cmdType>
    <params>
      <param>minus</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>Convert\s(.*?){PF.1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result = txt2int ("{Match.1}")</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)Contains(B)</ifType>
    <ifParams>{LastSpoken}&amp;&amp;minus</ifParams>
    <then>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>Number</param>
          <param>-{LastResult}{var.Number}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>Results.SetVar</cmdType>
        <params>
          <param>Number</param>
          <param>{LastResult}{var.Number}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <action>
    <cmdType>Results.SetLastResult</cmdType>
    <params>
      <param>{var.Number}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastSpoken}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.AddText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Scrape</cmdType>
    <params>
      <param>https://www.google.ca/search?biw=1920&amp;bih=939&amp;noj=1&amp;site=webhp&amp;q=convert+{LastResult}+{1}+to+{2}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegExSingle</cmdType>
    <params>
      <param>&lt;h2\sclass="r".*?&gt;(.*?)&lt;/h2&gt;</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>LastActionSuccess</ifType>
    <ifParams>&amp;&amp;</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{Match.1.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>I think that can not be done !</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <phrase>Convert</phrase>
  <phrase optional="true">minus</phrase>
  <phrase optional="true">one, two, three, four, five, six, seven, eight, nine</phrase>
  <phrase optional="true">hundred</phrase>
  <phrase optional="true">and</phrase>
  <phrase optional="true">twenty, thirty, forty, fifty, sixty, seventy, eighty, ninety</phrase>
  <phrase optional="true">one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen</phrase>
  <phrase optional="true">million</phrase>
  <phrase optional="true">and</phrase>
  <phrase optional="true">one, two, three, four, five, six, seven, eight, nine</phrase>
  <phrase optional="true">hundred</phrase>
  <phrase optional="true">and</phrase>
  <phrase optional="true">twenty, thirty, forty, fifty, sixty, seventy, eighty, ninety</phrase>
  <phrase optional="true">one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen</phrase>
  <phrase optional="true">thousand</phrase>
  <phrase optional="true">and</phrase>
  <phrase optional="true">one, two, three, four, five, six, seven, eight, nine</phrase>
  <phrase optional="true">hundred</phrase>
  <phrase optional="true">and</phrase>
  <phrase optional="true">twenty, thirty, forty, fifty, sixty, seventy, eighty, ninety</phrase>
  <phrase optional="true">zero, one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen</phrase>
  <phrase optional="true">point</phrase>
  <phrase optional="true">one, two, three, four, five, six, seven, eight, nine</phrase>
  <phrase optional="true">hundred</phrase>
  <phrase optional="true">and</phrase>
  <phrase optional="true">twenty, thirty, forty, fifty, sixty, seventy, eighty, ninety</phrase>
  <phrase optional="true">zero, one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\MeasurementsUnits.xml</payloadFromXML>
  <phrase>to</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\MeasurementsUnits.xml</payloadFromXML>
</command>
    old command ...

    •    be careful, do not put all units in one xml, as the matrix will be too big and VC will eat-up too much memory for nothing. instead create multiple commands and attach different xml. ex. one command for area, other for volume, third for currency ...etc. and keep it to minimum
    •      limited to the 2 ranges ... keep the ranges small (saves memory)
    •     won't work with SP
    [/li]

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.4.2-->
<command id="191" name="Convert" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="&lt;H2 class=r style=&quot;FONT-SIZE: 138%; DISPLAY: inline&quot;&gt;20 kilograms = 44.0924524 pounds&lt;/H2&gt;&#xD;&#xA;">
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)==(B)</ifType>
    <ifParams>{#P}&amp;&amp;4</ifParams>
    <then>
      <action>
        <cmdType>Results.SetLastResult</cmdType>
        <params>
          <param>{1}.{2}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Scrape</cmdType>
        <params>
          <param>https://www.google.ca/search?biw=1920&amp;bih=939&amp;noj=1&amp;site=webhp&amp;q=convert+{LastResult}+{3}+to+{4}&amp;oq=convert+20+kg+to+lbs</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>Results.SetLastResult</cmdType>
        <params>
          <param>{1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>Scrape</cmdType>
        <params>
          <param>https://www.google.ca/search?biw=1920&amp;bih=939&amp;noj=1&amp;site=webhp&amp;q=convert+{LastResult}+{2}+to+{3}&amp;oq=convert+20+kg+to+lbs</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <action>
    <cmdType>Results.RegExSingle</cmdType>
    <params>
      <param>&lt;h2\sclass="r".*?&gt;(.*?)&lt;/h2&gt;</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>LastActionSuccess</ifType>
    <ifParams>&amp;&amp;</ifParams>
    <then>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>{Match.1.1}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>TTS.Speak</cmdType>
        <params>
          <param>I think that can not be done !</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <phrase>Convert</phrase>
  <payloadRange>1,10000</payloadRange>
  <phrase optional="true">point</phrase>
  <payloadRange optional="true">1,999</payloadRange>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\MeasurementsUnits.xml</payloadFromXML>
  <phrase>to</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\MeasurementsUnits.xml</payloadFromXML>
</command>

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