This is a document aboutSafety voice reminder for unattended placessolution. If you have a 20W wall-mounted speaker from Thingboot and want to turn a "dumb" monitoring system into a "living" system that can talk, this article should be able to help.
1. What pain points does this solution want to solve?
Let's first imagine a scenario: in the middle of the night, at a certain telecommunications base station or unmanned warehouse, the door is not closed tightly, or an intern breaks in by mistake. Although traditional surveillance is captured on video, it is impossible for the on-duty staff to stare at the screen 24 hours a day. Wait until you see someone and call again, the day lily will be cold.
So, our needs are simple:Let the scene "speak".
We need to use the "Thingboot" model20W wall mounted voice speakerIntegrate into existing monitoring or sensor systems. Once the sensor is triggered (such as infrared induction, door magnet is opened), the speaker will immediately use TTS (Text to Speech) to shout: "Hey, irrelevant personnel please leave immediately, you have been recorded!" - the main feature is one"Persuasion" and "deterrence" .
2. Hardware selection: Why does it have to be a 20W wall-mounted one?
In Thingboot’s product line, we choose"Smart Voice Wall Mounted Speaker | 20W", the reason for choosing it is very crude:
Loud enough (20W power): Unattended places usually have large spaces (factories, computer rooms, parking lots), and 20W can cover dozens to hundreds of square meters, and people can be restrained as soon as they come in.
Convenient to connect to the Internet: This thing supportsWiFi, just scan a code to connect to the network, no need to pull the audio cable (PoE version is also available, it depends on the network cable situation on site).
open interface: This product is not an ordinary Bluetooth speaker. It comes with an HTTP API interface. To put it bluntly, it canRemote control via codeit speaks.
3. Access logic: It’s actually just one sentence
Many people think that smart hardware access is complicated, but in fact Thingboot’s interface is very "direct". The core logic is:Your server (or cloud platform) sends an HTTP request to Thingboot’s API, and the speaker will ring..
The entire business process is roughly like this:
Sensor alarm: For example, the temperature and humidity sensor in the computer room detects that the temperature is too high, or the door sensor detects that the door is opened.
business system decisions: Your business background receives an alarm and determines that you really need to make a call.
Call the speaker interface: Call the open interface of Thingboot in the background and issue TTS text instructions.
physical sound: Thingbootyun pushes the command to the specific speaker (identified by device ID). The speaker receives the text and immediately converts it into a voice broadcast.
The whole process is real-time, no one is required to record, the text is sent directly in the background and the speakers read it out.
4. Step-by-step docking tutorial (interface practice)
Let's get some practical information and see how to do it at the code level. The interface style of Thingboot is very unified, mainly through HTTP Post or Get..
Step one: Preparation
You have to activate the speaker on the Thingboot platform first and get the two most important things:
AppIDandAppSecret(equivalent to account password)
Device ID(It can be seen on the bottom of the speaker or in the background. This is the only ID card)
Step 2: Calculate signature (Sign)
For the sake of security, Thingboot's interface needs to verify the signature. The formula is simple:md5(md5(developer password) + timestamp).Don’t be afraid, let’s write a piece of pseudo code:
Step 3: Deliver TTS voice (core link)
This is the most critical step. We call/device/controlInterface, let the speaker speak.
Request addresshttp(s)://api.thingboot.com/{your AppID}/device/control/?sign={calculated signature}&ts={timestamp}
Request parameters (JSON Body)
Analyze thisorderOrder
playRepresents broadcast action.gbk:16Represents text encoding and volume (16 is medium volume and can be adjusted).The Chinese behind it is what you want it to say.
Advanced gameplayIf you want to make a "ding dong" sound to remind people to pay attention first, and then talk about the content, you can useringOrder
Step 4: Handle exceptions
The code returning 200 only means that the command was sent.. If your speakers aren't sounding, check:
Is the speaker online?: You can see the device status in the background of Thingboot.
Content Compliance: The TTS engine does not understand Martian characters, so just send normal Chinese characters.
volume: Have you set the volume to 0 (the volume range is generally 0-100).
5. Actual combat scene scripts
Interfaces alone are not enough, they must be coordinated with business logic. Here are scripts for simulating two unattended scenarios:
The first scenario: substation/distribution room (prevention of approach)
trigger source: Camera video analysis detects people entering the designated "danger area".
Linkage logic
The backend receives a human entry alarm.
Call the speaker interface in the background and set the volume toMax (100).
Report now:"Warning! High voltage danger! Please exit immediately!"
If no one leaves after 10 seconds, the announcement will be looped again and the attendant will be notified.
The second scenario: unmanned warehouse (anti-theft/off-duty reminder)
trigger source: Triggered by infrared human body sensor.
Linkage logic
Infrared signal detected.
Determine whether the current time is after 22:00 pm.
If so, trigger the speaker:"The surveillance has been linked to the public security. Please show your work badge, otherwise it will be recorded."(This kind of "social death" voice deterrent puts great psychological pressure on thieves).
The third scenario: off-duty supervision in the fire control room (prevention of off-duty)
need: According to relevant policies, if the on-duty personnel in the fire control room are off duty for more than 3 minutes, an alarm will be issued..
Linkage logic
The face recognition or camera at the door determines whether the person has left the fire control room.
Timer for 3 minutes, if you haven’t replied yet.
triggerAnother small speaker in the officeOr directly make a voice call to the person in charge: "Boss, there is no one in the fire control room. Go and have a look."(Note, don’t use the loudspeaker on site to shout, otherwise the whole company will know that someone is off duty. To save face for employees, use internal communication methods).
6. Guide to avoid pitfalls (for those who have experienced it)
WIFI signal problem: This speaker uses WiFi, and the signal is often poor in unattended corners.Please make sure there is more than 2 bars of signal, or directly use4G versionorCable version(UNI-YY-YX-BG-LAN-20W).
Don’t overdo TTS: If the sensor triggers 100 times in an hour, and you let the speaker roar 100 times without restriction, it will not only easily burn the amplifier, but also make people numb. Remember to add in the code"Frequency Limit"(For example, the same alarm is only broadcast once within 5 minutes).
TTS speaking speed: Emergency situations (such as fire alarm) requireSpeak fast and in a high pitch;General prompts (such as welcome) are requiredSpeech at a moderate speed and gentleness. Thingboot’s interface supports adjusting
speedandtone, don’t be lazy, differentiate the scenes.echo cancellation: If it is a two-way intercom scene, echo must be processed, but here we areOne-way pure broadcast, so don’t worry at all.
7. Summary
This 20W speaker from Thingboot is essentially a"Internet-connected printer with speakers"——Easy to get started, clean interface. by putting/device/controlThis interface hangs behind your existing alarm system and can give a traditional unattended site a "mouth" in just a few minutes.
In this way, you don’t have to go to the scene,The sound will arrive as soon as possible, many times, a warning is much more useful than watching a video replay afterwards.