Hey there, really hoping for some help. Here is part of my conf (I did remove creds):
{
"platform": "cmdSwitch2",
"name": "cmdSwitch2",
"switches": [
{
"name": "SDL ALERT",
"on_cmd": "curl -X POST -s --form-string 'app_key=XXX' --form-string 'app_secret=XXX' --form-string 'target_type=channel' --form-string 'target_alias=XXX' --form-string 'content=This is a test AN from Alert.' https://api.pushed.co/1/push",
"off_cmd": "curl -X POST -s --form-string 'app_key=XXX' --form-string 'app_secret=XXX' --form-string 'target_type=channel' --form-string 'target_alias=XXX' --form-string 'content=This is a test AUS from Alert.' https: //api.pushed.co/1/push" }
]
}
As you can see the on_cmd is almost identical to the off_cmd. on_cmd gets executed perfectly when I turn the switch on but when I turn it off homebridge simply gives a log that it failed to turn off SDL ALERT.
If I change the off_cmd to a simple ping 8.8.8.8 I have no trouble turning the switch off an back again sending myself tons of push notifications.
Hey there, really hoping for some help. Here is part of my conf (I did remove creds):
{ "platform": "cmdSwitch2", "name": "cmdSwitch2", "switches": [ { "name": "SDL ALERT", "on_cmd": "curl -X POST -s --form-string 'app_key=XXX' --form-string 'app_secret=XXX' --form-string 'target_type=channel' --form-string 'target_alias=XXX' --form-string 'content=This is a test AN from Alert.' https://api.pushed.co/1/push", "off_cmd": "curl -X POST -s --form-string 'app_key=XXX' --form-string 'app_secret=XXX' --form-string 'target_type=channel' --form-string 'target_alias=XXX' --form-string 'content=This is a test AUS from Alert.' https: //api.pushed.co/1/push" } ] }
As you can see the on_cmd is almost identical to the off_cmd. on_cmd gets executed perfectly when I turn the switch on but when I turn it off homebridge simply gives a log that it failed to turn off SDL ALERT.
If I change the off_cmd to a simple ping 8.8.8.8 I have no trouble turning the switch off an back again sending myself tons of push notifications.
Any help is much appreciated, thanks