Support for ColorSetting trait on non-Light device types - google-smart-home

Our hood supports a backlight which supports full RGB color change. The backlight on/off switch was implemented with a trigger, and we implemented the ColorSetting trait to change the color.
When trying to use Google Assistant to change the color however, we get the reply 'It looks like the device hasn't been set up yet'.
We tried changing the device type to 'Light', and the commands to change colors work flawlessly. Is the ColorSetting trait restricted to Light type only, and is there a workaround for this?
Thanks for your help
Edit: SYNC response for hood:
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"payload": {
"agentUserId": "userID",
"devices": [
{
"id": "HAID",
"type": "action.devices.types.HOOD",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.StartStop",
"action.devices.traits.Modes",
"action.devices.traits.FanSpeed",
"action.devices.traits.Toggles",
"action.devices.traits.ColorSetting"
],
"deviceInfo": {
"manufacturer": "MANUFACTURER",
"model": "MODEL",
"hwVersion": "",
"swVersion": ""
},
"name": {
"name": "Dunstabzugshaube",
"nicknames": [
"Dunstabzugshaube"
],
"defaultNames": [
"Dunstabzugshaube"
]
},
"willReportState": true,
"attributes": {
"pausable": false,
"availableModes": [
{
"name": "program",
"name_values": [
{
"name_synonym": [
"program"
],
"lang": "en"
}
],
"settings": [
{
"setting_name": "Auto",
"setting_values": [
{
"lang": "en",
"setting_synonym": [
"auto",
"automatic"
]
}
]
},
{
"setting_name": "circulation",
"setting_values": [
{
"lang": "en",
"setting_synonym": [
"circulation",
"ventilation",
"airflow",
"air flow"
]
}
]
}
],
"ordered": false
}
],
"availableFanSpeeds": {
"speeds": [
{
"speed_name": "S1",
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"fan stage 1",
"Fan Stage 1",
"lowest",
"one"
]
},
{
"lang": "de",
"speed_synonym": [
"lüfter stufe 1",
"Lüfter Stufe 1",
"minimum",
"eins",
"Stufe 1"
]
}
]
},
{
"speed_name": "S2",
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"fan stage 2",
"Fan Stage 2",
"low",
"two"
]
},
{
"lang": "de",
"speed_synonym": [
"lüfter stufe 2",
"Lüfter Stufe 2",
"niedrig",
"zwei",
"Stufe 2"
]
}
]
},
{
"speed_name": "S3",
"speed_values": [
{
"lang": "en",
"speed_synonym": [
"fan stage 3",
"Fan Stage 3",
"medium",
"three"
]
},
{
"lang": "de",
"speed_synonym": [
"lüfter stufe 3",
"Lüfter Stufe 3",
"mittel",
"drei",
"Stufe 3"
]
}
]
}
],
"ordered": true
},
"reversible": false,
"colorModel": "rgb",
"commandOnlyColorSetting": true,
"availableToggles": [
{
"name": "Light",
"name_values": [
{
"name_synonym": [
"light"
],
"lang": "en"
}
]
},
{
"name": "backlight",
"name_values": [
{
"name_synonym": [
"backlight",
"mood light"
],
"lang": "en"
},
{
"name_synonym": [
"Hintergrundbeleuchtung",
"Stimmungslicht"
],
"lang": "de"
}
]
}
]
}
}
]
}
}
Best,
Frank

Your sync response provided above looks correct. Your concern about the command working flawlessly when you set the device type as LIGHT is because LIGHT does have a recommended trait as ColorSetting. To clarify your concern further, some device types do have better support for certain types of relevant grammar/language, which might explain why ColorSetting works better when the device type is set to light.
Google constantly works on the NLU (Natural Language Understanding) algorithms, so this grammar issue would be resolved by now and the ColorSetting trait should now be widely accessible to more devices.
More information about the HOOD and LIGHT device types and their associated traits along with sync, execute and query responses can be found here:
https://developers.google.com/assistant/smarthome/guides/hood
https://developers.google.com/assistant/smarthome/guides/light

Related

Google Smart Home Actions Toggle Trait for Horizontal & Vertical Swing

