Commands & Usage
Use of xMsg to control SmartScreen (Asynchronous)
Function: xmsg.send() Usage: {"in":"{"fm":"(from DDN)","to":"(to DDN)"}","data":"(SmartScreen command)", attributes...} Example: {"in":"{"fm":"koYh3Ik1","to":"pJRt6H9G"}","data":“drop”,“type”:”url”,“src”:[“http://ypcloud.com”]}
Use of xRPC to control SmartScreen (Synchronous)
Function: xrpc.call() Parameters: target: {"target":"demo"} //'demo' being the user-defined target_device name (an 'alias' in lieu of the target_device 'DDN') func: "cmd" (SmartScreen API command) body: {"data":"cmd", attributes...)"} Example: {"target":"demo"},{"data":”drop”,“type”:”url”,“src”:[“http://ypcloud.com”]}
Command Format
- CLI: Command line command, type is string
- JSON: {"cmd":"drop",…}