Closed Juravenator closed 6 years ago
Hi, sorry for the late response! I assume libcoap clients can differ (I only tested it on osx and raspibian), and trying to parse the first element of the array on failure won't make things any worse. I just merged an another PR, so i'll include this change in the new release. Thanks!
On my machine, when executing any command, I get the following error:
The soap-client used from upstream seems to be working, for example, executing
tradfri.getDevices
in the background runs/usr/bin/coap-client -m get -u "xxx" -k "yyy" "coaps://some-ip:5684/15001"
and returnsThe line producing the error is in CoapClient.makeRequest():
resolve(JSON.parse(stdOut.split('\n')[3]));
When I change this to
Everything works again.
My main question is where this magic number 3 comes from. Is this a misconfigured libcoap on my end? Or is the 3 variable across environments (and would warrant a PR)?
My system: