Hi there. I’m looking into a curl which I need to put to a Fibaro HC3. It will be used for updating a global variable. In an OSX terminal the following is working;
curl -X PUT "http://10.0.0.108/api/globalVariables/Floor_home" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Fibaro-Version: 2" -H "Accept-language: en" -H "Authorization: Basic ccccccccccccc" -d "{\"name\":\"name\",\"isEnum\":true,\"readOnly\":true,\"value\":\"1\"}
The variable actually gets updated from “0” to “1”.
I have been trying to set this up using an automation. But I cannot get it to work. The variable will no be updated when the automation is triggered. I cannot see any errors…
Is there someone who can help me out?
In configuration.yaml I have put;
shell_command:
home_away: "curl -X PUT {{ url }} -H '{{ ac }}' -H '{{ CT }}' -H '{{ XF }}' -H '{{ Al }}' -H '{{ Au }}' -d '{{ data }}'"
In the automation as “Actions”
service: shell_command.home_away
data:
url: '"http://10.0.0.108/api/globalVariables/Floor_home"'
ac: '"accept: application/json"'
CT: '"Content-Type: application/json"'
XF: '"X-Fibaro-Version: 2"'
Al: '"Accept-language: en"'
Au: '"Authorization: Basic ccccccccccccc"'
data: '"{\"name\":\"name\",\"isEnum\":true,\"readOnly\":true,\"value\":\"0\"}"'
Thx! Cheers,