actions-on-google / actions-on-google-java

Java/Kotlin library for Actions on Google
Apache License 2.0
286 stars 39 forks source link

Dock command throws exception #38

Closed RayBa82 closed 4 years ago

RayBa82 commented 5 years ago

Dock request from Google: { "inputs": [ { "context": { "locale_country": "US", "locale_language": "en" }, "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "customData": { "DockCommand": "dock", "DockDevice": "actionControl", "LocateCommand": "find_me", "LocateDevice": "actionCommand", "StartStopCommandfalse": "pause", "StartStopCommandtrue": "vacuum", "StartStopDevice": "actionControl" }, "id": "xiaomiVacuum" } ], "execution": [ { "command": "action.devices.commands.Dock" } ] } ] } } ], "requestId": "6209328299679820472" }

Exception:

org.json.JSONException: JSONObject["params"] not found. at org.json.JSONObject.get(JSONObject.java:520) at org.json.JSONObject.getJSONObject(JSONObject.java:732) at com.google.actions.api.smarthome.SmartHomeRequest$Companion.create(SmartHomeRequest.kt:107) at com.google.actions.api.smarthome.SmartHomeApp.createRequest(SmartHomeApp.kt:49) at com.google.actions.api.smarthome.SmartHomeApp.handleRequest(SmartHomeApp.kt:142)