Closed iPhilBln closed 4 years ago
The API has no user interface, you can test the API with command line tools (e.g. cURL) or visual tools (e.g. Postman).
I don't meant a user interface but i think into the firefox browser you can see the the output of the json file. But it makes no differences if i type into my shell on a ubuntu mashine the command with curl i get also no response.
curl http://192.168.***.***:40011/devices/4801***/ -o test.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
But the test.txt is empty.
You forgot to set the Authorization header.
Can you write me an example? I don't know where I have to add the api key. curl --user needs a username that i don't know.
I would recommend to use the SSH action, which works great for me in Siri Shortcuts and Home automations. I use the following command to lock my door:
curl -X POST 'http://localhost:40011/devices/XXXXXXXX' -H 'Content-Type: application/json' -H 'Authorization: my_own_password' --data-raw '{"state":"locked"}'
Thanks for your help. This command works for me.
Hey i activated the api option but get no output.
The website
192.168.***.*ip_of_my_homebridge*:40011/devices/480****/
is always blank and i have no more idea what i can change. So i need some help to configure the api to post a locked command with siri shortcuts.