This is actually a typical "smart apartment password access control high-density verification" scenario. Combining the product features of Thingboot, I compiled a complete solution from hardware selection, interface docking, to dynamic cryptographic algorithm implementation. I hope it can give you some inspiration.
Solution: High-density password access control system for smart apartments based on Thingboot open interface
1. Let’s talk about the pain points: Why do we need "high-density verification"?
As apartment managers, what are we most afraid of? They are afraid that the tenant will not return the key when they cancel the lease, they are afraid that the agent will be exhausted running around with the inspector, and they are even more afraid that someone will copy the access card and come in to cause trouble.
The traditional "one card, one password" model is a nightmare in apartments with a large floating population. The core of the so-called "high-density password verification" is to solve two problems:First, change passwords frequently(One password per person, discarded after use),The second is high security anti-counterfeiting(To prevent leakage and copying).
The strength of Thingboot's smart hardware is that it fully opens the HTTP interface. We don't need to be bound by the manufacturer, and we can develop a flexible password management system by ourselves.
2. Core idea: How to build this system?
To put it simply, it means "the tenant clicks on his mobile phone -> our server calculates the code -> issues the access control -> the tenant opens the door."
This turns the access control from a rigid piece of hardware into an obedient "little brother". The core product we connect is Thingboot’s"Smart Password Access Control", this thing supports WiFi networking. The most important thing is that it supports 100 dynamic passwords and can set the validity period..
The overall architecture is like this:
hardware layer: Install a core-step password access control at the door of each apartment to control the electronic lock.
network layer: The access control is connected to the apartment’s 2.4G WiFi (this thing does not support 5G, please note).
Cloud platform layer: Our business server.
Application layer: Management APP for landlords, mini program for tenants.
3. Do it yourself: specific implementation steps for high-density verification
Here we don’t play with virtual things, just look at how to adjust the interface. Thingboot equipmentOpen HTTP interface, any language that supports HTTP requests can handle it.
Step 1: Get the device "online"
After getting the equipment, configure the network first. Thingboot's hardware is quite simple. Just feed the on-site WiFi name and password to the device through their IoT console or applet.. Only after the device is connected to the Internet can we manage it in the cloud.
Step 2: Get the deadline password (solve the core of "high density")
This is the core logic when tenants move in. We do not directly tell the tenant a fixed password, but dynamically generate a time-sensitive password through the interface.
Scenario A: Long-term tenant moves inGoal: Give him a password, the validity period is exactly the day of the lease, and it will be automatically invalidated when it expires.operate:Our server sends an instruction to Thingboot's API interface.
Request address
http(s)://api.thingboot.com/{AppId}/device/control/bring signature(This is for security, to prevent others from adjusting the interface randomly, just mix the AppSecret and the current timestamp and encrypt it).
Issue orders: In the body of the request, we need to tell the device: set the password, what the password is, and when it will expire.
Tips: Thingboot’s device itself supports settings
Validity period. We can take advantage of this feature or implement it through program logic - on the day of cancellation, our server will automatically send another command to delete the password. This is called "double insurance".
Scenario B: Temporary visitors/intermediaries (high-density and high-frequency scenarios)This is the coolest place. For example, if the agent wants to show someone the house on the third floor, we don't need to send someone to the site.The administrator clicks "Generate Temporary Password" on the APP and selects "1 hour" or "Only once" for the validity period.The server receives the instruction, generates a random code, and sends it to the corresponding access control. The tenant or agent enters this code on the access control and the door opens. When people leave, the code will be useless. There is no need to worry about copying..
Step 3: What counts as "high security"?
The so-called "high density" is not only fast to change passwords, but also safe.
Offline verification: Thingboot’s devices support offline password verification. In case the apartment is disconnected from the Internet, the access control can also calculate whether the password is correct (based on the time synchronization algorithm). This is so important in scenarios such as apartment elevator control and access control. You cannot be dumbfounded if the Internet is disconnected.
Anti-eavesdropping: HTTPS is used for interface calls, and MD5 is used for signatures (although it is MD5, with the timestamp and key, it is enough for access control scenarios. If you have high requirements, you can deploy it privately over a LAN).
Duress alarm: This function can be customized with Thingboot or made using logic. We can enter a "special password" for the tenant. If he is held hostage and opens the door and enters this specific password, the door will still open as usual, but we will quietly receive a "110 alarm" notification in the background..
4. Interface practice: if you are a programmer
If you were asked to write code now, it would probably look like this (pseudocode logic, refer to Thingboot official manual):
Scenario: The tenant checks in and sets a password for him that will expire in 7 days.
Notice: Specific field name (for example, is it calledexpire_time) Please read the product manual of the corresponding model of Thingboot, different versions may be slightly different, but the logic is to send JSON.
5. Possible pitfalls during landing
WiFi signal problem: The door lock is installed in the iron door, and the signal shielding is strong. When renovating an apartment, it is strongly recommended that APs (wireless access points) be installed in weak current wells or corridors to ensure full 2.4G signal. If the signal is poor and the device is frequently disconnected, the issuance of dynamic passwords will be delayed..
Password Digits and Storage: This Thingboot device supports 100 dynamic passwords. More than enough for one door in an apartment. But if it is a public area gate of a building, buy a higher-end model or clean the zombie passwords regularly (write a timer script to clear expired ones once a month).
Local private deployment: If you feel that it is not safe to send data to the cloud, or the apartment network does not have an external network (unlikely), Thingboot’s equipment supportsLAN control. If your server is on the apartment network, send the request directly to
http://deviceIP/controlThat's it, it's fast.
6. Summary
The biggest advantage of using Thingboot equipment for high-density verification isSave money and be flexible. You don't need to buy an expensive entire access control system. You can just buy a few pieces of hardware and write a few hundred lines of code to get it running. For places like apartments where tenants move quickly, implementing "one password for one person" or even "one password for one time" not only improves security, but also reduces the manual work of administrators delivering keys everywhere.