News:

If you have an Android device, check out VoxWav!

Main Menu

Recent posts

#11
Here's the log from one execution of the command:


1/25/2025 6:22:34 PM 207 Something was recognized
1/25/2025 6:22:34 PM 207 Rulename: root # Semantics: 3
1/25/2025 6:22:34 PM 207 Group: Device Montor Speech: Maggie What Color is Ambient Lighting
1/25/2025 6:22:34 PM 208 semanticID: 171
1/25/2025 6:22:34 PM 208 kvp: prefix | Maggie
1/25/2025 6:22:34 PM 208 kvp: command | 171
1/25/2025 6:22:34 PM 208 kvp: payload1 | <171:Ambient Lighting>710
1/25/2025 6:22:34 PM 208 no regex match found
1/25/2025 6:22:34 PM 208 id from payload value: 171
1/25/2025 6:22:34 PM 210 semanticID: 171
1/25/2025 6:22:34 PM 210 kvp: prefix | Maggie
1/25/2025 6:22:34 PM 210 kvp: command | 171
1/25/2025 6:22:34 PM 210 kvp: payload1 | <171:Ambient Lighting>710
1/25/2025 6:22:34 PM 210 no regex match found
1/25/2025 6:22:34 PM 210 id from payload value: 171
1/25/2025 6:22:34 PM 210 alternate:Maggie What Color is Ambient Lighting
1/25/2025 6:22:34 PM 220 A prefix is required to execute this command.
1/25/2025 6:22:34 PM 246 addHistoryItem [vcevent] VC.Prefix.End

1/25/2025 6:22:34 PM 250 doCommand:What Color
1/25/2025 6:22:34 PM 250 Action claims to be threadsafe.
1/25/2025 6:22:34 PM 250 action repeat set to: 1
1/25/2025 6:22:34 PM 250 Action:  Scrape
1/25/2025 6:22:34 PM 250 Param1:http://192.168.123.123/apps/api/543/devices/710/attribute/colorName?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1/25/2025 6:22:34 PM 250 addHistoryItem [action] Scrape:http://192.168.123.123/apps/api/543/devices/710/attribute/colorName?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

1/25/2025 6:22:34 PM 300 Action RESULT:
1/25/2025 6:22:34 PM 300 Action is NOT threadsafe: Results.RegEx
1/25/2025 6:22:34 PM 300 action repeat set to: 1
1/25/2025 6:22:34 PM 300 Action:  Results.RegEx
1/25/2025 6:22:34 PM 300 Param1:"value":"(.*?)"
1/25/2025 6:22:34 PM 300 addHistoryItem [action] Results.RegEx:"value":"(.*?)"

1/25/2025 6:22:34 PM 308 addHistoryItem [error] Results.RegExUnexpected error:
System.NullReferenceException: Object reference not set to an instance of an object.
   at VoxCommando.ResultsVars.RegExMyResults(String[] parsedParams, Boolean useSingleLine)
   at eval_g.eval_ᜃ(macroElement A_0, List`1 A_1, Int32 A_2)
   at eval_g.eval_ᜂ(macroElement A_0, List`1 A_1, Int32 A_2)
1/25/2025 6:22:34 PM 314 Unexpected error in action: Results.RegEx
System.NullReferenceException: Object reference not set to an instance of an object.
   at VoxCommando.ResultsVars.RegExMyResults(String[] parsedParams, Boolean useSingleLine)
   at eval_g.eval_ᜃ(macroElement A_0, List`1 A_1, Int32 A_2)
   at eval_g.eval_ᜂ(macroElement A_0, List`1 A_1, Int32 A_2)
1/25/2025 6:22:34 PM 314 Action claims to be threadsafe.
1/25/2025 6:22:34 PM 314 action repeat set to: 1
1/25/2025 6:22:34 PM 314 Action:  TTSMS.Speak
1/25/2025 6:22:34 PM 314 error replacing variables: {Match.1}
1/25/2025 6:22:34 PM 314 Param1:{Match.1}
1/25/2025 6:22:34 PM 314 addHistoryItem [action] TTSMS.Speak:{Match.1}

1/25/2025 6:22:34 PM 319 Action from plugin: C:\VOX COMMANDO\Plugins\TTSMS\TTSMS.dll
1/25/2025 6:22:34 PM 320 Action INFO: speaking (asynchronous): {Match.1}
1/25/2025 6:22:34 PM 324 Action is NOT threadsafe: OSD.ShowText
1/25/2025 6:22:34 PM 324 action repeat set to: 1
1/25/2025 6:22:34 PM 324 Action:  OSD.ShowText
1/25/2025 6:22:34 PM 325 Param1:{"id":"710","attribute":"colorName","value":"Red"}
1/25/2025 6:22:34 PM 325 addHistoryItem [action] OSD.ShowText:{"id":"710","attribute":"colorName","value":"Red"}

1/25/2025 6:22:34 PM 355 Action INFO: OK
1/25/2025 6:22:34 PM 356 addHistoryItem [vcevent] tts.start

1/25/2025 6:22:36 PM 4 addHistoryItem [vcevent] tts.end

1/25/2025 6:22:37 PM 852 addHistoryItem [vcevent] VC.NotRecognized

1/25/2025 6:22:38 PM 351 guessed text:Is The ?? (Device Montor)
1/25/2025 6:22:39 PM 471 addHistoryItem [vcevent] VC.NotRecognized


I see what looks like regex related error in the middle of the log but I'm not sure how to interpret them.
#12
It looks correct to me.  I would need to see a log to help you further.
#13
I built the following and the OSD shows the sting coming back with the color at the end of it, but the TTS is speaking the variable name "Match One" instead of the variable result "Red."


            <command id="171" name="What Color" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
                <action>
                    <cmdType>Scrape</cmdType>
                    <params>
                        <param>http://192.168.123.123/apps/api/543/devices/{1}/attribute/colorName?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>Results.RegEx</cmdType>
                    <params>
                        <param>"value":"(.*?)"</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>TTSMS.Speak</cmdType>
                    <params>
                        <param>{Match.1}</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <action>
                    <cmdType>OSD.ShowText</cmdType>
                    <params>
                        <param>{LastResult}</param>
                    </params>
                    <cmdRepeat>1</cmdRepeat>
                </action>
                <phrase>What Color is</phrase>
                <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">Hubitat Device List.xml</payloadFromXML>
            </command>


I tested the regex syntax in the Expression Helper, and it returns 1:"value":"Red"

I did a couple tests with fixed device IDs to be sure it wasn't my payload table.
All of them returned a string with either the lights color or null for none RGB bulbs.
But the TTS always comes back "match one".

Did I botch something in my setup?
#14
Hi Tom.

Just scrape will put that string with the colour in to the {LastResult} variable.  You could use an action like OSD.Show {LastResult} and it would show you {"id":"123","attribute":"colorName","value":"Red"}

But you want to isolate the colour from the rest of that info so you need to use result.regex to search the string for a matching pattern.

I've created a command that does this for you to get the "value".  It will work for anything that returns a value string. Note that if you are asking for a number like dim level then the pattern will be a bit different because the json won't have quotes around the value.  You can paste this xml into your editor to get an idea of how the macro should work.

<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.5.0.2-->
<command id="1329" name="get device info" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Scrape</cmdType>
    <params>
      <param>http://192.168.123.123/apps/api/543/devices/123/attribute/colorName?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>"value":"(.*?)"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>OSD.ShowText</cmdType>
    <params>
      <param>{Match.1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>
#15
Hi, after several years away from Vox Commando I'm back at it. I have switch, color, hue, and level controls all working between VC and my Hubitat. I'll have a few questions about how to streamline things later but for now I'm trying to wrap my head around reading things back from Hubitat.

If I use my browser to send http://192.168.123.123/apps/api/543/devices/123/attribute/colorName?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to Hubitat. Hubitat returns  {"id":"123","attribute":"colorName","value":"Red"}

What I want to do is send that to Hubitat and based on response from Hubitat have VC speak the color using TTS.

Will Scrape pickup hubitat's response or do I need to use Get?  I've tried a few different things but can't figure out how to pick up that response and parse the color from it.  I looked at the Wiki and several forum posts, but I haven't been able to figure it out yet.

Any help would be greatly appreciated.

Thanks!
Tom G.\.
#16
Здравствуйте,  вот недавно заметил очень не приятную проблему...
Использую GoogleSpeech, как основное распознавание в VoxCommando, так как распознавание на уровень выше, но при его использовании VoxCommando в случайное время может наглухо зависать.
обычно это происходит когда говоришь команду и случайно запинаешься в произношении её и даешь другую команду, начинаешь как бы флудить в микрофон и происходит зависание программы.
Происходит это в абсолютно случайное время. может через 2 мин. произойти а может и через 30 мин.
точно воспроизвести такое поведение не просто, чистая случайность.

Параметры в TCP плагине таковы
Префикс в GoogleSpeech не назначен, потому он воспринимает и передает всё что говорится в микрофон.
Параметр Send all text to VC speech engine if no patterns are matched установлен.

Всех с Новым Годом!!!!
#17
General / Re: Amazing new podcast
Last post by jitterjames - November 01, 2024, 06:51:39 PM
Thanks PegLeg. Agreed!  ;D
#18
General / Re: Amazing new podcast
Last post by PegLegTV - November 01, 2024, 06:49:01 PM
 :clap That's awesome, AI is impressive (and terrifying ::bugeyes). people don't know what they are missing out on when they skip over VC.
#19
General / Re: Amazing new podcast
Last post by Kalle - October 08, 2024, 01:59:33 AM
 8)
#20
General / Amazing new podcast
Last post by jitterjames - October 04, 2024, 10:06:47 AM