google-home / smart-home-nodejs Goto Github PK
View Code? Open in Web Editor NEWA sample of the Smart Home device control APIs in Actions on Google
License: Apache License 2.0
A sample of the Smart Home device control APIs in Actions on Google
License: Apache License 2.0
When I go to link my service via the Google Home app on iOS or Android the 'browser' seems to have the credentials cached and does not allow me to enter a username and password. It immediately grabs a token and then calls my SYNC endpoint.
Is there a way to prevent this? One of my accounts isn't even working because the username and password are no longer accurate and the Google Home app thinks that it should cache the username and password automatically log in.
I don't see any username & password fields where I can login.
I can a login button only.
I am registered four google devepoer accounts.then I upload the same action package for smart home.then everything is ok after token exchange. When trying to add devices with my test application.
I do get the error message that the "Cloudn't update setting. Check your connection".I tried many times.why? is the same action package only used one google account to smart home control?
could not find the file webcomponents-lite.min.js ,where is it
Hi,
when I'm using Google Home App on iOS, I'm able to display login form within my system when using Home Control -> Add devices.
Then after successful login I get "Something went wrong. Try Again"
No SYNC call received in API.
I've checked this on two different google accounts, in two different actions on google Assistant apps. Redirects are properly set in my oauth.
In the README, one of the color change requests is for the bluish color "cerulean". It is misspelled in the example.
Also, I tried to turn all the lights "cerulean" with a voice query but it didn't recognize the color. Should the example be updated to use a simpler color as well?
I don't want to use LAN
node cloud/smart-home-provider-cloud.js smart-home-pub="https://121.34.144.90"
it does not work,can you help me
I clone project to localhost.
I go to console.actions.google to create project. I go to folder project (it have file actions.json) and run command "gactions update --action_package action.json --project <project_name>". It has error:
ERROR: Failed to update the app for the Assistant
ERROR: Invalid JSON payload received. Unknown name "device_control" at 'agent.draft_action_package.actions[0]': Cannot find field.
Field Violations:
1 agent.draft_action_package.actions[0] Invalid JSON payload received. Unknown name "device_control" at 'agent.draft_action_package.actions[0]': Cannot find field.
2017/05/26 22:03:21 Server did not return HTTP 200
Please fix this. :(
Using my Primary Google Account I am able to follow the instructions in the readme to spin up my own node.js server and a new Project via the Actions SDK. I am able to open up my Google Home app (Android) and link the 4 light bulb devices under the rick:oldman account and everything works great.
Then I tried to add my Secondary Google Account to the project by granting it Project Viewer access in the permissions, and then sharing the link from the Simulator to that account. I open up the Google Home app for this other account (iPhone) and log in with the beth:doctor account. Then instead of showing me the lights that are available I get an error that says "Something went wrong. Try again": Screenshot
I then deleted the project from my Primary Google Account, but I still see the "[test]" Smart Home service when I click on the "+" to add a new device on my Google Home app on my Android phone with my Primary Google Account, and on my iPhone with my Secondary Google Account. When I first saw this I just unlinked my account. Now I am still seeing it and when I press on it to see what happens, it says "Tunnel xxxxx.ngrok.io not found". Does this mean that AoG still thinks that this is active? Maybe it takes some time for everything to sync up with the fact that the project has been shut down, or maybe I've gotten myself stuck in some strange edge case?
Some more weird stuff...In addition to my real light bulbs, I have 4 lights under the "Virtual and other devices" category (I assume from a past test of this AoG Smart Home app) and I can't seem to get rid of them.
I have named this project as bulb-test. When i goto the simulator and type "Talk to bulb test" i get a HTTP post on my server with /oauth. There is no implementation for POST method, but there is something for GET.
Is the demo implementation complete ?
I modified this example to support https and changed action.json to:
"actions": [{
"name": "actions.devices",
"deviceControl": {
},
"fulfillment": {
"conversationName": "ioBroker"
}
}],
"conversations": {
"ioBroker" :
{
"name": "ioBroker",
"url": "https://iobroker.pro:447/smarthome"
}
}
}
The name of my action is "ioBroker", the name of project is "iobrokerhome"
After I start my server I can browse the Devices:
Then I register the Action with:
gactions update --action_package action.json --project iobrokerhome
And no errors.
I go to the Google Home App and try to activate this action:
Yes. I took the pronunciation as "house broker", because I have no lack to use IOBroker/IO-Broker/I.O.Broker.
and get this "nothing saying" error after I login:
This is what I see in the console of my server:
GET /service-worker.js 304 1.947 ms - -
POST: /login { username: 'rick',
password: 'oldman',
redirect: '',
client_id: 'ghome-iobroker',
redirect_uri: 'https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fiobrokerhome',
state: 'CrwCQUxWM2ROUzRJa1NJTkdBbHByeEp3S2ZIbzhwTldURHY2UFJiQU1sdfsfsfsNHTTdmdUhYaUVUUTNPLWNVQlhhb0hqVk9hWWg1UVZuay1nbWhTWlZhaFBxUkdXQkI0cElTN3l5Uk92R1ZGZmVJclZ1dnEtRTBSa1YwbDdqa1dsdEo5RHhzbGl0b2lfX2hEcVJkLTZZazl4bUk0cnZYZlJ4ckJCUDZjdmtfM2xFMmUtN21TYkRnMkFSSWM4SVNaNmE4RG9lNUJUbTlHWHk3WHZUQW1BdHRhcVU2RnJNQ3h6bHhFWDhodnl1XzY2V3NmN0lQZ1BES2t6MjFqaFc5bml6a3VrNVMxUTRXUldreUwwRFVFei1ndTFDSjhqVkljc1UtT3dya0hBNHVmZ1BlbFByanJGbRIcYXNzaXN0YW50LWhhbmRvZmY6Ly9jb21wbGV0ZSI7aHR0cHM6Ly9vYXV0aC1yZWRpcmVjdC5nb29nbGV1c2VyY29udGVudC5jb20vci9pb2Jyb2tlcmhvbWUqEWRvZ2Fmb3hAZ21haWwuY29tMhBpb2Jyb2tlcmhvbWVfZGV2' }
getUser rick
logging in { uid: '1234',
name: 'rick',
password: 'oldman',
tokens: [ 'psokmCxKsdfsfLeYd1' ] }
login successful rick
authCode successful 9lxxndxenwgfssdf00s04g4c
POST /login 302 6.759 ms - 1440
/token query {}
/token body { grant_type: 'authorization_code',
code: '9lxxndxenwgfssdf00s04g4c',
redirect_uri: 'https://oauth-redirect.googleusercontent.com/r/iobrokerhome',
client_id: 'ghome-iobroker',
client_secret: 'somePassword' }
getClient ghome-iobroker, somePassword
return getClient { clientId: 'ghome-iobroker', clientSecret: 'somePassword' }
client { clientId: 'ghome-iobroker', clientSecret: 'somePassword' }
handleAuthCode {}
getClient ghome-iobroker, somePassword
return getClient { clientId: 'ghome-iobroker', clientSecret: 'somePassword' }
getAccessToken = { uid: '1234',
accessToken: 'psokmCxKjfhk7qHLeYd1',
refreshToken: 'psokmCxKjfhk7qHLeYd1',
userId: '1234' }
return getAccessToken = { token_type: 'bearer',
access_token: 'psokmCxKjfhk7qHLeYd1',
refresh_token: 'psokmCxKjfhk7qHLeYd1' }
respond success { token_type: 'bearer',
access_token: 'psokmCxKjfhk7qHLeYd1',
refresh_token: 'psokmCxKjfhk7qHLeYd1' }
POST /token 200 5.508 ms - 100
GET /service-worker.js 304 2.572 ms - -
GET /bower_components/polymer/polymer.html 200 3.188 ms - 142409
And no following outputs...
How can I see what the Action is trying to do and if there are any errors on the google side in the log?
Where can I find the Log of action?
Help me. I am facing this problem till Februar 2017 and still no progress.
Realised the last issue was closed -
same issue here.
can see 11-06 19:07:38.171 7315 11191 I ActivityManager: START u0 {dat=assistant-handoff://complete/?result_code=SUCCESS&result_message=Accounts+now+linked. cmp=com.google.android.googlequicksearchbox/com.google.android.apps.gsa.assistant.handoff.BrowserControlActivity} from uid 10024 pid 1184 on display 0
- checked my JSON against the validator - all fine, but getting the 'Couldn't update the setting' error on the app.
How do I debug why a SYNC request has failed? Please provide a console or log where I can see what went wrong.
From my (developer) point of view, everything looks just fine. Similar response for some other accounts of my user base works, where as for this user's response it always doesn't work.
In this instance, its failing for the following SYNC response.
[{"payload":{"devices":[{"id":"7e-f2-ca-ab-40-34-34-95:1:1","name":{"name":"Air Conditioner"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.OUTLET","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:2:1","name":{"name":"Office Hooter"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:5:1","name":{"name":"Office Motion"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:11:1","name":{"name":"Buzzer"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:11:2","name":{"name":"DOOR SENSOR"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:11:4","name":{"name":"Presence Sensor"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:14:1","name":{"name":"Blue Lamp"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:14:2","name":{"name":"Green Lamp"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:14:3","name":{"name":"Side Light"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:15:1","name":{"name":"Front Light"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:15:2","name":{"name":"Outdoor Lights"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:15:3","name":{"name":"Front Dimmer"},"traits":["action.devices.traits.OnOff","action.devices.traits.Brightness"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:17:1","name":{"name":"Extra Lights"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:17:2","name":{"name":"Central Light"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:17:3","name":{"name":"Fan"},"traits":["action.devices.traits.OnOff","action.devices.traits.Brightness"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:19:1","name":{"name":"Key Ring"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:19:2","name":{"name":"Office Door"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:19:4","name":{"name":"Presence Sensor"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:6:1","name":{"name":"Blue LED"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:6:2","name":{"name":"Work Lights"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:6:3","name":{"name":"Dimmer Back"},"traits":["action.devices.traits.OnOff","action.devices.traits.Brightness"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:4:1","name":{"name":"Buzzer"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:4:2","name":{"name":"Door Sensor"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:4:4","name":{"name":"Presence Sensor"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:3:1","name":{"name":"Plug"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.OUTLET","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:7:1","name":{"name":"Curtain Up"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:7:2","name":{"name":"Curtain Down"},"traits":["action.devices.traits.OnOff"],"type":"action.devices.types.SWITCH","willReportState":false},{"id":"7e-f2-ca-ab-40-34-34-95:7:3","name":{"name":"Regulator"},"traits":["action.devices.traits.OnOff","action.devices.traits.Brightness"],"type":"action.devices.types.SWITCH","willReportState":false}]},"requestId":"8984954405657849060"}]
How to setup ssl?
I am trying to create SmartHome skill for ioBroker. Alexa Skill for ioBroker is very popular in germany.
But unfortunately your sample does not work if my account is german.
I did not tried to check this sample with english, but after OAuth nothing happens.
Last output, what I can see is:
access_token: 'psokmCxKjfhk7qHLeYd1',
refresh_token: 'psokmCxKjfhk7qHLeYd1' }
respond success { token_type: 'bearer',
access_token: 'psokmCxKjfhk7qHLeYd1',
refresh_token: 'psokmCxKjfhk7qHLeYd1' }
POST /token 200 35.858 ms - 100
And I expect that now Google must ask .../ha
address. But in the google home app I can only see The setting could not be updated
(translation from german)
Does SmartHome work with German language? I want first only to discover the devices.
But even this does not work.
Thanks a lot,
Bluefox
Hi -
a question, rather than issue -
is it just me, or does that action not exist? I can set brightness percentage - but that request triggers a Query, (I can see the sense, get the current %ge) but without any specific knowledge that it then needs to trigger an EXEC, how do you handle it?
Using Simulator, responds with a generic message:"I'm sorry, there was an error and I'm unable to control your home device." I don't get any other commands on my server.
An interesting phenomenon。When synchronizing my device,the first time always fails,then got an error: "Couldn't update the settings. Check your connection"。Immediately synchronize for the second time,It’s OK!
I can sync and send commands to my devices with my GH action.
But the day after, I always get "I'm sorry, there was an error and I'm unable to control your home device."
Nothing is sent to the handler.
When I unlink the service and link it again all works as expected.
How can I troubleshoot this problem?
is the same actions package can used in multiple Google accounts?
Hi, Thanks for this very good sample. I tried setting up this with my project.
Although i am facing this issue, i am unable to test it. It's very strange, I used it with 2 different google accounts, one with [email protected] and another with [email protected]. Surprisingly my test device is not appearing in the Google Home app when account is linked with [email protected] (I created the app also with this account only).
But its appearing in home control section in Home App when i am setting up the app with my personal email ([email protected]) and logging in the Home App also with the same account.
Acn you please help me here, as in why i am unable to test it when using email - [email protected]
I noticed that you added pieces to trigger a request_sync through a homegraph api... but when I attemp to trigger these calls against my instance, I get the following:
Google HomeGraph API has not been used in project homeautio-1c61c before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/homegraph.googleapis.com/overview?project=XXXXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Clicking that link says "The API "homegraph.googleapis.com" doesn't exist or you don't have permission to access it".
Did I fail to enable something or miss a step?
Hi, today I tried to connect to our Smart Home action but sync fails every time. We receive the request and our response seems to be OK. Were there any changes made on required information in response since Friday?
After I choose the "device" and login there's a progressdialog with "Linking your ... account".. then I got an error: "Couldn't update the settings. Check your connection",why?
node smart-home-provider-cloud.js isLocal
/home/sun/down/actionssdk-smart-home-nodejs-master/smart-home-provider/cloud/smart-home-provider-cloud.js:55
let authToken = authProvider.getAccessToken(request);
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
Has anyone gotten this to work with the Thermostat Schema? I posted here:
https://stackoverflow.com/questions/46043896/thermostat-schema-doesnt-work
How do I get them, where do I access them. I am fine to debug the program but it helps to get logs to review the results and debug errors.
Hello Google-Devs,
this issue was closed, but is still an issue and NOT solved.
After having several email conversations with Google support (since weeks) and alot of developer complaints about this @Fleker closed this issue by saying it is not a specific issue.
I dont think that this is the case and dont want to stress you guys, but you have an issue here and should track it transparently. I am not sure who is the lead for the actions on google smarthome project at Google, but I hope @smishra2 will read this and escalate this somehow.
Actually you are blocking a lot of Devs by not solving this. This cant be your strategic target in beating platforms like Amazon Alexa. So please take this issue here serious.
At the moment it looks like you re not actively clearing this issue out.
I am sorry for re-opening, but we need help form your side. Or the people wont create more smarthome apps, I guess.
I also filed an question on Stackoverflow with full description, like the support asked me to do:
https://stackoverflow.com/questions/45234171/smarthome-app-action-doesnt-appear-in-google-assistant-companion-app-under-home
Hope Google will react and solve this..what ever problem this is. I guess this cant be rocket sience and the experts at Google can fix this.
BR Mehmet
I have my own OAuth2, which worked with Alexa and others. For Google SYNC command after login to OAuth2 server and exchange token, it does send me the SYNC command with my bearer token, here is my response to the google server. Somehow after I response to google, it quickly flash an error "could not change settings, please check your connetion..." It was so fast that I have to do many times to read the line, anyways here is the log from my side, since my app is not published yet, I can't get log from google console -- please help
thanks
Bill
"inputs":[{"intent":"action.devices.SYNC"}],"requestId":"2616915316542317627"}
017-09-23 17:26:32,499 root DEBUG GOOGLE:receives a SYNC request 2616915316542317627 2017-09-24 00:26:32.49800
017-09-23 17:26:33,005 root DEBUG Get out SYNC 2017-09-24 00:26:33.005000
017-09-23 17:26:33,009 root DEBUG {"requestId": "2616915316542317627", "payload": {"agentUserId": "1234", "devices": [{"customData": {"guid": "9a73dc90-5068-442e-96b0-a8314d3bdf44", "serialNo": "P823E6Y6KEU64LN6WR4UN354Y6BP28HLAXR6KL", "fooValue": 74, "id": 45}, "deviceInfo": {"model": "hs1234", "swVersion": "11.4", "hwVersion": "3.2", "manufacturer": "dda"}, "willReportState": false, "traits": ["action.devices.traits.OnOff"], "names": {"defaultNames": ["Device One"], "name": "Device One", "nicknames": ["Device One"]}, "type": "action.devices.types.OUTLET", "id": "9a73dc90-506-442e-96b0-a8314d3bdf44"}]}}
017-09-23 17:26:33,017 werkzeug INFO 10.0.0.6 - - [23/Sep/2017 17:26:33] "POST /googleop/ha HTTP/1.1" 200 -
I tried to run the setup using implicit grand instead of Authorization code grand and I get the below error in the console:
TypeError: res.error is not a function
at /home/vysakh/temp/googleActions/actionssdk-smart-home-nodejs/smart-home-provider/cloud/auth-provider.js:164:18
at Layer.handle [as handle_request] (/home/vysakh/temp/googleActions/actionssdk-smart-home-nodejs/smart-home-provider/node_modules/express/lib/router/layer.js:95:5)
at next (/home/vysakh/temp/googleActions/actionssdk-smart-home-nodejs/smart-home-provider/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/vysakh/temp/googleActions/actionssdk-smart-home-nodejs/smart-home-provider/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/vysakh/temp/googleActions/actionssdk-smart-home-nodejs/smart-home-provider/node_modules/express/lib/router/layer.js:95:5)
at /home/vysakh/temp/googleActions/actionssdk-smart-home-nodejs/smart-home-provider/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/home/vysakh/temp/googleActions/actionssdk-smart-home-nodejs/smart-home-provider/node_modules/express/lib/router/index.js:335:12)
at next (/home/vysakh/temp/googleActions/actionssdk-smart-home-nodejs/smart-home-provider/node_modules/express/lib/router/index.js:275:10)
at SendStream.error (/home/vysakh/temp/googleActions/actionssdk-smart-home-nodejs/smart-home-provider/node_modules/serve-static/index.js:121:7)
at emitOne (events.js:77:13)
GET /oauth?response_type=token&client_id=ZxjqWpsYj3&redirect_uri=https://oauth-redirect.googleusercontent.com/r/project-4774743446309170936&scope=profile&state=Cu8CQUZEXzV0bkFaZ285eXNLWnN0WXZ2OV9vOHZsQ0tKSXExbTRfLUpseGhCa2luUlc2Ujc1R1RrbURVRDJxNlRsQlJfUHN5bXRyWklTTDRXblZrcDc4NVA1MVVIclpjN2g2d2cxbFhrejJjcldLd2x1TmQweEpTeEp5d2dLMXdDcElpYzJ1RjRjRmVHNWhWTTczLUhMbWZjNmRGRDFIVG12QlV3cXQzem8wb3hzWU5NTUU2SVhaOTdpMzdudU1BUkl4WFN1eUtOajFuOUNZZE1KZGpudUlCMXl0bTVDQ0huT3RhMVhHSm9BVV9USExWeXlQcHIxR05lbmFadHhmR3BmQXlHcHMybnFLaUR4SXh3MDNsemlyWmV6eXBMUkt1eEdlcjdKOEFSYUNLY2drWFJUTm13aVZZc2NJNG5CWDItS3kyQW9kTmFOM2l0X054WU9RN0RmQ0Z0dUJGS1dYNWpqamdhMFBqaFh0MjNScHFtdxIcYXNzaXN0YW50LWhhbmRvZmY6Ly9jb21wbGV0ZSJKaHR0cHM6Ly9vYXV0aC1yZWRpcmVjdC5nb29nbGV1c2VyY29udGVudC5jb20vci9wcm9qZWN0LTQ3NzQ3NDM0NDYzMDkxNzA5MzYqGWFjdGlvbnN0ZXN0dXNlckBnbWFpbC5jb20yH3Byb2plY3QtNDc3NDc0MzQ0NjMwOTE3MDkzNl9kZXY 500 2.608 ms - 1668
I appreciate that this repo is an example app and not specifically regarding the specification, but there is no explanation on the graceful replies the 3p device cloud should provide if (for example the Auth Token is invalid) or if the 3p service is unavailable.
I can see in this example, that you just return a 500 message and {error: "failed"} or similar, this doesn't seem to be documented anywhere, is this all we must provide and the google home app will handle things gracefully?
When I try and update my oauth settings (new ngrok URL, etc.) today I am getting this generic error when I press "save". When I open the developer tools I see there is a 500 response when my browser does a POST to https://console.actions.google.com/u/0/m/actions/agents/update. I also get this error when using a different account to create a new app from scratch.
This was happening on Wednesday, September 20th, but it appears to be fixed on Thursday, September 21st.
)]}'
[["er",null,"java.lang.IllegalArgumentException: Can't get the number of an unknown enum value.\n\tat com.google.assistant.serviceengine.acs.server.proto.ActionsConsoleAgentSettingsPB$AgentType.getNumber(ActionsConsoleAgentSettingsPB.java:165)\n\tat com.google.assistant.serviceengine.acs.server.proto.ActionsConsoleAgentSettingsPB$Builder.setAgentType(ActionsConsoleAgentSettingsPB.java:696)\n\tat com.google.assistant.aog.console.server.main.AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleAgentSettingsConverter.doForward_agentType(AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleAgentSettingsConverter.java:20)\n\tat com.google.assistant.aog.console.server.main.AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleAgentSettingsConverter.doForward(AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleAgentSettingsConverter.java:41)\n\tat com.google.assistant.aog.console.server.main.AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleAgentSettingsConverter.doForward(AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleAgentSettingsConverter.java:12)\n\tat com.google.common.base.Converter.correctedDoForward(Converter.java:183)\n\tat com.google.common.base.Converter.convert(Converter.java:176)\n\tat com.google.assistant.aog.console.server.main.AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter$1.lambda$apply$0(AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter.java:34)\n\tat java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)\n\tat java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1375)\n\tat java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)\n\tat java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)\n\tat java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)\n\tat java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\n\tat java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)\n\tat com.google.assistant.aog.console.server.main.AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter$1.apply(AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter.java:35)\n\tat com.google.assistant.aog.console.server.main.AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter.doForward_actionsConsoleAgentSettings(AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter.java:37)\n\tat com.google.assistant.aog.console.server.main.AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter.doForward(AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter.java:42)\n\tat com.google.assistant.aog.console.server.main.AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter.doForward(AutoConverter_ActionsConsoleSettingsConverter_ActionsConsoleSettingsPBConverter.java:17)\n\tat com.google.common.base.Converter.correctedDoForward(Converter.java:183)\n\tat com.google.common.base.Converter.convert(Converter.java:176)\n\tat com.google.assistant.aog.console.server.main.ActionsConsoleSettingsConverter.toServer(ActionsConsoleSettingsConverter.java:21)\n\tat com.google.assistant.aog.console.server.main.AgentConverter.toServer(AgentConverter.java:383)\n\tat com.google.assistant.aog.console.server.main.UpdateAgentAction.post(UpdateAgentAction.java:89)\n\tat com.google.assistant.aog.console.server.main.AssistantConsoleExceptionInterceptor.execute(AssistantConsoleExceptionInterceptor.java:24)\n\tat com.google.apps.framework.request.impl.InterceptorInvocation$Http.beforeProceed(InterceptorInvocation.java:125)\n\tat com.google.apps.framework.request.impl.InterceptorInvocation.proceed(InterceptorInvocation.java:157)\n\tat com.google.apps.framework.request.impl.NewfangledHttpDispatcher.proceed(NewfangledHttpDispatcher.java:73)\n\tat com.google.apps.framework.request.impl.NewfangledHttpDispatcher.proceed(NewfangledHttpDispatcher.java:31)\n\tat com.google.apps.framework.request.impl.AbstractDispatcher.doExecuteChain(AbstractDispatcher.java:364)\n\tat com.google.apps.framework.request.impl.AbstractDispatcher.execute(AbstractDispatcher.java:261)\n\tat com.google.apps.framework.request.impl.AbstractDispatcher.executeAsync(AbstractDispatcher.java:206)\n\tat com.google.apps.framework.request.impl.NewfangledHttpDispatcher.dispatch(NewfangledHttpDispatcher.java:60)\n\tat com.google.apps.framework.net.NewfangledHttpRequestRunner.handle(NewfangledHttpRequestRunner.java:36)\n\tat com.google.apps.framework.net.HttpServiceImpl$RequestHandler$3.run(HttpServiceImpl.java:225)\n\tat com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:454)\n\tat com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:461)\n\tat com.google.tracing.CurrentContext.runInContext(CurrentContext.java:297)\n\tat com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:320)\n\tat com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:312)\n\tat com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:458)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\tat com.google.apps.framework.server.AbstractThreadPoolModule$InitializingThreadFactory$1.run(AbstractThreadPoolModule.java:581)\n\tat java.lang.Thread.run(Thread.java:745)\n",null,null,500,null,null,null,13]
]
After I choose the "device" and login there's a progressdialog with "Linking your ... account".. then I got an error: "Couldn't update the settings. Check your connection"
(Used the mock server)
POST /token 200 17.212 ms - 100
POST / 404 1.183 ms - 140
Probably the 404 reply for / ?
I want to try uploading the sample action package I have using gactions. However, every time I execute this command:
./gactions update --action_package action.json --project smarthomedev-74b08
the reuslt always like this:
Post https://accounts.google.com/o/oauth2/token: dial tcp 172.217.27.141:443: i/o timeout
Don't know if it's the right place for this issue but something goes wrong with the French (France) version when we ask the status of lights or the outlets (in certain conditions). I've checked the QUERY request/response and everything is ok, it works with (at least) French (Canada) and English (US), not tried the other ones.
In short, it only works if we ask the status for less than 3 lights or outlets in THE SAME STATUS.
Examples translated in english to be understood (this is the same for outlets):
A single light, targeted by name:
-> It works, whatever the state: "Light 1 is on" or "Light 1 is off": OK
3 lights (Light 1, 2 and 3):
-> If 2 are on and 1 off, the answer is "Light 1 and Light 2 are on. Light 3 is off": OK
-> If 1 are on and 2 off, the answer is "Light 1 is on. Light 3 and Light 2 are off": OK
-> If all lights are on or off, silence... no answer at all.
4 lights (Light 1, 2, 3 and 4):
-> It only works if 2 devices are on and 2 are off.
-> No answer in other cases.
We've developed a Home Control Action (project id: smart-life-da-b0b7c), which is still under testing environment. It worked well at the beginning, we could discover the device and control it with no problem. But recently, about 1 week ago, the Action came up with this issue: "Couldn't update setting. Check your connection". We didn't change anything for our service, we just can't receive the SYNC request after the token exchange. Need help pls.
I tried uploading this repo to Heroku but it didn't work. It is working on local Host though. Please can you guide me with proper steps to upload the repo ? Which files should I upload ?
Hi,
I tried following the steps here and when I click the "Test Draft" button, I get an error stating "start test failed". There are no error messages thrown in the console.
I am able to launch the webApp. So, I believe that my setup and tunneling is working fine.
I'm able to SYNC 150 devices and they are listed in the iOS Home app. However I cannot operate any device the EXECUTE action never reaches the server. When I reduce the number of devices to 110 it works again. How can I troubleshoot this? I have lights and thermostats, realKNX service (live).
Are there any plans for there to be a news app sample? I can't find any documentation on how to make one.
From PR #42, we should fix the start
command
I have added a google action for a smart home app, actions.json is this:
{
"actions": [{
"name": "actions.devices",
"fulfillment": {
"conversationName": "automation"
}
}],
"conversations": {
"automation" :
{
"name": "automation",
"url": "https://....../.../.../sync.do"
}
}
}
And Everything is ok after token exchange. When trying to add devices with my test application,
I do get the error message that the "Cloudn't update setting. Check your connection".I tried many times,
and My server never received the "action.devices.SYNC".my google account is ok.my phone also had reset any times. why? is actions.json can used any google accounts?
I'm having a problem that after the sync request and my devices are added to the Google home app, I can't control them. My Google home just responds with a generic message that it can't understand and it never requests anything else from the server (besides the initial sync).
For a while when I first set up a server and connected it to Google home, I was able to send commands.. but it stopped working all of a sudden and I can't figure out if it's something I did, or something else.
Do you have any suggestions on how to debug it?
Hi,
Is there any possibility to support wind speed attribute for thermostat?
Thanks for your answering.
After I add my device on testing and logged my application I get a progress dialog with "Linking your ... account".. then I got an error: "Couldn't update the settings. Check your connection".
I am using for my automatization a azure function published on https but I never get this request
{
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
"inputs": [{
"intent": "action.devices.SYNC"
}]
}
Or any request. My project Id is kevostaging-183317 is there a way to see logs or something that tell me why a sync request is not being send to my API end point
This is more of a question, but I was thinking of creating an app that could service Smart Home Intents (/ha) and also Google Action intents (/ga). (https://github.com/futbolpal/harmony-home).
I have a home-automation
branch that adds Smart Home functionality.
This way I could use the smart home style (which is less verbose, no "tell to so-and-so to do X"), but also support things that aren't supported by smart home (since there is only two schemas).
In the repo, I'm using some scripts to generate action.json based on environment variables (from Heroku for example). I was hoping to use one action.json with intents for action.intents.devices and others, however, it appears that a smart home intent must be the only intent in the action.json.
Any thoughts on this? It's kind of a bummer, but at the minute, I could basically create two apps and two sets of action.js files that I could push out in a deploy pipeline.
The cloud Icon on the frontend page resets to off upon refreshing the page. I can still ask Google to turn it on/off, and she does so, however the page does not update.
I see the following error on the smart-home-provider-cloud.js
output:
(node:67629) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Device 1 unknown to Amce Cloud
{ "actions": [{ "name": "actions.devices", "deviceControl": { }, "fulfillment": { "conversationName": "automation" } }], "conversations": { "automation" : { "name": "automation", "url": "https://echo.goodk2.com:8000/GoogleHomeNew/konke.do" } } }
it's my action.json as same as official smart home document. no welcome intent in it.
everything is ok in mobile app . but test in Simulator, i say "talk to smart k " , it always response " Sorry, this action is not available in simulation" (debug info is empty)
is it normal?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.