I am toggling horizontal swing and vertical swing in Hindi language, but assistant is not taking my command and always take me to a web page.
English Utterance: Start Horizontal Swing on Bedroom A/C. (working)
Hindi Utterance: बैडरूम एसी के हॉरिजॉन्टल स्विंग को चालू कर दो.(not working)
I have given all the possible commands in Hindi related to toggle but its not working. Please help me out from this.
Result : Command is to be executed when i am toggling Horizontal swing and vertical swing.
Below is my Google SYNC response:
{
"requestId": "11311483680465073646",
"payload": {
"agentUserId": "123",
"devices": [
{
"id": "stest240",
"name": {
"name": "Bedroom A/C",
"defaultNames": [
"Smart Air Conditioner"
]
},
"type": "action.devices.types.THERMOSTAT",
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.TemperatureSetting",
"action.devices.traits.Toggles"
],
"willReportState": false,
"deviceInfo": {
"manufacturer": "smart-home",
"model": "hs1234",
"hwVersion": "3.2",
"swVersion": "11.4"
},
"attributes": {
"availableThermostatModes": [
"cool",
"dry",
"fan-only"
],
"thermostatTemperatureUnit": "C",
"thermostatTemperatureRange": {
"minThresholdCelsius": 16,
"maxThresholdCelsius": 30
},
"availableToggles": [
{
"name": "horizontalswing",
"name_values": [
{
"name_synonym": [
"horizontal swing"
],
"lang": "en"
},
{
"name_synonym": [
"हॉरिजोंटल स्विंग",
"हॉरिजॉन्टल स्विंग"
],
"lang": "hi"
}
]
},
{
"name": "verticalswing",
"name_values": [
{
"name_synonym": [
"vertical swing"
],
"lang": "en"
},
{
"name_synonym": [
"वर्टिकल स्विंग",
"वर्टीकल स्विंग"
],
"lang": "hi"
}
]
}
]
}
}
]
}
}

Solr Suggester with Context Filtering issue

I am trying to apply second level of filtering on my Solr suggester result for which I used context filtering but it does not seem to work. It works fine if my field is not a multivalued field but it does not seem to work on multivalued field.
Below are my sample schemas:
{
"add-field": [
{
"name": "name",
"type": "text_general",
"indexed": true,
"stored": true,
"multiValued": false
},
{
"name": "groups",
"type": "text_general",
"indexed": true,
"stored": true,
"multiValued": true
}
]
}
{
"add-searchcomponent": {
"name": "user-suggest",
"class": "solr.SuggestComponent",
"suggester": {
"name": "user-name-suggester",
"lookupImpl": "AnalyzingInfixLookupFactory",
"dictionaryImpl": "DocumentDictionaryFactory",
"field": "name",
"payloadField": "id",
"contextField": "groups",
"suggestAnalyzerFieldType": "text_general",
"buildOnStartup": "true"
}
}
}
Sample data:
[
{
"name": "Test1",
"groups": [
"Group1",
"Group2"
]
},
{
"name": "Test2",
"groups": [
"Group1"
]
},
{
"name": "Test3",
"groups": [
"Group2"
]
}
]
URL: https://solr-dev.peakplatform.io/solr/user-xxx/suggest-user-name?indent=true&q.op=OR&q=t&suggest.cfq=Group2&suggest.count=100
When I run without suggest.cfq,it works fine but returns no results when I try with it. Please help on what am I missing?

Google Assistant does not recognize traits name_synonym in italian

