Vampie
June 30, 2015, 2:39pm
1
Hi,
I want to start a playlist from within tasker from my android .
Tasker has a http post action, where we can provide data.
This is my data in tasker: https://goo.gl/photos/jY3say22EydAhDui9
the return error I get is: message=“Parse error”, code = “-32700”
any clues?
I’m using pi musicbox 0.6
Have you tried quoting the strings? And perhaps formatting the payload as json?
I tried these ones :
jsonrpc=2.0&id=1&method=core.playback.get_state
"jsonrpc=2.0&id=1&method=core.playback.get_state"
{“jsonrpc”:“2.0”,“id”:“1”,“method”:“core.playback.get_state”}
jsonrpc=“2.0”&id=“1”&method=“core.playback.get_state”
But they all give the same error.
And the headers I receive:
Status: HTTP/1.1 200 OK
Accept: application/json
Cache-Control: no-cache
Content-Length: 83
Content-Type: application/json; utf-8
Date: Wed, 01 Jul 2015 21:48:06 GMT
Server: TornadoServer/4.0.2
X-Android-Received-Millis: 1435787286483
X-Android-Response-Source: NETWORK 200
X-Android-Sent-Millis: 1435787286462
X-Mopidy-Version: 0.19.5
Vampie
July 1, 2015, 10:33pm
5
I got this working…
I had to change the content type to ‘application/json’ and data to {“jsonrpc”: “2.0”,
“id”: 1, “method”: “core.playback.get_state”}
Up to the next problem.
You don’t need to quote the numbers but I doubt that’s the issue. You might
benefit from running Mopidy in verbose mode and seeing what it receives in
the debug messages.