Posts: 5,184
Joined: Jan 2009
Reputation:
131
The parameter's name is "text" and not "Text" (see capital T in your example). The response tells you that it's missing the "text" parameter because the parameter names are case sensitive.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 5,184
Joined: Jan 2009
Reputation:
131
It should be "params" and not "Params" (again case sensitive) so it doesn't pick up any of the parameters you provide in the call and therefore it doesn't find the required "text" parameter.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 5,184
Joined: Jan 2009
Reputation:
131
I think you should first look at how JSON and JSON-RPC work and then take a closer look at the API. All those mistakes in your request are very basic. Furthermore the error response you get provides you with quite some information on what is wrong.
The value of your "done" parameter (see the "name" property in the error message) is provided as a string ("Invalid type STRING received") but a boolean value (see the "type" property in the error message) is expected so remove the double quotes around "false" in your request.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 5,184
Joined: Jan 2009
Reputation:
131
No but if you don't use the proper keywords which the API expects it doesn't work. JSON property names must be case sensitive. If the API expects a boolean value, you can't pass it a string. The JSON validation on JSON Lint won't help you there because it doesn't know about the API-specific requirements. It can't know that the value of the "done" parameter should be a boolean and not a string. It's still valid JSON if you pass it as a string but it's simply not what the API expects.
Always read the
online manual (wiki),
FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the
forum rules (wiki).
Please read the pages on
troubleshooting (wiki) and
bug reporting (wiki) before reporting issues.
Posts: 6
Joined: Apr 2013
Reputation:
0
Montellese, I got my SendText to work fine with your help from this thread. Now I need to send specific letters over JSON so I can put text into the virtual keyboard. If I use SendText it clears whatever was sent before it. If there a way to send a letter at a time then just press done when you are finished with JSON commands?
Posts: 1,109
Joined: Feb 2011
Reputation:
39
Can't you just reproduce the effect of sending individual keys by having your code store the entire string as it's typed but use the SendText method after each key press?
Posts: 8
Joined: Nov 2015
Reputation:
0
I am trying to create a keyboard for irule program json commands to the kodi, but nocmando send text when I send the first texte he does not allow write the second, for instance created text with the letter "a" and the letter "b "but if I hit any of the two he did not add another, only replacing the letter by the other. is there any way to solve?
{"jsonrpc":"2.0","method":"Input.SendText","params": {"text": "A", "done":false},"id":1}
{"jsonrpc":"2.0","method":"Input.SendText","params": {"text": "A", "done":false},"id":1}