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)
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)