Google smart home mode traits are not displaying in ui - actions-on-google

I am trying to display the custom modes in my google home app. But the mode are not displaying.
Below are the traits which are used in the sync intent.
{
"response": {
"requestId": "3824625397483970421",
"payload": {
"agentUserId": "be855ca8-7be8-4e4c",
"devices": [
{
"id": "device--92ada020-074a-11ed",
"type": [
"action.devices.types.VACUUM"
],
"traits": [
"action.devices.traits.StartStop",
"action.devices.traits.Modes"
],
"name": {
"defaultNames": [
"Vacuum Cleaner 2"
],
"name": "Vacuum Cleaner 2",
"nicknames": [
"Vacuum Cleaner 2"
]
},
"willReportState": true,
"roomHint": "",
"structureHint": "",
"attributes": {
"availableModes": [
{
"name": "suction",
"name_values": [
{
"name_synonym": [
"suction"
],
"lang": "en"
}
],
"settings": [
{
"setting_name": "Storm",
"setting_values": [
{
"setting_synonym": [
"Storm"
],
"lang": "en"
}
]
},
{
"setting_name": "Gust",
"setting_values": [
{
"setting_synonym": [
"Gust"
],
"lang": "en"
}
]
},
{
"setting_name": "Breeze",
"setting_values": [
{
"setting_synonym": [
"Breeze"
],
"lang": "en"
}
]
},
{
"setting_name": "Eco",
"setting_values": [
{
"setting_synonym": [
"Eco"
],
"lang": "en"
}
]
}
],
"ordered": false
}
]
},
"otherDeviceIds": [
]
}
]
}
}
}
I cannot figure out what am I doing wrong. I read the documentation but looks fine to me but still it not displaying in the google home app

Our teams are constantly working to improve Google Home App and the controls available in the UI. Right now for certain traits the touch controls are not available in the UI. For these controls you can always initiate them through voice.
Your Sync response looks right for Vacuum . If you need touch controls for modes on a vacuum device on Google Home App, you can create a feature request in Public Issue Tracker. This will help us with the prioritization in our roadmap.

What I have observed is there is a difference in terms of touch controls modes that are not available in google smart home app but can be controlled via the voice commands. Modes can only be displayed for now in the nest display.
Reference
https://developers.google.com/assistant/smarthome/develop/touch-controls

Related

How cannot I install a Google Chrome App I developed myself?

I have created a Google Chrome App and published in webstore, but not listed.
When I go to this URL:
https://chrome.google.com/webstore/detail/my-app/thisistheid?hl=en
This appears in the installation button:
However, during development, I could install the application manually.
What is wrong here?
EDIT:
This is the manifest.json file:
{
"manifest_version": 2,
"name": "App Name",
"description": "blablabla.",
"version": "1.1",
"permissions": [
],
"app": {
"background": {
"scripts": [ "main.js" ]
}
},
"externally_connectable": {
"matches": [ "*://localhost:*/*" ]
},
"sockets": {
"tcp": {
"connect": "localhost:1437"
}
},
"icons": {
"16": "img/icon16.png",
"32": "img/icon32.png",
"48": "img/icon48.png",
"128": "img/icon128.png"
},
"web_accessible_resources": [ "img/logo.jpg" ]
}

How to take the most newest part of all reports and merge into one main report?

EDIT: I have found out that mongo does not allow to use special characters such as dots and the dollar sign as a key in the report so I had to rechange the structure of the JSON a bit. But, my question remains the same (I removed the old stuff so it will be more readable but you can still see it in the edit history section). The new structure looks as follows:
{
"name": "test1",
"main": [
{
"subs": [
{
"data": [
{
"group": "ABC",
"values": [
"tcsh"
]
},
{
"group": "AA",
"values": [
"6.13.00"
]
}
]
},
{
"data": [
{
"group": "xyz",
"values": [
"tcsh"
]
},
{
"group": "SADA",
"values": [
"6.13.00"
]
}
]
}
],
"main_name": "MAIN",
"main_path": "play_ground/MAIN"
},
{
"subs": [
{
"data": [
{
"group": "BAB",
"values": [
"tcsh"
]
},
{
"group": "GO",
"values": [
"6.13.00"
]
}
]
}
],
"main_name": "MAIN2",
"main_path": "play_ground/MAIN2"
}
],
"user": "easdasa",
"timestamp": "1564437533"
}
I want to get all reports that have a name test1 and a user easdasa. Then, I would like to take the latest block of data of each block of subs. This is done with the help of the timestamp.
For example in the following array I have two reports:
[{
"name": "test1",
"main": [
{
"subs": [
{
"data": [
{
"group": "xyz",
"values": [
"tcsh"
]
},
{
"group": "SADA",
"values": [
"6.13.00"
]
}
]
}
],
"main_name": "MAIN",
"main_path": "play_ground/MAIN"
}
],
"timestamp": "1564437533"
},
{
"name": "test1",
"main": [
{
"subs": [
{
"data": [
{
"group": "ABC",
"values": [
"tcsh"
]
},
{
"group": "AA",
"values": [
"6.13.00"
]
}
]
},
{
"data": [
{
"group": "xyz",
"values": [
"tcsh"
]
},
{
"group": "SADA",
"values": [
"5.0.1",
"12312"
]
}
]
}
],
"main_name": "MAIN",
"main_path": "play_ground/MAIN"
}
],
"timestamp": "1564437522"
}]
The first report is was created after the second report (due to the timestamp). I can see that there is a block that located in the second report but not in the first report:
{
"data": [
{
"group": "ABC",
"values": [
"tcsh"
]
},
{
"group": "AA",
"values": [
"6.13.00"
]
}
]
},
So I want the final report to heve it (besides all the blocks from the first report). Also, you can see that the values of the SADA group are diffrenet. So we want to take the first's report block. The final report should be:
{
"name": "test1",
"main": [
{
"subs": [
{
"data": [
{
"group": "ABC",
"values": [
"tcsh"
]
},
{
"group": "AA",
"values": [
"6.13.00"
]
}
]
},
{
"data": [
{
"group": "xyz",
"values": [
"tcsh"
]
},
{
"group": "SADA",
"values": [
"6.13.00"
]
}
]
}
],
"main_name": "MAIN",
"main_path": "play_ground/MAIN"
}
],
"timestamp": "1564437533"
}
In other words, in the (json) values of the data level I want to get the latest report and in the (json) values of the subs level I want to get all existing subs. So it will be more clear, in the (json) values of the data level I want to get all the groups and values of the latest report and for the (json) values of the subs level I want to have all the subs.
If I could specify steps:
Get all reports by user and name.
Theoritcly merge all report into one main report (the implmenetation could be diffrent). The merge will use be done by main_name.
Remove all old subs values by timestamp that already exists in the latest report so the final report will have in the subs level only the newest objects and object from the old reports that were not in the newer reports.
Which query I should be in order to get the wanted report?
Please use the below query and check on stats, I can really say performance can be improved by having proper indexing as per your requirements(querying), Please use $explain (enter link description here)
to check on query performance. I've considered your array exists in a field with key as values , Please let me know if this works or if it doesn't provide sample data, we can check on that:
db.getCollection('yourcollection').aggregate([{$unwind: '$values'},{$match : {'values.name': 'test1', 'values.user': 'galih'}},
{$sort: {'values.timestamp' : -1}},
{$limit: 1}
])

missing orders in google analytics report api v4

Thera are some order's in GA. I want to get some order's properties (ex. campaign) with GA reporting api v4. I have such a request:
POST https://analyticsreporting.googleapis.com/v4/reports:batchGet?key=
{YOUR_API_KEY}
{
"reportRequests": [
{
"dateRanges": [
{
"startDate": "2018-11-14",
"endDate": "2018-11-16"
}
],
"pivots": [
{
"dimensions": [
{
"name": "ga:campaign"
}
],
"metrics": [
{
"expression": "ga:totalValue"
}
]
}
],
"dimensions": [
{
"name": "ga:transactionId"
}
],
"viewId": "63535262"
}
]
}
Certain orders are skipped, an i specify wrong metrics?
Result part, order 1811/430 is not in the list:
{
"dimensions": [
"1811/429"
],
"metrics": [
{
"pivotValueRegions": [
{
"values": [
"6000.0",
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"0.0",
"0.0"
]
}
]
}
]
},
{
"dimensions": [
"1811/431"
],
"metrics": [
{
"pivotValueRegions": [
However, in the GA itself the order is present and it has a campaign.
Sorry for dummy english, will be very grateful for the answers!

AdSense Management API: Getting "0:" as APP_ID in response

Request
"https://www.googleapis.com/adsense/v1.4/accounts/pub-XXXXXXXXXXXXX/reports?endDate=2019-01-01&startDate=2014-01-01&dimension=APP_ID&metric=INDIVIDUAL_AD_IMPRESSIONS&fields=headers%2C%20rows
Response
{ "headers": [ { "name": "APP_ID", "type": "DIMENSION" }, { "name": "APP_NAME", "type": "DIMENSION" }, { "name": "INDIVIDUAL_AD_IMPRESSIONS", "type": "METRIC_TALLY" } ], "rows": [ [ "0:", "abcdAndroidDemo_P1V1", "375" ], [ "0:", "abcdDemo", "13" ], [ "0:", "abcdiOSDemo", "34" ] ] }
How to get the APP_IDs of all the apps of publisher?
I am getting APP_ID after publishing the app in the app store.

how use google api in iphone to query hotels around my place

I am new to google apis and iphone LBS related apps. I need to know how to use a google api and get the list of hotels around my GPS location.
Here the same functionality is achieved through javascript. how to do this on iphone application ?
http://code.google.com/apis/ajax/playground/#localsearch_with_markers
Did you try - http://code.google.com/apis/maps/documentation/places/#PlaceSearches ?
It looks like a normal webservice, you can just post a request and it should give you an XML / JSON list of all the hotels around you ..
From the website -
Request = http://maps.google.com/maps/api/place/search/json?location=40.717859,-73.957790&radius=1600&client=clientId&sensor=true_or_false&signature=SIGNATURE
Response =
{
"status": "OK",
"results": [ {
"name": "Williamsburg",
"types": [ "locality", "political" ],
"icon": "http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
"reference": "ClRBAAAAXP...lHAPyHom2aG"
}, {
"name": "Greenpoint",
"vicinity": "New York",
"types": [ "neighborhood", "political" ],
"icon": "http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
"reference": "CkQ_AAAAhd...MF45fwr44Ek"
}, {
"name": "Peter Luger Steakhouse",
"vicinity": "Broadway, Brooklyn",
"types": [ "restaurant", "food", "establishment" ],
"icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
"reference": "ClRCAAAAt3...6Nt7k11iQdT"
}, {
"name": "Music Hall of Williamsburg",
"vicinity": "North 6th Street, Brooklyn",
"types": [ "establishment" ],
"icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
"reference": "ClRFAAAAN...6UOKCbjv7Sxy"
},
...additional results ...
],
"html_attributions": [ ]
}