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.


Messages - nime5ter

Pages: 1 [2] 3 4 ... 136
16
New Releases / Re: Major update ALPHA 2.3.0.1
« on: August 17, 2019, 03:53:57 PM »
oops.  I'm not sure what happened there.  I will take a look at this when I get home at the end of August.

17
New Releases / Re: Major update ALPHA 2.3.0.1
« on: August 12, 2019, 08:13:36 AM »
Thanks for all your efforts with alpha-testing, PegLegTV. Historically this phase was my job, but I've been too busy at work. Glad James has other good folks who're willing and able to contribute!

And yes, wrt speaksync, James mentioned to me last week that it was going to be a challenge to find a good solution for that; rest assured it's on the list. :)

18
VoxCommando Basics and Core Features / Re: Search a in b
« on: July 08, 2019, 02:18:32 PM »
Like James, I'm not 100% sure if I understood you, but I *think* you're trying to do something like this?


Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.7-->
<command id="454" name="Search my list for {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>VC heard: {1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PayloadXML.GetValue</cmdType>
    <params>
      <param>payloads\produce.xml</param>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>LastActionSuccess</ifType>
    <ifParams>&amp;&amp;</ifParams>
    <then>
      <action>
        <cmdType>OSD.AddText</cmdType>
        <params>
          <param>Found: {LastResult}</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else>
      <action>
        <cmdType>OSD.AddText</cmdType>
        <params>
          <param>{1} was not found in the Produce payload file</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </else>
  </if>
  <phrase>Search my list for</phrase>
  <payloadDictation>payloadDictation: Regular</payloadDictation>
</command>

The example above does the following:
1. Voice command: Search "my list" for {payload based on payload dictation}.
2. Command searches a payload xml file called "produce.xml" (see attached*) to see if the understood phrase is found.
3. If that phrase is found, returns the value from the payload XML file.
4. If phrase not found, my command indicates that it wasn't found.

If one wanted to execute 2 different commands depending on the if/else logic, one could use event triggers (VC.TriggerEvent) in each case to trigger 2 separate commands.

There are other ways to do this as well.

I admit I may be misunderstanding your aim but maybe this starting point can help the discussion progress.

*The file path in the command points to the produce.xml file stored in the payloads folder of my VC directory.



19
This is very helpful, thanks again.

20
How customized is your Kodi-VC command set relative to our out of the box configuration?

Just wondering if we need to run through the entire default command set to test them all, now. The impetus to upgrade Kodi and do all that is a tad less than it used to be around here.  ::)

21
Thanks PeglegTV. I've been hoping you'd notice this thread. I was going to suggest he try PMing you, as our resident Kodi aficionado.

It's true, we're still on Kodi 17 in-house.

22
The "Select" command in the Kodi Simple actions group in VC is sending the enter key code to Kodi's event client.

For me, if I navigate to TV episodes for a particular show season and say "Select" Kodi is properly playing the episode. My scenario is the same as James' -- talking to Kodi on a different Windows machine on my LAN.

If it's not working reliably for you, you could try editing that XJson.Btn.KB action in your "Select" command to send the return key code instead of enter.

I just tested return in my setup and it works as well.

Here are the codes that are being used: https://github.com/xbmc/xbmc/blob/master/system/keymaps/keyboard.xml

23
Welcome to the forum.

I'm not familiar with that hub. It depends what kind of functionality you're hoping for but it looks like the simplest option might be to use its Maker API with VoxCommando's Scrape action.

https://docs.hubitat.com/index.php?title=Maker_API

https://voxcommando.com/mediawiki/index.php?title=Home_Automation#Scrape

The Fibaro and/or Domoticz posts on the forum should give you some sense of how to construct commands.

Note about commands posted as XML on the forum: https://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum

24
For future reference, when seeking support on the forum it's often easier to post the commands that you're running into challenges with (as long as there's no private/personal info in the commands that you're concerned about).

Basically, you can just select and Ctrl-C the command or command group in the VC editor window, then Ctrl-V into a code box on the forum.

Per the "Posting Your Code on the Forum" section of the wiki:

https://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum

25
VoxCommando Basics and Core Features / Re: Hold key to listen
« on: April 03, 2019, 08:58:41 AM »
Good morning,

A somewhat unhelpful update from the lab:

I am logged onto a Windows 10 computer as an Admin. UAC is on.

I've now tested James's Hook command for temporarily switching VC into listening mode, first using a tilde and then using my left-Alt key. So far it seems to be working.

One thing we found helpful for testing was to turn on the "Show Overlay" setting in VC's Options (https://voxcommando.com/mediawiki/index.php?title=Main_Menu#Options). This makes it easier to see when VC is listening when other programs are focused and maximized.