I have an issue with the google assistant and my smart home action.
I have implemented the sync intent and this is what I get:
{
"requestId": "15365687660984021903",
"payload": {
"agentUserId": <user_id>,
"devices": [{
"willReportState": true,
"traits": ["action.devices.traits.OnOff", "action.devices.traits.Toggles", "action.devices.traits.FanSpeed", "action.devices.traits.SensorState", "action.devices.traits.HumiditySetting", "action.devices.traits.TemperatureControl", "action.devices.traits.Modes"],
"deviceInfo": {
"model": <model>,
"swVersion": "1.0.0",
"hwVersion": "1.0.0",
"manufacturer": <manufacturer>
},
"name": {
"defaultNames": [],
"name": "Smart Hood",
"nicknames": ["Cop"]
},
"attributes": {
"queryOnlyModes": false,
"availableToggles": [{
"name_values": [{
"name_synonym": ["Light", "Lights"],
"lang": "en"
}, {
"lang": "it",
"name_synonym": ["Luci", "Luce"]
}],
"name": "light"
}, {
"name": "motor",
"name_values": [{
"name_synonym": ["Motor", "Fan"],
"lang": "en"
}, {
"name_synonym": ["Motore", "Ventola"],
"lang": "it"
}]
}],
"commandOnlyModes": true,
"commandOnlyToggles": true,
"temperatureUnitForUX": "C",
"queryOnlyOnOff": false,
"humiditySetpointRange": {
"maxPercent": 100,
"minPercent": 0
},
"queryOnlyTemperatureControl": true,
"queryOnlyHumiditySetting": true,
"commandOnlyOnOff": true,
"commandOnlyFanSpeed": true,
"temperatureRange": {
"minThresholdCelsius": -100,
"maxThresholdCelsius": 100
},
"sensorStatesSupported": [{
"descriptiveCapabilities": {
"availableStates": ["good", "fair", "poor", "unknown"]
},
"name": "AirQuality"
}, {
"descriptiveCapabilities": {
"availableStates": ["clean", "dirty", "needs replacement", "unknown"]
},
"name": "FilterCleanliness"
}, {
"descriptiveCapabilities": {
"availableStates": ["good", "replace soon", "replace now", "unknown"]
},
"name": "FilterLifeTime",
"numericCapabilities": {
"rawValueUnit": "PERCENTAGE"
}
}],
"availableModes": [{
"name": "operatingStatus",
"name_values": [{
"name_synonym": ["Hood mode", "Motor Mode", "Fan Mode"],
"lang": "en"
}, {
"name_synonym": ["Funzione", "Modalità"],
"lang": "it"
}],
"settings": [{
"setting_values": [{
"lang": "en",
"setting_synonym": ["Normal"]
}, {
"lang": "it",
"setting_synonym": ["Normale"]
}],
"setting_name": "normal"
}, {
"setting_name": "auto",
"setting_values": [{
"lang": "en",
"setting_synonym": ["Auto"]
}, {
"lang": "it",
"setting_synonym": ["Auto", "Automatica"]
}]
}, {
"setting_values": [{
"lang": "en",
"setting_synonym": ["Intensive", "Boost"]
}, {
"setting_synonym": ["Intensiva", "Boost"],
"lang": "it"
}],
"setting_name": "intensive"
}, {
"setting_name": "24h",
"setting_values": [{
"setting_synonym": ["24 hours", "h24", "24h"],
"lang": "en"
}, {
"setting_synonym": ["24 ore", "h24", "24h"],
"lang": "it"
}]
}],
"ordered": false
}],
"commandOnlyTemperatureControl": false,
"queryOnlyToggles": false,
"commandOnlyHumiditySetting": false,
"availableFanSpeeds": {
"ordered": false,
"speeds": [{
"speed_values": [{
"speed_synonym": ["Low", "Slow"],
"lang": "en"
}, {
"speed_synonym": ["Bassa", "Lenta"],
"lang": "it"
}],
"speed_name": "low"
}, {
"speed_values": [{
"lang": "en",
"speed_synonym": ["Medium"]
}, {
"lang": "it",
"speed_synonym": ["Medio"]
}],
"speed_name": "medium"
}, {
"speed_values": [{
"lang": "en",
"speed_synonym": ["High", "Fast"]
}, {
"lang": "it",
"speed_synonym": ["Alta", "Veloce"]
}],
"speed_name": "high"
}]
}
},
"type": "action.devices.types.HOOD",
"id": <device_id>
}]
}
}
Until yesterday it worked perfectly.
The problem is that today the google assistant does not recognize the italian synonym but only the ones in english.
But in the response it uses the italian synonym!
The issue started to happen after I choose the language in the Actions console.
what could the problem be?
Thanks for helping.
There are always updates being rolled out from Google on voice recognition features. Sometimes, new traits are modified/added/removed in the most recent update. The language assistant responds you with depends on the language selected in the device, but how the request is parsed depends on a number of factors. Make sure the italian is selected from the settings in the Actions on Google Console, as well as the device you issue the commands from.
If the issue still persists, please open a bug on our Public Issue Tracker.

Alexa custom skill: getting FallbackIntent instead of validation prompt

