DS-I114W + TinyCam = intercom

jacobtey

n3wb
Joined
Feb 10, 2024
Messages
9
Reaction score
0
Location
Kazakhstan
Hello. Need professional help. I received an ancient camera for the occasion. There is a microphone, speaker and alarm relays. I decided to use it as a calling panel and set up a video intercom in conjunction with tinycam. I attached a button to the alarm input relay and set up a call: you press it and the camera image opens on your smart TV; in tinycam you can turn on the sound and speak into the microphone of the air mouse. I wanted to connect the electric gate lock to the relay output, but a bummer awaited me. The fact is that manual launch is only available on the camera settings page. And at these construction sites there is no field for enabling basic authorization on the web. That's why PUT commands return with a 401 error. Does anyone know how to overcome this?
Снимок экрана 2024-02-11 083139.pngСнимок экрана 2024-02-11 083116.png
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,794
Reaction score
39,078
Location
Alabama
Have you tried opening up a browser on that smart TV and make that HTTP API call to actuate that relay?
If successful, bookmark the URL in that browser.

Have you tried "digest" authentication with the username and password in the HTTP URL?
 
Last edited:

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,794
Reaction score
39,078
Location
Alabama
Assuming you've checked your URL for accuracy and correct syntax, when using "digest" you should be able to embed the authentication in the URL as follows:

Code:
http://username:password@168.31.88/ISAPI/System/IO/outputs/1/trigger
Have you tried to send the URL from a PC on the same LAN to actuate the relay?
 

jacobtey

n3wb
Joined
Feb 10, 2024
Messages
9
Reaction score
0
Location
Kazakhstan
Assuming you've checked your URL for accuracy and correct syntax, when using "digest" you should be able to embed the authentication in the URL as follows:

Code:
http://username:password@168.31.88/ISAPI/System/IO/outputs/1/trigger
Have you tried to send the URL from a PC on the same LAN to actuate the relay?
Code:
<ResponseStatus version="2.0">
<requestURL>/ISAPI/System/IO/outputs/1/trigger</requestURL>
<statusCode>4</statusCode>
<statusString>Invalid Operation</statusString>
<subStatusCode>methodNotAllowed</subStatusCode>
</ResponseStatus>
 

jacobtey

n3wb
Joined
Feb 10, 2024
Messages
9
Reaction score
0
Location
Kazakhstan
It could control the alarm output through its own vendor.xml. Similar to how DoorBird controls a door lock. But through ISAPI. I tried to add a line to custom-vendor but it returns error 500
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
736
Reaction score
230
Location
Croatia,Zagreb
I dont believe there is such thing as url digest. But you can make c#/py/js script to do that for you.
 

jacobtey

n3wb
Joined
Feb 10, 2024
Messages
9
Reaction score
0
Location
Kazakhstan
I wrote a script with curl. On startup, it closes and opens the relay after 5 seconds. I read that curl is missing on android. And it really doesn't exist on smarttv. I decided to try it from my smartphone. Surprisingly, it turned out. I don't understand where curl comes from in my Android smartphone.

Code:
curl -k --silent -H 'Content-Type:application/xml' -X PUT -d '<IOPortData><outputState>high</outputState></IOPortData>' http://192.168.31.88/ISAPI/System/IO/outputs/1/trigger --digest -u user:password && sleep 5 && curl -k --silent -H 'Content-Type:application/xml' -X PUT -d '<IOPortData><outputState>low</outputState></IOPortData>' http://192.168.31.88/ISAPI/System/IO/outputs/1/trigger --digest -u user:password
photo_2024-02-15_15-26-54.jpg
 
Top