Skip to content

Instantly share code, notes, and snippets.

@whc2001
Created September 12, 2019 02:49
Show Gist options
  • Select an option

  • Save whc2001/2f65756150ceced609e45a1bad5eaa07 to your computer and use it in GitHub Desktop.

Select an option

Save whc2001/2f65756150ceced609e45a1bad5eaa07 to your computer and use it in GitHub Desktop.
[↑]RPC Request
{
"id":"$0",
"method":"$1",
"params":[
$2
],
"type":"rpc-request"
}
$0: Unknown UUID, can be an empty string
$1: RPC command
$2: RPC command parameters
Commands:
set-mode:
mode: [string] {proximity, gesture}
--------
[↓]RPC Response
{
"type":"rpc-response",
"id":"",
"error":null,
"value":null
}
--------
[↓]Unsolicited Event
{
"type":"event",
"name":"$1",
"detail":{
$2
}
}
$1: Event name
$2: Event parameters
Events:
error:
msg: [string] e.g. "Couldn't decode JSON"
proximity-data:
proximity: [int] [0 (farthest), 255(nearest)]
gesture:
type: [string] {up, down, left, right}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment