This is a solution on how to connect Thingboot intelligent hardware to realize wind power adjustment in computer room air conditioning management. I will write it based on Thingboot's open interface documents and some common industry practices, try to avoid too rigid code stacking, and use more expressions of actual scenarios.
1. Why bother with this?
Those of us who are engaged in computer room operation and maintenance all know that the equipment in the computer room is an "electric tiger" and generates huge amounts of heat. If the air conditioner is constantly blowing at full capacity, it will not only consume electricity, but also easily cause problems with the equipment (such as static electricity and local overheating). In traditional computer room management, you have to rely on experienced technicians to manually adjust the air conditioning panel, or simply set the air conditioner to a fixed temperature for a year, which is actually very wasteful.
What we have to do now isMake air conditioners "smarter". Use Thingboot's intelligent hardware and open interfaces to write a script or integrate it into our own existing monitoring system. When the temperature in the computer room is low, the air conditioner is turned down; when the temperature is high, the air volume is automatically increased. Even for different cabinet areas, precise air supply can be achieved "where you point it."
2. What should we prepare?
Before you start, the hardware must be in place. You have to make sure that the air conditioner in the computer room is not a "dumb" device. Specifically, you need the following things:
Remote controlled air conditioner/fan: If the air conditioner itself is an old split unit, you may need aInfrared remote control gatewayorSmart air conditioning panelcome and take over. If it is a precision air conditioner (such as the one used in base stations), it usually comes with a 485 communication interface, and you need to add oneIoT gatewayto transfer.
Thingboot’s smart hardware: This mainly refers to the acquisition/control module in your hand, such asIntelligent voice columnAlthough it is mainly voice, its bottom layer also sends and receives commands in a similar way; or directly uses theirUniversal control panel/DTU, its function is to connect the old air conditioner and turn the air conditioner into an "Internet-enabled" device..
A little guy who measures the environment: Must haveTemperature and humidity sensor. Without this, the air conditioner is "blind". The sensor collects the temperature in the air inlet area of the cabinet in real time and feeds it back to the system.
3. Core link: How to control wind power?
The gameplay of Thingboot is actually quite simple, mainly by sending commands to the equipment. We can do it in two ways:HTTP request (short connection)orMQTT protocol (long connection). Since we want to make automated adjustments, we will most likely use code to call their API..
Step 1: First figure out what the command you sent looks like
There is a core action in Thingboot's interface document called "Issuing instructions to the device".
Assuming your air conditioner fan supportsThree-speed speed adjustment(low speed, medium speed, high speed), or support0%-100% stepless speed regulation. We tell that controller through the API: "Hey, turn the wind up to 70%."
Usually you need to construct a request like this (explaining the parameters a little colloquially):
URL address
http(s)://api.thingboot.com/{your AppID}/device/control/The "key" you must bring
device: The ID of the device you want to control (you can see it on the Thingboot console, it is a string of numbers).signandts: This is a security check to prevent others from randomly adjusting your air conditioner. It is equivalent to bringing a dynamic password..orderThat's the point!Write here what you want to do.
Step 2: Issue wind power instructions in actual combat
Assume that your device stipulates that the attribute that adjusts wind speed is calledfan_speed, set the wind speed to high wind.
Then yourorderThe parameters probably look like this (JSON format):
Or if the device supports specific percentages:
Tips: The interface of Thingboot is very flexible. If it is a simple command, you can even write it directly in the GET parameter.
?device=123&fan_speed=high.
Step 3: Don’t forget "asynchronous feedback"
After issuing the command, the interface will return immediately{"code":200}, but thisdoes not representThe air conditioner's wind has indeed become stronger. It only means that the platform has received the instruction.
What should I do if the air conditioner is not working because it is broken or not connected to the Internet? At this time, message push needs to be enabled. You need to let the Thingboot platform push the execution results to your server address. If you receive a device return execution failure, your system will quickly send an alarm to the operation and maintenance master.
4. How to achieve "automatic adjustment"? (This is the core)
It’s not enough to be able to issue instructions manually, what we want is "intelligence". Here is a logical reference for you to implement. You can write a small program (either Python or Node-RED) and run it:
Scenario: Dynamic air adjustment based on temperature feedback
Regular polling (for example, once every 5 minutes)
Your program first asks the Thingboot platform: "Hey, what is the current temperature of the temperature sensor in computer room A?"
logical judgment
If the temperature is > 28°C (risk of equipment overheating) ->implement:Call the core step interface and issue
Fan speed=100%,orCooling output = increase. At the same time, a notification is sent: "The computer room is too hot and is being cooled at full speed!"If the temperature is 22℃ - 28℃ (normal range) ->implement:Issue
Fan speed=60%. Stay comfortable and save some power.If the temperature is < 18℃ (too cold, a waste of electricity) ->implement:Issue
Fan speed=30%Or simply turn off the fan and only retain natural circulation.
Smooth adjustment
Don't jump from 0% to 100% all at once, as this will cause a large current surge and the equipment will be easily damaged. For example, set the adjustment range to no more than 20% each time, adjust it every 1 minute, and slowly approach the target temperature.
5. Advanced gameplay: group control and "air on demand"
If there are many air conditioners in your computer room, be careful"Competition Run"problems (for example, one is cooling and the other is heating, or the two units are facing each other and the efficiency is low).
You can use the interface support of ThingbootSpecify devices in batchesfunction.
Strategy:Plot all the air conditioner temperature settings on a graph. If you find that area A is overheated, just increase the wind speed of the air conditioner above area A and keep the speed in area B low. This can save a lot of electricity bills.
Linked access control/smoke: Although it has nothing to do with wind power, it can be linked - once a fire breaks out in the computer room (smoke alarm), the system will immediately forcibly shut down all air supply motors to prevent the spread of fire.
6. Guide to avoid pitfalls
In practice, there are several pitfalls you need to pay attention to:
Don't blow up the interface: Thingboot’s interface limits the access frequency of a single device to 1 time/second.. If your program loops endlessly to send commands, your IP will be blocked.
Don’t get the device ID wrong: Gateways and sub-devices must be distinguished. If the air conditioner is hung below the gateway, you may have to bring it with you when giving instructions.
gatewayParameters that tell the platform which gateway to forward from..Private weird protocol: Some computer room precision air conditioning protocols are proprietary to the manufacturer (such as certain special instructions similar to Daikin). Although Thingboot hardware can transparently transmit, you need to capture packets or ask the manufacturer for a detailed register address table to achieve accurate control..
7. Summary
Using Thingboot to connect computer room air conditioners is actually a three-step process:
Connect up: Use their gateway to connect air conditioners and sensors to the Internet.
Adjust it:pass
device/controlInterface, take itdeviceID to changefan_speedparameter.automation:Write a simple logic script (turn it up when the temperature is high, turn it down when the temperature is low).
By doing this, your computer room air conditioner will no longer just blow the air, but will become a smart housekeeper that can think for itself. Not only is the equipment safer, but the electricity bill can also be visibly reduced.
Notice: Specific wind speed command code (for example, usingwindSpeedstillfanfield), it depends on which type of air conditioning controller you buy (infrared type or 485 type). First, manually click on the "Device Debugging" page of the Thingboot console, capture the packet to see the format of the command issued, and then copy it into the code. This is the safest way.