Shared chess and card rooms are becoming more and more popular, and customers require 24-hour self-service. But what the boss is most afraid of is that guests linger over time, or the private room door is not closed properly, causing disputes.
At this time, integrate a function at the service desk (or on the boss’s mobile phone)Automatic shoutingLarge outdoor speakers are very practical. It can directly solve the pain point of "people can't be found and words can't be heard".
Next we will take"Core Step"Take the open interface as an example. Let’s walk through how to use that10W outdoor waterproof wall-mounted speakerGet it into your software system.
1. Why is this "big speaker" needed?
Many shared chess and card rooms are opened in commercial buildings or office buildings at the bottom of communities. The service desk may be unattended, or the boss may be watching the store remotely from home.
Scenario pain points
Guest timeout: The guests are still playing after the time is up. Your call may be rejected, and the knock on the door is too far away.
Seat occupation reminder: Customers need to be urged to turn over during peak periods.
Abnormal alarm: Someone tried to break the access control or left the door open for a long time.
marketing broadcast: When a new store opens, you can shout "Congratulations to Mr. Wang upstairs for being crazy, and I'll give you a bottle of Coke!" to heighten the atmosphere.
That one10W outdoor waterproof wall-mounted speaker, the volume is loud enough, waterproof and dustproof, and it is suitable to be hung on the corridor ceiling or the background wall of the service desk.
2. Core idea: How to make the speakers "obedient"?
Thingboot's equipment is easy to handle, and you don't need to engage in complicated hardware development. The core logic is:Your software backend——> Call Thingboot’s HTTP interface——> The speaker sounds.
The whole process is like using a code to send a voice message to the speaker on WeChat.
3. Preparation (things you must have first)
Before writing code, first have these things ready:
Hardware equipment: That 10W remote control outdoor waterproof wall-mounted speaker (make sure it is powered on and connected to WiFi/4G). select2.4G WiFiversion, strong signal penetration.
Thingboot account: Go to their official website to register a developer account. This thingFree and open, no interface fee.
Get credentials
AppID: Your application ID.
AppSecret: Your developer password (used to count signatures to prevent others from shouting).
Device ID: The unique ID on the speaker (just like WeChat ID, you have to know who to send the command to).
4. Practical steps: connect them step by step
Step 1: Device network configuration (let the speakers access the Internet)
The speaker must be connected to the Internet to receive commands.
Log in to the Thingboot console.
Find "Network Configuration" and enter the WiFi name and password of the chess and card room (note: it must be the 2.4G frequency band).
Use a small program or app to scan the QR code of the speaker and push WiFi to it.
When you hear a beep or the indicator light is always on, it means it is online.
Step 2: Understand how to "speak"
This is the most critical. Thingboot provides an HTTP interface, you only need to send a POST request in your back-end code.
Request address(It probably looks like this):http(s)://api.thingboot.com/{Your AppID}/device/control/?sign={Signature}&ts={Timestamp}
Request parameters(What you want to send):
device: Fill in the device ID of your speaker.
order: This is the core command. If you want the speaker to speak, construct a JSON.
Code examples (pseudocode/thinking logic)
Suppose you are using Python to write the backend (the logic is the same if you change it to Java, Go, or PHP), and you want the speaker to shout: "302 Box time is almost up, do you want to renew the clock? "
Details added
timbre: You can add parameters
"voice":"1"Switch male voice, the default is usually female voice.volume: The shared chess and card room environment may be noisy, so turn up the volume at the beginning, for example
"volume":"8".speaking speed: The default value is 5. If it is too slow, you will feel anxious. If it is too fast, you will not be able to hear clearly.
Step 3: Integrate into "Shared Chess and Card Room Software"
Now you need to put the above code logic into your business code.
Scenario A: Automatic reminder when order times out
Trigger condition: The end time of the order in the database has arrived, and the user did not click "Renew".
action: The system automatically calls the above interface -> corresponds to the speaker at the door of the box -> plays: "The XX box time has arrived. If you want to continue the entertainment, please scan the code to renew, otherwise the power will be cut off in 5 minutes. "
Scenario B: Remote intercom/calling at the service desk
Trigger condition: The front desk clerk saw on the computer that a guest pressed the help bell, or saw someone standing in the corridor in a daze on the surveillance camera.
action: The waiter clicks a button on the webpage -> the backend sends a command -> the speakers in the entire corridor ring: "305 guests, your friends are waiting for you at the door. "
Scenario C: Low battery/device offline alarm
Trigger condition: If it is the battery version, the battery is low.
action: The system receives device status push (MQTT or HTTP callback), pops up a window in the background, and letsThat particular speaker at the service deskAnnouncement: "The speaker in the corridor on the second floor is low on power, please charge it. "
5. Several "pits" that you must pay attention to (pit avoidance guide)
As someone who has worked on projects, I would like to remind you:
Signature mechanismThingboot's signature is
md5(md5(key)+timestamp),noSimply spell the key in. Many novices directly report 5005 errors, which means that the signature algorithm is reversed. First use Postman to tune it up and then write the code..Asynchronous feedbackYou call the interface and return
code 200,It only means that the cloud has received the instruction, does not mean that the speaker is actually ringing (the speaker may be offline).If the requirements are really strict, such as "must confirm that the guest heard it", you need to configurePush message. Let the speaker call back to your server after successful execution, and then save a log.Outdoor waterproofsince you are10W outdoor waterproofWhen installing the wall-mounted model in the corridor or doorway, pay attention to the waterproof treatment of the network port and power interface. Although the speaker is waterproof, if the connector is not waterproof, it is easy to short-circuit.
Concurrency and current limitingThingboot limits single device access to 1 time/second. If your chess and card room system sends 10 commands to the same speaker in the same millisecond, an error will be reported in the subsequent ones. So we need to add it to the codeAnti-shake (Delay/Debounce), for example, only the last command will be broadcast in the same box within 5 seconds.
6. Summary
Integrate Thingboot’s speakers into the shared chess and card room system,The technical difficulty is very low (it can be solved in about half a day), but the improvement in user experience is huge.
Process reviewyour business logic(Time's up) ->Call HTTP interface(bring signature and device ID) ->Issue text commands -> 10W large speaker produces loud sound.
In this way, your shared chess and card room will have the ability to be "unattended, but with audible service", which not only saves labor costs, but also does not make the scene look cold.