Help with basic Advanced Web App Query

I am trying to make a very basic query on Advanced Web App Query for my Samsung Frame.
I have read all the posts with a solution but nothing works…

[

{
“command”: {
“devices”: [
“xxxx”
],
“commands”: [
{
“component”: “main”,
“capability”: “samsungvd.appControl”,
“command”: “send”,
“arguments”:
[“OK”,“PRESS_AND_RELEASED”]
}
]
}

}
]

The error I get is: 422 The request is malformed. Unknown target: Malformed body on line 1:194

Thanks a lot for your help

In the AWA, the outer brackets [ ] are already there. Try removing them from your entry.

1 Like

Thanks a lot. I tried with and without and no luck…

You were OK with the square brackets in the first place. The ‘gotcha’ with the AWA and Rules is that is that it expects the value of the actions property which includes the square brackets. Why they don’t just let you paste in a complete Rule is a mystery.

It could be that it doesn’t like your arguments as the value should be an array of objects.

Try


[
    { "string": "OK" },
    { "string": "PRESS_AND_RELEASED" }
]
1 Like

Thanks a lot. Unfortunately it does not work either.

If I include the “” it will give me: " 422 The request is malformed. {“component”:“main”,“capability”:“samsungvd.appControl”,“command”:“send”,“arguments”:[{“string”:“OK”},{“string”:“PRESS_AND_RELEASED”}]}: invalid command"

If I dont include them it will give me : “422 The request is malformed. Unknown target: Malformed body on line 1:32”

That is telling you there is no such command as send in the samsungvd.appControl capability. That capability only has the one command launch, which takes a string argument for the ‘appId’ and then a couple of optional arguments which are objects.

{
    "id": "samsungvd.appControl",
    "version": 1,
    "status": "proposed",
    "name": "App Control",
    "ephemeral": false,
    "attributes": {},
    "commands": {
        "launch": {
            "name": "launch",
            "arguments": [
                {
                    "name": "appId",
                    "optional": false,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "name": "appData",
                    "optional": true,
                    "schema": {
                        "type": "object"
                    }
                },
                {
                    "name": "launchingOption",
                    "optional": true,
                    "schema": {
                        "type": "object",
                        "properties": {
                            "requester": {
                                "type": "string"
                            },
                            "launchFailAction": {
                                "type": "string",
                                "enum": [
                                    "none",
                                    "showInstallPage"
                                ]
                            }
                        }
                    }
                }
            ]
        }
    }
}
2 Likes

Omg!! You are the best!!!

I just substituted the command to “samsungvd.remoteControl” which has the “Send” option and it worked!

Thanks so much, there is been so much trying on my side!
Thanks again, you cannot think how appreciative I am for you help