Hello, Newbie here,
I have a perfectly well working web service call I can issue from chrome (PC Windows 10) and get the results I want (a dimmer being turned on in Fibaro Home Center 2 at level 40)
I am not allowed to post urls but the below works with http
and ://
and 192.168.1.13/api/callAction?deviceID=453&name=setValue&arg1=40
but I cannot get it to work using curl on a raspberry pi 3 running raspbian
I've tried different cases like
curl --data "deviceID=453&name=setValue&arg1=40" http //192.168.1.13:80/api/callAction
curl -X POST 'http://192.168.1.13/api/callAction?deviceID=453&name=setValue&arg1=40'
curl -X POST http //192.168.1.13:80/api/callAction?deviceID=453&name=setValue&arg1=40
none with any success. I hopefully just miss some small but very important stuff and would appreciate some expert advice.
When I run the above from the command line in linux with -v option I get results like below. The response code 405 means " Method not allowed � no content
" *
Connected to 192.168.1.13 (192.168.1.13) port 80 (#0)
> POST /api/callAction?deviceID=453&name=setValue&arg1=40 HTTP/1.1
> Authorization: Basic YWasdfasdfasdfasdsdfsadfasQnddMg==
> User-Agent: curl/7.38.0
> Host: 192.168.1.13
> Accept: */*
>
< HTTP/1.1 405 OK
< Date: Sat, 12 Aug 2017 08:12:47 GMT
* Server 0.9 is not blacklisted
< Server: 0.9
< Content-Length: 0
< Cache-Control: must-revalidate, no-cache, no-store, max-age=0, max-age:0
< Pragma: no-cache
< Expires: Fri, 01 Jan 2010 00:00:00 GMT
< Content-Type: text/plain
<
* Connection #0 to host 192.168.1.13 left intact