I have an interaction model with a GetMenuIntent which I can invoke with "what's for {meal}". meal is a MealType custom slot with allowed values of "breakfast" and "lunch". I added validation on the meal slot in my GetMenuIntent to only allow those values defined in the slot type and it works great for those configured values.
However, after saving and building my model, when I put "what's for dinner" into the Utterance Profiler or the interactive tester, It ended up calling my FallbackIntent instead of reprompting for a correct value.
I feel like what I'm trying to do isn't really much different than Amazon's own example here.
Here's "whats for lunch" working correctly:
And here's "whats for dinner" ignoring my GetMenuIntent and calling FallbackIntent instead:
Here's my interaction model:
{
"interactionModel": {
"languageModel": {
"invocationName": "school menus",
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "AMAZON.NavigateHomeIntent",
"samples": []
},
{
"name": "GetMenuIntent",
"slots": [
{
"name": "meal",
"type": "Meal"
},
{
"name": "date",
"type": "AMAZON.DATE"
}
],
"samples": [
"whats for {meal} {date}",
"what will you have for {meal} {date}",
"what is on the menu for {meal} {date}",
"what are we having for {meal} {date}",
"what we're having for {meal} {date}"
]
},
{
"name": "AMAZON.FallbackIntent",
"samples": []
}
],
"types": [
{
"values": [
{
"name": {
"value": "lunch"
}
},
{
"name": {
"value": "breakfast"
}
}
],
"name": "Meal"
}
]
},
"dialog": {
"intents": [
{
"name": "GetMenuIntent",
"confirmationRequired": false,
"prompts": {},
"slots": [
{
"name": "meal",
"type": "Meal",
"elicitationRequired": false,
"confirmationRequired": false,
"prompts": {},
"validations": [
{
"type": "hasEntityResolutionMatch",
"prompt": "Slot.Validation.806855880612.19281662909.602239253259"
}
]
},
{
"name": "date",
"type": "AMAZON.DATE",
"elicitationRequired": false,
"confirmationRequired": false,
"prompts": {}
}
]
}
],
"delegationStrategy": "ALWAYS"
},
"prompts": [
{
"id": "Slot.Validation.806855880612.19281662909.602239253259",
"variations": [
{
"type": "PlainText",
"value": "Hmm, I don't know about that menu type. Please try again."
}
]
}
]
},
"version": "48"
}
Since this is 6 months old I assume you figured out by now that your interaction model only includes Lunch and Breakfast.

Some Modes on action.devices.traits.Modes does not seem to be working

I'm playing around with action.devices.traits.Modes trait, and it seems that I cannot get some Mode to work, though I'm 100% sure that I've used mode names exactly as in the documentation.
SYNC Response:
Response {
"status": 200,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"requestId": "15896565509066911859",
"payload": {
"agentUserId": "",
"devices": [
{
"id": "Washer",
"type": "action.devices.types.WASHER",
"traits": [
"action.devices.traits.Modes",
"action.devices.traits.OnOff"
],
"name": {
"defaultNames": [
"Washer"
],
"name": "Washer",
"nicknames": [
"Washer"
]
},
"willReportState": false,
"customData": {
"lookupOnExecute": true
},
"attributes": {
"availableModes": [
{
"name": "temperature",
"name_values": [
{
"name_synonym": [
"temperature"
],
"lang": "en"
}
],
"settings": [
{
"setting_name": "Tap Cold",
"setting_values": [
{
"setting_synonym": [
"tap cold"
],
"lang": "en"
}
]
},
{
"setting_name": "Cold Warm",
"setting_values": [
{
"setting_synonym": [
"cold warm"
],
"lang": "en"
}
]
},
{
"setting_name": "Hot",
"setting_values": [
{
"setting_synonym": [
"hot"
],
"lang": "en"
}
]
},
{
"setting_name": "Extra Hot",
"setting_values": [
{
"setting_synonym": [
"extra hot"
],
"lang": "en"
}
]
}
],
"ordered": false
},
{
"name": "Cycle",
"name_values": [
{
"name_synonym": [
"cycle"
],
"lang": "en"
}
],
"settings": [
{
"setting_name": "Low",
"setting_values": [
{
"setting_synonym": [
"low"
],
"lang": "en"
}
]
},
{
"setting_name": "Medium",
"setting_values": [
{
"setting_synonym": [
"medium"
],
"lang": "en"
}
]
},
{
"setting_name": "High",
"setting_values": [
{
"setting_synonym": [
"high"
],
"lang": "en"
}
]
}
],
"ordered": false
}
]
}
}
]
}
}
}
QUERY response:
Response {
"status": 200,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"requestId": "17335788264128789760",
"payload": {
"devices": {
"Washer": {
"online": true,
"currentModeSettings": {
"Cycle": "High",
"temperature": "Tap Cold"
},
"on": true
}
}
}
}
}
Why does Cycle query fail? I see Cycle mode in the documentation. Does it support only some settings? Does the case matter? High is also available, so what am I doing wrong?
And Interaction with Google Home:
While the Google Assistant is highly capable of detecting variations in speech while receiving voice commands, it is still a good practice to make the grammar more understandable and as mentioned in the comments. This is related to an issue in the usage of grammar while triggering the right intent, since a change in the way the question was asked solved the purpose.
For the answer to the question "how can I combine Two toggles (Bluetooth and Power Saving) into one trigger – e.g. "Turn on Power Saving and Bluetooth on Home Cinema?" asked in the comments – at the moment Smart Home doesn't allow two commands in a single prompt. For example, you cannot say "Hey Google, turn on my light and change the color". In order to do that you have to execute each command separately.

Resources