Hi!
Yes, I have a project or two using 6.0.1 and Terra.
There appear to be three issues here.
The first:
You need to send "[CR][LF]" at the end of your command.
Second - pay attention to your Quotation marks here:
You've properly put in TCPSend(1,"Command here") BUT - what is important, because this is JSON, we NEED to send the proper quotation marks downstream.
When you use double quotes in your Widget Command, you're starting and stopping your JSON string.
Instead, you need single quotes in the Widget Command to keep the double quotes in the JSON string in tact:
- Code: Select all
Tcpsend(1,'{"jsonrpc": "2.0", "method": "applylayoutbyname", "params": { "name": "LAYOUTNAME" }, "id": 1}')
Third, you say "name" is the requested layout - this is the JSON Object that the Terra is calling, if you change "name", it won't be able to parse the "name" object location.
You need to change "LAYOUTNAME" to your layout name.
This way, the Terra will first see the Object location "method", which in this case is "applylayoutbyname".
Now Terra knows it only needs one object to complete this command - and it's looking for an object called "name".
As a note, the "id" integer at the end can be anything integer you want it to be, this is useful for parsing any returns/responses from the Terra.
Happy Widgeting!