Posting to /select and receiving error 1019

Posting to /select and receiving error 1019

joshpfosijoshpfosi Posts: 3Member

Hi all,

I'm just playing around with the SoundTouch API, trying to get a Tasker (Android app) task to make a POST request to turn on the Bluetooth source on my SoundTouch 10.

Via curl I see no issues:

~ curl -d "<ContentItem source="BLUETOOTH"></ContentItem>" -X POST http://192.168.0.2:8090/select -v
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 192.168.0.2...
* TCP_NODELAY set
* Connected to 192.168.0.2 (192.168.0.2) port 8090 (#0)
> POST /select HTTP/1.1
> Host: 192.168.0.2:8090
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Length: 44
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 44 out of 44 bytes
< HTTP/1.1 200 OK
< Content-Type: text/xml
< Date: Sat, 04 Aug 2018 15:15:57 GMT
< Cache-Control: no-cache,must-revalidate
< Expires: Thu, 26 Oct 1995 00:00:00 GMT
< Transfer-Encoding: chunked
< Server: Allegro-Software-RomPager/5.40b1
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: Content-Type
< Connection: close
<
* Closing connection 0

But when I try the same POST in Tasker I see the following response:

<?xml version="1.0" encoding="UTF-8" ?><errors deviceID="68C90BD04C6C"><error value="1019" name="CLIENT_XML_ERROR" severity="Unknown">Error parsing request</error></errors>

I cannot see any typos or other issue. I also have little idea what this response means! Any insights?

Comments

  • edited 08/04/2018 - 15:43
    joshpfosijoshpfosi Posts: 3Member

    I suppose the response means I have some syntax error in the XML payload, but the exact command works sent from my laptop. Are there any logs we can access for the SoundTouch?

  • edited 08/07/2018 - 16:58
    Zach@Bose[email protected] Posts: 143Admin

    Hey joshpfosi,

    Sorry for the delay in my reply! I did some investigation into this, and was eventually able to get it working, though I did initially have some trouble. Do you have a Content Type set in the Tasker action? I had to set that to text/xml to get it working.

  • joshpfosijoshpfosi Posts: 3Member

    No worries. I do have that option. That fixed it. Thanks.

Sign In or Register to comment.