I'm having problems with the addpool API command. I'm certain I'm looking over something obvious, but I'm not seeing what it is.
The API docs state this:
The JSON request format required is '{"command":"CMD","parameter":"PARAM"}'
(though of course parameter is not required for all requests)
where "CMD" is from the "Request" column below and "PARAM" would be e.g.
the ASC/PGA number if required.
An example request in both formats to disable Hotplug:
hotplug|0
{"command":"hotplug","parameter":"0"}
When I try sending this:
{"command":"addpool","parameter":"http://192.168.0.194:3333,test,abc"}
I get this as a response:
{"STATUS":[{"STATUS":"E","When":1420251376,"Code":23,"Msg":"Invalid JSON","Description":"cgminer 4.6.1"}],"id":1}
When I try sending this:
"addpool|http://192.168.0.194:3333,test,abc"
I get this as a response:
{"STATUS":[{"STATUS":"E","When":1420251505,"Code":14,"Msg":"Invalid command","Description":"cgminer 4.6.1"}],"id":1}
(Isn't the response supposed to be in text if the request is in text?)
I've tried this on my S4 with cgminer 4.6.1, and on my SP20 with cgminer 4.7.0, and I get the same result.
Yet if SSH into my S4 and enter:
cgminer-api "addpool|http://192.168.0.194:3333,test,abc"
It works.
What am I missing?
Thanks.
M