Dear All,
Since 4 January, I don’t know why but the following cURL command is no longer working from Home Assistant, although it used to work with no issues until then. The command purpose is to open a gate/relay embedded in a HikVision DS-KV6113-WPE1(B) doorbell:
curl -i --digest -u admin:password -X PUT -d '<RemoteControlDoor><cmd>open</cmd></RemoteControlDoor>' http://192.168.0.72/ISAPI/AccessControl/RemoteControl/door/1
The command works fine from other computers in the same LAN and the door opens (see the HTTP/1.1 200 OK
response in the second text block):
MacComputer$ curl -i --digest -u admin:password -X PUT -d '<RemoteControlDoor><cmd>open</cmd></RemoteControlDoor>' http://192.168.0.72/ISAPI/AccessControl/RemoteControl/door/1
HTTP/1.1 401 Unauthorized
Date: Sun, 15 Jan 2023 20:49:59 GMT
Server: webs
Content-Length: 235
Connection: close
X-Frame-Options: SAMEORIGIN
Cache-Control: no-store
Pragma: no-cache
WWW-Authenticate: Digest qop="auth", realm="DS-DE07BCFB", nonce="----------JkY2ZhOTFmNGM0ZDc1ODg4NTFiYWEyZWE=", stale="false", opaque="", domain="::"
Content-Type: application/xml
HTTP/1.1 200 OK
Date: Sun, 15 Jan 2023 20:49:59 GMT
Server: webs
Content-Length: 295
Connection: close
X-Frame-Options: SAMEORIGIN
Cache-Control: no-store
Pragma: no-cache
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="1.0" xmlns="http://www.std-cgi.com/ver10/XMLSchema">
<requestURL>/ISAPI/AccessControl/RemoteControl/door/1</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
<subStatusCode>ok</subStatusCode>
</ResponseStatus>
However, if I issue the command from Home Assistant Terminal, response is the following:
[core-ssh ~]$ curl -i --digest -u admin:password -X PUT -d '<RemoteControlDoor><cmd>open</cmd></RemoteControlDoor>' http://192.168.0.72/ISAPI/AccessControl/RemoteControl/door/1
HTTP/1.1 401 Unauthorized
Date: Mon, 16 Jan 2023 13:57:58 GMT
Server: webs
Content-Length: 235
Connection: close
X-Frame-Options: SAMEORIGIN
Cache-Control: no-store
Pragma: no-cache
WWW-Authenticate: Digest qop="auth", realm="DS-DE07BCFB", nonce="----------IzMGVjMDhhYjM5M2UyZTViY2EwODIyZWU=", stale="false", opaque="", domain="::"
Content-Type: application/xml
HTTP/1.1 401 Unauthorized
Date: Mon, 16 Jan 2023 13:57:58 GMT
Server: webs
Content-Length: 397
Connection: close
X-Frame-Options: SAMEORIGIN
Cache-Control: no-store
Pragma: no-cache
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="1.0" xmlns="http://www.std-cgi.com/ver10/XMLSchema">
<requestURL>/ISAPI/AccessControl/RemoteControl/door/1</requestURL>
<statusCode>4</statusCode>
<statusString>Invalid Operation</statusString>
<subStatusCode>invalidOperation</subStatusCode>
<errorCode>1073741830</errorCode>
<errorMsg>invalid operation</errorMsg>
</ResponseStatus>
This has been working for months with no issues, so I am wondering whether any of the latest HA updates has changed the way that cURL commands are being handled from Home Assistant. Any advice, please?