Description
-
Notice
-
This solution only applies to network cameras that have the [Handover] feature.
-
Make sure to always use the latest firmware for IP speakers and network cameras to ensure proper operation.
-
- In the [Event rule] menu of a network camera, Handover can be set as an [Event action] in the following ways.
- This feature allows users to send SUNPI commands from the camera to the speaker to play a pre-stored audio clip.
- This feature can be used in the following cases
- The Solution to stop situation before it happens
- Real-time prevention from unwanted activities
- Protecting property on premises
Figure 1. An example of integrating a network camera with a single IP speaker
- IP speakers are defined as three types in the IP Audio System API. To control a single speaker with SUNAIP, it must be [Independent type].
Figure 2. Types of IP speakers
- Master Type : When a speaker is set as a controller, it will be in master type.
- Slave Type : When a speaker is registered as a speaker in an IP audio system, it will be in slave type.
- Independent Type : When the speaker is not used by any IP audio system, it is in independent type. This is the factory default state of the speaker.
Process
1. Check the speaker type.
- SUNAPI Command
http://<Device IP>/stw-cgi/system.cgi?msubmenu=deviceinfo&action=view
- Result example
Model=SPA-W100
SerialNumber=None
FirmwareVersion=3.4.5.2
BuildDate=2024.04.12
WebURL=http://192.168.1.140
DeviceType=NetworkSpeaker
SpeakerType=INDEPENDENT
ConnectedMACAddress=00:1d:1d:03:41:71
ISPVersion=None
BootloaderVersion=None
CGIVersion=2.5.9
ONVIFVersion=
DeviceName=SPA-W100IND
DeviceLocation=-
DeviceDescription=Descript
Memo=Memo
Language=eng
PasswordStrength=Strong
OpenSDKVersion=
FirmwareGroup=
- If the camera type is not [INDEPENDENT], the user needs to factory reset the speaker.
2. Getting list of audio files to play.
- SUNAPI Command
http://<Device IP>/ stw-cgi/eventrules.cgi?msubmenu=audiooutfiles&action=view
- Result example
{
"AudioOutFiles": {
"TotalSpace": 1024,
"FreeSpace": 1021,
"AudioClips": [
{
"Name": "Sample.wav"
}
]
}
}
3. Play Audio file to check
- SUNAPI Command
http://<Device IP>/ stw-cgi/eventrules.cgi?msubmenu=audiooutfiles&action=control&Type=Play&Name=Sample.wav
- Result example
{"Response" : "Success" }
- NOTE
- The independent type speaker output using SUNAPI can only audio files. TTS output is not supported.
- If you want TTS output, use the [To BGM] feature in the Speaker menu.
4. Set up camera handover
- Go to [Event] -> [Handover] menu. And click [Add] menu
Figure 3. Setting up a network camera handover event
5. Create a handover for playing audio files
Figure 4. Example network camera handover event setup
- No. : Select [Handover] number what you want.
- IP type : Select [IPv4]
- Type : Select [HTTP]
- IP address : Enter the IP address of the receiver device. In this case, the camera is sending commands to itself, so enter the IP address of the camera itself.
- Port : Enter HTTP port number. User can check it at [Basic] à [IP & Port] à [Port] tap
- User : Enter the speaker login ID.
- Password : Enter the speaker login password.
- Action : Select [Custom]
- Query string : Enter Command to send.
Figure 5. Handover event setup results
6. Create [Event rule] for playing audio files
- Go to [Event] -> [Event rule] menu. And click [Add] menu.
- Create a rule to activate the alarm out when a person is detected.
Figure 6. Setting up an event rule
Figure 7. Event rule setup result
Comments
0 comments
Please sign in to leave a comment.