Dahua API and active deterrence?

Cold-Lemonade

Pulling my weight
Apr 1, 2021
156
134
Boston
I have a Dahua TiOC (IPC-T5241H-AS-PV). Does anyone know the Dahua API command to select the audio file (among the pre-installed files) to play when the camera's alarm is triggered? For example, it would be nice to be able play the siren wav file, then play the wav file saying "You are trespassing". But the way the camera is set up, it can only play one file at a time. So I need to issue a command to the API to select a different file to do this.

Any insight?
 
Reading through API document v3.18 I cannot see anything towards the TiOC series...?
Audio status and volume is an option but doesn't seem to mention how to play a specific audio file.
Nor does it mention how to activate the blue/red lights (but it mentions 'non-smart' while lights).

For example, it would be nice to be able play the siren wav file, then play the wav file saying "You are trespassing". But the way the camera is set up, it can only play one file at a time. So I need to issue a command to the API to select a different file to do this.
I would just download both audio files and make them into one audio file with Audacity.
You may need an SD card inside of the camera to upload audio files to.


Here is a good video; Montavue camera's are rebranded Dahua cameras.


and some inspiration for audio clips:
 
Thank you @Mark_M

I think what I'll need to do install go2rtc in Home Assistant OS. go2rtc will let me stream any file I want from my raspberry pi to my cameras.
I saw this last night.... looks like the API can do the light/speaker on TiOC cameras.

I haven't tested it yet, but this does the first audio file on the camera.
http://username:password@camera_ip_address/cgi-bin/coaxialControlIO.cgi?action=control&channel=2&info[0].Type=2&info[0].IO=1
 
  • Like
Reactions: fenderman
I saw this last night.... looks like the API can do the light/speaker on TiOC cameras.

I haven't tested it yet, but this does the first audio file on the camera.
http://username:password@camera_ip_address/cgi-bin/coaxialControlIO.cgi?action=control&channel=2&info[0].Type=2&info[0].IO=1
Holly F.
I just did that command and can't get the siren to turn off :rofl::lmao:.
 
@Mark_M Yes--That is from one of my earlier posts. That command will trigger the audio file that has been manually selected in the camera through its web interface. What I would like to do is change the audio file by issuing an API command at the command line in linux.
 
Change the last part to =0 and do it again, It will turn off.
I'm doing this on a thermal Dahua camera...
IO=2 seems to be off.
Not off = 0 & on = 1.
On: http://192.168.1.23/cgi-bin/coaxialControlIO.cgi?action=control&channel=2&info[0].Type=2&info[0].IO=1
Off: http://192.168.1.23/cgi-bin/coaxialControlIO.cgi?action=control&channel=2&info[0].Type=2&info[0].IO=2

White light with 'Type=1' returns a bad request error. (Even though API 3.18 says 1 is white light and 2 is siren..??)
 
I'm doing this on a thermal Dahua camera...
IO=2 seems to be off.
Not off = 0 & on = 1.
On: http://192.168.1.23/cgi-bin/coaxialControlIO.cgi?action=control&channel=2&info[0].Type=2&info[0].IO=1
Off: http://192.168.1.23/cgi-bin/coaxialControlIO.cgi?action=control&channel=2&info[0].Type=2&info[0].IO=2

White light with 'Type=1' returns a bad request error. (Even though API 3.18 says 1 is white light and 2 is siren..??)

I'm glad you got it turned off.
 
Reading through API document v3.18 I cannot see anything towards the TiOC series...?
Audio status and volume is an option but doesn't seem to mention how to play a specific audio file.
Nor does it mention how to activate the blue/red lights (but it mentions 'non-smart' while lights).


I would just download both audio files and make them into one audio file with Audacity.
You may need an SD card inside of the camera to upload audio files to.


Here is a good video; Montavue camera's are rebranded Dahua cameras.


and some inspiration for audio clips:


please share API document v3.18 ?
 
If your camera can play custom audio files, one way around this would be to create your own custom audio file of the siren followed by the message. That way you only have 1 file for the camera to play. An App like Audacity might enable you to create this. I'm unsure off the top what format Dahua cameras use / require for audio.
 
Good link but why don't they just say somewhere to output .wav fomat at 32000kbs sample rate? Personally I'd rather use an App I know such as Audacity as it has far more audio adjustment possibilities beyond pure conversion.
 
Last edited:
  • Like
Reactions: Grn1z