Involved: JSON generated on raspberry pi not understood by my unit ON script?
ard jonker
ard.jonker at xs4all.nl
Mon Oct 30 14:47:42 EDT 2017
> $result = curl_exec($ch);
> curl_close($ch);
> echo "Curl result: $result\n";
Meanwhile, on the XTension end, I do get a debug result but the (code in the) ON script doesn't seem to fire. Below is the failing log output followed by a successful json interface command that is simply 'on/off'. The only thing I don't trust to be correct are the square [ ] brackets surrounding the actual json string. That could, of course, be added by James to delineate the string.
> 2017-10-30 19:34:55
> begin data available( 1) with available count of 159 data in buffer length is: 0
> POST /<tankberry token>/TANKBERRY HTTP/1.1
> Host: xtension.local:21111
> Accept: */*
> Content-Type: application/json
> Content-Length: 1538
> Expect: 100-continue
>
> NO GET parameters were found
> contentLength=1538 buffer size=0 will wait for more data.
> begin data available( 2) with available count of 1538 data in buffer length is: 0
> past process headers. got headers is TRUE contentType=(application/json) contentLength=1538
> about to call SendFormDataToXTension
> JSON Data: begin
> ?json=
> [
>
> {
> "temp":63.375,
> "address":"28-000002d02c14",
> "timestamp":1509388201
> },
> <...>
> {
> "temp":57.375,
> "address":"28-000002d03444",
> "timestamp":1509388201
> }
> ]
>
> ----------end
> back from call to SendFormDataToXTension
> connection closed.
>
> 2017-10-30 19:38:44
> begin data available( 1) with available count of 109 data in buffer length is: 0
> GET /<driveway token>/DRIVEWAY/ON HTTP/1.1
> Host: 192.168.0.204:21111
> User-Agent: curl/7.43.0
> Accept: */*
>
> NO GET parameters were found
> command was found: (ON) Sending Command to unit
> connection closed.
>
More information about the XTensionList
mailing list