Quantcast
Channel: HomeSeer Message Board
Viewing all articles
Browse latest Browse all 4847

Plugin Speach \ Alexa Skill \ Pair.ControlUse

$
0
0
I'm new to speach portion of HS3 due to Alexa Skill and having some issues having the commands understood
I wrote a plugin a year ago to handle my Monoprice 6 Zone Amp, wWhen I designed the plugin I added buttons for Power\Source\Mute\Volume... as below

ref = hs.NewDeviceRef(Zone + " Music Power") (ie Kitchen)
...
Dim Pair As VSPair
Pair = New VSPair(HomeSeerAPI.ePairStatusControl.Both)
Pair.PairType = VSVGPairType.SingleValue
Pair.Value = 1
Pair.Status = "Power On"
Pair.Render = Enums.CAPIControlType.Button
hs.DeviceVSP_AddPair(ref, Pair)
GPair = New VGPair
GPair.PairType = VSVGPairType.SingleValue
Pair.ControlUse = ePairControlUse._On
GPair.Set_Value = 1
hs.DeviceVGP_AddPair(ref, GPair)


Example is Device Name "Kitchen Music Power"
Which under "Status Graphics" Tab has
Value: 0 Status:Power Off Control Use:Off Status-Control:Both
Value: 1 Status:Power On Control Use:On Status-Control:Both

The Buttons nicely render as "Power On", But when I speak to Alexa to say
"Kitchen Music Power ON" she doenst understand
Even
"Kitchen Music Power POWER ON" she doenst understand the full Pair.Status - Guessing Multi word Command not allowed?
Buy Why? Even if "Power On" failed, HS should know the commands "ON and OFF" and apply them to the "Control Use" regardless of the Status string

Also as I test, I changed:
Value: 0 Status:Power Off
Value: 1 Status:Power On

to

Value: 0 Status:Foo
Value: 1 Status:Bar

and saying

'Alexa "Kitchen Music Power .. FOO"
shut the lights off? Again confirming that HS3 only applies the spoken text to the DEVICE_NAME+STATUS_STRING

'Alexa "Kitchen Music Power .. OFF" resulted in Command not found
'Alexa "Kitchen Music Power .. VALUE 0" resulted in Command not found

If I change Pair.Status = "On" by setting
Value: 0 Status:Off
Value: 1 Status:On

Now works, Just that my buttons are less informative.

The question I have is if ControlUse = _on or Values are 1/0 should HS3 look at "Value" matching after "Status Text" matching?

Pair.ControlUse = ePairControlUse._On
GPair.Set_Value = 1

I know the Alexa stuff is new, But Speach to Text has been baked in for awhile - is this expected behavior? Does it only match the text string spoken to the Status variable?
I agree that checking the status string should probably occur first, but I think HS should check Values and Control_Use bits instead of giving Command not Found

Thanks - Regards,
Mike

Viewing all articles
Browse latest Browse all 4847

Trending Articles