For me, this command worked no matter which program was in focus. I tried Notepad++, MS Word 2010, and Chrome.

The tilde obviously was a little inconvenient because it was typing the character over and over in my document as long as the key was held down. :) But the VC command functioned; VC stayed in listening mode until I released that key.

26
Other Plugins / Re: Weather Underground - WUnder Plugin
« on: March 10, 2019, 09:18:45 AM »
There is no fix possible for the Wunder plugin. The API used to be free. Now it is not. VoxCommando cannot support 3rd party services that charge fees to developers.

If you know how to write basic code with Python, you can try using  https://openweathermap.org/api

Or see this post, which suggests using IFTTT.
https://voxcommando.com/forum/index.php?topic=2885.msg24435#msg24435

https://ifttt.com/weather


27
Bug Reports / Re: Weatherunderground.com plugin not working
« on: March 09, 2019, 05:51:59 PM »
For sure. That sounds like a much better option.

28
Bug Reports / Re: Weatherunderground.com plugin not working
« on: March 09, 2019, 01:18:35 PM »
There's a note in the command xml, but in case it's not obvious you'll need to get your own API key and use that in your requests.

These examples are not for unseasoned users, but I figure that you as a Super User can probably do something with them if you're desperate. ;-)

29
Bug Reports / Re: Weatherunderground.com plugin not working
« on: March 09, 2019, 09:09:43 AM »
Here I used the XJson plugin's token parser to parse the Open Weather's json data for today's forecast.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.5-->
<command id="280" name="Today's forecast" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="You can paste the full scrape results into an online JSON viewer for help finding all the variables. list[0] contains today's data. list[1] would be tomorrow's etc.">
  <action>
    <cmdType>Scrape</cmdType>
    <params>
      <param>https://api.openweathermap.org/data/2.5/forecast?units=metric&amp;lat=yourlatitude&amp;lon=yourlongitude&amp;APPID=yourapikeygoeshere&amp;units=metric</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>forecast</param>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>Today's forecast calls for a high of {list[0].main.temp_max} degrees and {list[0].weather[0].description}.</param>
      <param>{var.forecast}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.ParseTokens</cmdType>
    <params>
      <param>{list[0].wind.speed}</param>
      <param>{var.forecast}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)&lt;(B)</ifType>
    <ifParams>10&amp;&amp;{LastResult}</ifParams>
    <then>
      <action>
        <cmdType>OSD.AddText</cmdType>
        <params>
          <param>Expect winds of {LastResult} km/h</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <phrase>What's today's forecast</phrase>
</command>

It's doable. To implement it beyond a demo command, one would want to break down some of the steps into different commands probably. Especially to avoid re-querying the Open Weather site unless new data is needed.

OK, that's my morning fun. Now back to the espresso machine for my morning cappuccino fix ...

30
Bug Reports / Re: Weatherunderground.com plugin not working
« on: March 08, 2019, 06:51:10 PM »
Open Weather Map might be usable for your needs.  https://openweathermap.org/

The API's http queries are pretty straightforward. Unfortunately, the results are probably easier to manage with Python or real programming due to the values they return, which need to be made more human friendly.

Just for the heck of it, however, I signed up for a key and created the command below. It grabs today's sunrise and sunset times from a full five-day forecast with a lot of other info in it. Forecast information could similarly be grabbed with scrape and regular expressions.

Since the request results return everything in Greenwich mean time (UTC +0), I had to subtract 5 from the hours. This makes it kind of silly overkill to get basic info. I did it just for a few minutes of fun, really. :)

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.4.5-->
<command id="283" name="Get 5-day forecast (location by lat,lon)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Get your own api key at: https://openweathermap.org/&#xD;&#xA;In your own apiKeys map, add an openWeather key with a value: APPID=YOUR_APIKEY&#xD;&#xA;In Scrape action: Change the lat&amp;long to your own real coordinates. units=metric can be changed to units=imperial">
  <action>
    <cmdType>Scrape</cmdType>
    <params>
      <param>https://api.openweathermap.org/data/2.5/forecast?{M:apiKeys.openWeather}&amp;mode=xml&amp;units=metric&amp;lat=0&amp;lon=-1</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>forecast</param>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>&lt;sun\srise.*?T(\d\d):(\d\d).*?T(\d\d):(\d\d)</param>
      <param />
      <param>{var.forecast}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result={Match.1.1}-5</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>sunrise</param>
      <param>{LastResult}:{Match.1.2}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result={Match.1.3}-5</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>sunset</param>
      <param>{LastResult}:{Match.1.4}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>Sunrise: {var.sunrise}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.AddText</cmdType>
    <params>
      <param>Sunset: {var.sunset}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Get forecast</phrase>
</command>


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