CATALOG

Hello everyone, today let’s talk about something practical. Recently, many friends who are engaged in intelligent transformation have asked me: "Thingboot's 8-channel controller looks very powerful, but how do I connect it to my existing sensors or my own server to make it move on its own?"

Don’t worry, this solution is specifically designed to solve this problem. Let’s not deal with those empty theories, let’s just talk about people’s words and talk about practical things.

1. What exactly is this "8-way artifact" in our hands?

First of all, the "8-channel remote control device linkage module" you got (officially calledIntelligent universal controller | 8 channels, model: UNI-KZQ-TY-8), you can understand it as aSmart power strip with 8 switches, but these 8 switches are separate and hidden in the box.

  • What can it do?It can handle lights, motors, electromagnetic locks, water pumps...as long as it is an AC or DC load. If it is a high-power device, add an AC contactor in the middle, and it can also drive it..

  • How does it connect to the Internet?Going isWiFi 2.4G, this has a big advantage——No need to buy additional gateway, you can use the router at home/store to play with it.

  • What does it open?That's the point, it's all over youHTTP API interface. As long as you can make HTTP requests, you can command it whether it is Java, Python, PHP, or even Excel VBA..

2. Core gameplay: Opening up the "Ren and Governor's two channels" (interface docking)

To achieve linkage, you actually need to let the "sensor" or "your business system" tell the 8-way controller which way to open. The communication protocol usesHTTP, simple and direct.

Here is a small detail: Thingboot’s interface isFree foreverYes, you don’t have to worry about charging for the number of calls..

1. Preparation work (like cutting vegetables before putting them in the pot)

You have to go to Thingboot’s official website console first and write down these things:

  • AppID: Equivalent to your account ID.

  • AppSecret: Equivalent to your password (don’t reveal it).

  • Device ID: It is the ID card of the 8-channel controller in your hand (usually affixed to the device case, or can be seen in the background after the network is configured).

2. Encrypted signature (to prevent villain tricks)

For the sake of security, the Thingboot interface needs to bring a dynamic one when requestingsign(sign). This algorithm is a bit convoluted, but it’s very simple once you understand it:

  • Step 1: Put yours firstAppSecretDo an MD5 encryption and get a 32-bit string.

  • Step 2: Concatenate the string obtained above with the currenttimestamp(ts).

  • Step 3: Take this long string and encrypt it again with MD5.

In human words:

sign = md5( md5(AppSecret) + ts )

put thissignandtsAfter the URL, the platform will know "Oh, this is a legal instruction".

3. Get started directly: How to write control code? (Put the elephant in the refrigerator)

Our goal is to makeRoute 1Connected.

  • Request addresshttps://api.thingboot.com/{your AppID}/device/control/?sign={calculated signature}&ts={current timestamp}

  • Request method:POST

  • Data content(Body)

  • Effect

    • {"power1": 1}= The first path is closed (open)

    • {"power1": 0}= The first path is disconnected (off)

If you want to operate several channels at the same time:

It's that simple, send an HTTP request and the light will turn on.

3. Practical drill: Realize "multi-device linkage control" (real cool operation)

Just pressing buttons with your hands is no fun, what we want isautomation. The so-called "linkage" means"If A happens, then B will be executed".

Here are two common ways to do it, depending on which one you like:

Option 1: Use cloud server (suitable for public network/cross-region control)

This is the most standard and flexible method, suitable for you to connect the device to your own mini program, APP or background system.

The process is like this:

  1. Sensor trigger: For example, you connect a light sensor and detect that it is dark.

  2. Data reporting: The sensor sends data to your server (or Thingboot’s cloud platform).

  3. logical judgment: Your server background determines "illumination value < 10 lux".

  4. Issue instructions: Your server, as a client, initiates the above HTTP request to Thingboot's API.

  5. perform action: 8-way controller receives{"power1": 1}, the corridor light is on.

The advantage of this solution is: Even if you are abroad, as long as you have Internet access, you can control it.

Option 2: LAN/privatization (suitable for factories/showrooms/scenarios with high stability requirements)

If you don’t want to go through the external network, or there is no external network in the factory workshop, you just want the ultimate speed and stability. Thingboot’s equipment isSupport LAN controlof.

How to do it?You connect the server (such as a Raspberry Pi or industrial computer) and the 8-way controller to the same router.Your server directly sends HTTP commands to the device through the intranet IP (the specific IP can be viewed in the background of the router, or obtained after the device is configured).Advantages: 0 delay, can be controlled even if the network is disconnected, data does not leave the factory, safe.

4. A few advanced tips (to help you avoid detours)

When actually working, there are a few details that you must pay attention to, otherwise it is easy to get into trouble:

  1. About the logic of "linkage"

    • If it is just a simple "light turns on when someone comes and turns off when someone leaves", you can configure it directly in Thingboot's IoT console.Linkage rules, no need to write code.

    • If it is complex business logic (for example: scan code to pay successfully -> turn on the 5th channel -> time 1 hour -> turn off the 5th channel), then you need to connect to your payment system through API.

  2. About "Batch Control"

    • What if you have dozens of these 8-way controllers and want to turn them all on with one click? No need to write loops, core stepsdeviceParameters support passing multiple IDs, just separate them with commas.

    • device="Device A, Device B, Device C", one request goes down and the whole place is electrified..

  3. About "timing protection"

    • If you are controlling a motor or air conditioner, cutting off the power directly may damage the equipment. you can usereset(Break first and then connect) orpoint(First make, then break) command, leaving buffer time for the device.

Summarize

Whether it is difficult or not to connect this thing, the key is three steps:

  1. Distribution network: Connect the device to WiFi.

  2. Get Key: Go to the background and copy down the AppID, Secret and device ID.

  3. send request: Use HTTP POST with signature, facingpower1hair1or0.

After running through this process, all that's left is to use your imagination - whether it'sTime-of-use billing for shared tea roomsAutomatic irrigation of agricultural greenhouses,stillMultimedia linkage of sandbox models, this 8-way module can handle it. Go give it a try, and if you have any questions, feel free to read the official manual, which is more detailed.

控制器产品方案:
如何二次开发4 路智能照明控制器来实现定时开关照明设备电源
查看 >>
4路共享空间智能控制器MINI:怎么把4路包间电源智能控制器MINI对接到自己的项目中
查看 >>
怎么在照明控制中集成智能设备来实现分路控制灯光与设备
查看 >>
共享自习室包间管理:怎么将8路包间灯光空调控制器接入到软件项目中
查看 >>
如何接入智能 24 路远程开关控制模块来实现远程控制24路线路
查看 >>
联动场景方案:
如何二次开发3路智能照明开关以实现多设备联动控制
查看 >>
弱电间人体感应联动:怎样把吸顶式高精度红外传感器对接到项目中
查看 >>
如何在门店灯光管理中集成智能硬件来实现灯光场景联动控制
查看 >>
怎么在创客工坊门禁管理中集成智能设备来实现门禁系统联动控制
查看 >>
如何在共享棋牌室设备机柜电源管理中接入智能硬件来实现自定义总控联动逻辑
查看 >>
设备用途方案:
怎样在无人值守门店机柜电源控制中对接智能设备以实现多设备联动控制
查看 >>
怎样对接20W 远程喊话壁挂音箱以实现云端设备状态监控
查看 >>
怎么在照明控制中集成智能设备来实现分路控制灯光与设备
查看 >>
怎么在配电柜智能改造中接入智能设备来实现8 路设备电源状态监测
查看 >>
怎么接入智能PDU[总控]|5位来实现集中一键控制5路设备电源
查看 >>