@ -119,10 +174,65 @@ Directly quote the code of [呓喵酱の图床](https://imgbed.yimian.xyz) with
At present, it is simple to implement with additional web pages, waiting for the [ushio-auth project](https://github.com/iotcat/ushio-auth) to complete the unified integration.
At present, it is simple to implement with additional web pages, waiting for the [ushio-auth project](https://github.com/iotcat/ushio-auth) to complete the unified integration.
## 3. Appearance
## 3. Appearance
Nothing to say, show the picture, see for yourself
Due to the epidemic, considering that everyone has withdrawn to China. To save server costs, stop providing services.
Combining the operation status of the past six months, I have made some analysis and summary:
## Main gains
1. Experience in analyzing the real needs of customers
2. Ability to quickly build production environment website tools
3. My roommate's recognition of my ability
## Development Methodology
1. Based on a series of past projects, quickly set up and put into use in 3 days
2. Carefully study the requirements and determine which are true and which are false.
## Challenges encountered
1. Rapid development, because everyone has started to spend a lot of money on public goods after arriving in the UK, so there is an urgent need to use this system
2. The algorithm must be stable and reliable, because it involves everyone's money
3. The purpose of this system is to make it more convenient to delegate the accounting work to the system for automated processing. In this way, the number of internal transactions between everyone must be as few as possible and the instructions must be clear under the premise of ensuring fairness.
4. How to make everyone trust the system.
## Solution
1. Based on a large number of own previous projects. It takes 1 day to develop and form, 1 day to test debug, 1 day to optimize the front-end, add variance, percentage and other functions.
2. Refer to the accounting table and use the table mode. Every time there is a new upload, the new status will be calculated in real time. Tested many times and put into use after full verification.
3. Use the concept of "balance" and pay attention to differences. When the differences are too large, make internal transactions between those who spend the most and those who spend the least. And the internal transaction value is an integer. For example, our production scenario uses 20 pounds.
4. When the system algorithm is stable, refer to the design of Alipay. There are two steps to internal transactions. Both the first-choice payer and the earner receive emails telling to whom (from whom) and how much money. Then after the payer gives the money to the earner, the earner needs to log in to the web page or confirm it from the email link. As of this time, the system considers that an internal transaction is complete.
-------------------------------
**2020-9-8 update**
Based on the Ushio user system, combined with the operation of the past six months and the changes in everyone's needs, I reconstructed and developed a new version of the public expenditure system.
## New features
- Achieved access to Ushio user system
- Users can register and create new public bills at any time
- The same user can be in multiple bills at the same time
- Users can join the public bill at any time
- Users can settle and exit a public bill at any time
- Smarter settlement algorithm
- Use LocalStorage to optimize the speed of secondary access
## Experience
cp-acc is now open to the public, you can go to its [website](https://cp-acc.yimian.xyz) to experience it. But before the experience, you need to log in with your email address through the ushio user system in order to receive bill messages.
大一暑假,开始尝试使用WiFiduino在家中控制一些物体,实现了对(坏了的)太阳能加水(通过电磁阀)的控制(修改了原先家里的管道,加入了电磁阀。跑了好多趟五金店,收获了不少关于水管的知识和实践经验。之后做surf的水泵也有用到。)以及对走廊灯(通过光电耦合器)的控制。找到一台废弃的10年前的我爸的IBM笔记本,装上了win server 2008, 并配置好了mysql数据库,并定期使用http从单片机采集数据。我用php写了一个简单的web界面,来展示相关信息,并实现网页控制。由于家里被分配的是中国移动分配的大NAT内网IP,因此使用frp来实现内网穿透,使外界可以访问家里服务器上的web网页。
Combining the knowledge I have learned and using cutting-edge technology to benefit life has been my unremitting pursuit for a long time. In order to let my family experience a more stable, comfortable and intelligent lifestyle, and to consolidate the technical foundation and architecture experience accumulated in the school smartfarm project and my own ushio system, I decided to use 20 to 23 before going abroad. All day long, reconstruct the old IoT system at home. Adopt a layered architecture and interface-oriented, test-oriented, and **document-oriented** development principles, with **Available** and **Reliable** as the highest priority indicators to build an operational target 3. A highly modular, easy-to-remote control, open source home software and hardware intelligent sensor control system for more than years.
Combining the knowledge I have learned and using cutting-edge technology to benefit life has been my unremitting pursuit for a long time. In order to let my family experience a more stable, comfortable and intelligent lifestyle, and to consolidate the technical foundation and architecture experience accumulated in the school smartfarm project and my own ushio system, I decided to use 20 to 23 before going abroad. All day long, reconstruct the old IoT system at home. Adopt a layered architecture and interface-oriented, test-oriented, and **document-oriented** development principles, with **Available** and **Reliable** as the highest priority indicators to build an operational target 3. A highly modular, easy-to-remote control, open source home software and hardware intelligent sensor control system for more than years.
## 0 Architecture overview
## Background:
In the first semester of the freshman year, I was new to MCU and used Arduino Uno to build a smart curtain system in the dormitory (for details, please refer to [this blog](https://www.eee.dog/tech/build-236-iot-platform) -on-wifiduino.html)), has accumulated a certain amount of experience.
## Method:
1. Ask experts (for water pipe problems, ask the owner of the hardware store, and LoRa for advice from Oulang R&D department)
2. Be a wheel, keep iterating, optimize the system in refactoring, and gain experience
3. Investigate the needs of customers (family) carefully, pay more attention to customer needs in design, rather than communicate with customers
4. When designing a system, it must be assumed that other systems that interact with it are unstable. Let the interaction between systems be like gentlemen intersect, like water. Thereby improving the margin of the whole system.
5. Continuous operation and maintenance. For example, it happened before the three rounds of development. My mother touched a human sensor while cleaning, causing the entire light control system to be disordered. At that time, I was in Suzhou connected to the server at home via remote ssh, kicked the broken sensor out of the control system and solved the problem. Therefore, you must allow yourself to be connected to the system for operation and maintenance at any time. The future operation and maintenance must be fully considered in the design.
## Process overview:
### First round of development
Freshman summer vacation, I began to try to use WiFiduino to control some objects at home, and realized the control of (broken) solar water (through solenoid valve) (modified the original home pipes and added solenoid valves. I went to the hardware store many times. , I have gained a lot of knowledge and practical experience on water pipes. Later, I will also be useful to do surf pumps.) and control the corridor lights (through photocouplers). I found an abandoned IBM laptop of my dad 10 years ago, installed it with win server 2008, and configured the mysql database, and regularly used http to collect data from the microcontroller. I wrote a simple web interface in php to display relevant information and implement web control. Since the home is assigned a large NAT intranet IP allocated by China Mobile, frp is used to achieve intranet penetration, so that the outside world can access the web pages on the home server.
### Second round of development
During the sophomore winter vacation, the previous firmware was improved, wifiduino was used to control the lights in the kitchen, living room, and dining room one after another, and a series of sensors were deployed and connected to the network. Because the WiFi signal of the single-chip microcomputer of the solar energy pipeline was weak, a router was used nearby to bridge. It is worth mentioning that on the night of New Year’s Eve, I was still at home with a power outage 2 minutes before the start of the Spring Festival Gala. I don’t know how my parents feel. .
### Third round of development
Sophomore summer vacation, based on the experience of this semester, reconstruct the system. On the server, the reinstallation system provides UI and other services for Centos7 to use the home assistant open source project, using mqtt as the communication protocol. Use nodeJS to write the control logic of light control automation and solar water adding. In the single chip microcomputer, the firmware is updated, and the ota remote firmware update is supported (referring to some Wiot experience, but more tailored to local conditions). In addition, two new flow meters have been added to fully automate the solar water addition (previously, the water addition time was set through the web page). Due to the weak WiFi signal of the flowmeter, we used Arduino uno + LoRa as the communication means. This design, combined with the opinions of parents, fully considered the stability of the overall system. For example, how to handle various types of errors and loss of connection, how to restart after a power failure, how to ensure that the MCU is not disordered when the server is unresponsive, and how to physically switch back to manual after the system is out of control (such as lights, and Solar energy plus water).
### Fourth round of development
In the summer vacation of the junior year, based on the sensor data accumulated in the past, the LSTM model is used to train the neural network through keras+tensorflow to realize the prediction of the light control state. The optimization is still ongoing and is expected to be completed before September. In addition, there are plans to connect to the Tmall Wizard (still in the queue, waiting for the development of the ushio oauth system, the ushio oauth system needs to wait for the development of the ushio user system, and the ushio user system needs stable js-session as support, js-session Need to use fp to accurately identify user equipment.. Currently fp is still in the third test stage. So, let's do it step by step,,).
## 1 Hardware Design
## Hardware design
### 1.1 Single Chip Microcomputer Material Selection
### Single Chip Microcomputer Material Selection
Use Arduino UNO as the calculation unit. On the one hand, Arduino Uno has high reliability. My previous smart curtain system used Arduino Uno as the main control board, and it ran smoothly for one and a half years without hardware problems. On the other hand, Arduino Uno has a larger RAM, so there is no need to bother to program the microcontroller in order to compete for RAM.
Use Arduino UNO as the calculation unit. On the one hand, Arduino Uno has high reliability. My previous smart curtain system used Arduino Uno as the main control board, and it ran smoothly for one and a half years without hardware problems. On the other hand, Arduino Uno has a larger RAM, so there is no need to bother to program the microcontroller in order to compete for RAM.
The main disadvantage of Arduino UNO is its high price, but this cost is necessary to ensure long-term stable operation.
The main disadvantage of Arduino UNO is its high price, but this cost is necessary to ensure long-term stable operation.
### 1.2 WiFi communication module selection
### WiFi communication module selection
Use ESP-01 as the WiFi communication module. The main reason is that the ESP-01 has been used to build a remote control car in the previous school courses, and I have a better understanding of its working methods and performance to reduce development costs.
Use ESP-01 as the WiFi communication module. The main reason is that the ESP-01 has been used to build a remote control car in the previous school courses, and I have a better understanding of its working methods and performance to reduce development costs.
### 1.3 LoRa communication module selection
### LoRa communication module selection
Use **Anxinke LORA RA-02 LORA** as the communication module between LoRa node and LoRa gateway. The reason is that this module is used in the surf project, so I understand it better.
Use **Anxinke LORA RA-02 LORA** as the communication module between LoRa node and LoRa gateway. The reason is that this module is used in the surf project, so I understand it better.
### 1.4 Smart speaker selection
### Smart speaker selection
As the most important interface for human-computer interaction in this Internet of Things system, smart speakers play a pivotal role. After research, I use Tmall Elf Sugar R as a home smart speaker. On the one hand, the price/performance ratio of Tmall Genie is very cheap. Second, unlike Xiaomi’s development of Xiao Ai, the purpose of Ali’s development of Tmall Genie is to provide a platform that allows developers to access its network in various forms, which is very important to me.
As the most important interface for human-computer interaction in this IoT system, smart speakers play a pivotal role. After research, I use Tmall Elf Sugar R as a home smart speaker. On the one hand, the price/performance ratio of Tmall Genie is very cheap. Second, unlike Xiaomi’s development of Xiao Ai, the purpose of Ali’s development of Tmall Genie is to provide a platform that allows developers to access its network in various forms, which is very important to me.
### 1.5 Light toggle switch
### Light toggle switch
Initial idea: one-way control + reset device.
Initial idea: one-way control + reset device.
Actual realization: The original single-opening is transformed into double-opening, one is connected in series with the relay, and the other is connected with two pin ports.
Actual realization: The original single-opening is transformed into double-opening, one is connected in series with the relay, and the other is connected with two pin ports.
Two communication modes of WiFi+LoRa are adopted. In scenarios that require high-speed and high-quality communication, such as Tmall Genie, mobile phones, and notebooks, use WiFi as a means of communication. In places where the WiFi signal is unstable, use LoRa for communication. Use MQTT as the application layer protocol.
Two communication modes of WiFi+LoRa are adopted. In scenarios that require high-speed and high-quality communication, such as Tmall Genie, mobile phones, and notebooks, use WiFi as a means of communication. In places where the WiFi signal is unstable, use LoRa for communication. Use MQTT as the application layer protocol.
## 3 Main control system design
## Main control system design
Use the python3 open source project Home Assistant as the basis to build the main control system of this project.
Use the python3 open source project Home Assistant as the basis to build the main control system of this project. The effect is as follows:
Multimedia is mainly provided by Tmall Genie. In addition, through the Xiaomi box, the video, pictures, and music in the home network disk can be played on the TV and stereo.
Multimedia is mainly provided by Tmall Genie. In addition, through the Xiaomi box, the video, pictures, and music in the home network disk can be played on the TV and stereo.
## 5 Cloud support system design
## Cloud support system design
dns.yimian.xyz provides dns resolution service.
dns.yimian.xyz provides dns resolution service.
## 6 NAS storage system design
## NAS storage system design
By mounting the idle 500G mechanical hard disk removed from the old computer to the old IBM server, the storage system is built.
By mounting the idle 500G mechanical hard disk removed from the old computer to the old IBM server, the storage system is built.
In the local area network, since the home is a win system, smb is used as a sharing protocol to realize file transfer and supports mounting in the local area network. The speed is stable, and the whole network reads and writes about 10MB/s. Access to the external network is realized through http and frp reverse generation, but the speed is slow.
In the local area network, since the home is a win system, smb is used as a sharing protocol to realize file transfer and supports mounting in the local area network. The speed is stable, and the whole network reads and writes about 10MB/s. Access to the external network is realized through http and frp reverse generation, but the speed is slow.
The following is a screenshot of the web interface:
![NAS Web Page](https://api.yimian.xyz/img/?path=imgbed/img_352da66_1866x814_8_null_normal.jpeg)
## Conclusion
### Main gains
1. Full-stack IoT (cloud + pipe + terminal) system construction operation and maintenance experience
2. LoRa, WiFi communication system construction experience
3. Machine learning development operation and maintenance experience
4. Customer needs analysis experience
5. Experience in home circuit modification
6. Experience in renovation of household water pipes
### Challenges encountered
1. How to ensure that all MCUs have high-quality network connections
2. The family hopes to reserve a way to return to the oldest manual switch state with one click when the system crashes.
3. Control the light switch accurately
4. How to reduce the coupling between modules
### Solution
1. Use WiFi, LoRa dual protocol. WiFi is used to connect the single-chip microcomputer closer to the router, and LoRa connects to the single-chip microcomputer in the original place where the WiFi signal is weaker.
2. I have equipped each switch with double insurance, so that each switch can be returned to manual state after easy operation. If you want to return to manual mode, just scan the QR code on the switch and follow the instructions. For details, see [Emergency Operation Guide](https://sola.yimian.xyz/#/home?id=%E5%BA%94%E6%80%A5%E6%93%8D%E4%BD%9C%E6%8C%87%E5%8D%97)
3. In the first round of development, the light control is determined by the microcontroller. There is no essential difference with the sound-controlled lights in the corridor, they are all sensors -> single chip microcomputer -> lights. In the second round of development, this judgment logic was transferred to the server. In the third round of development, we introduced night mode, day mode, midnight mode, etc., and used mathematical models in the decision-making process to determine the probability of people using the data of each sensor to determine the control of the lights. However, this method is not always timely. Family members always need to press the toggle switch when it is just dark. Therefore, in the fourth round of development, I hope to use machine learning to let myself learn the switching habits of my family. Currently, data is being continuously collected and trained, and the night accuracy is around 0.75.
4. Each module and the single-chip microcomputer use mqtt to interact. Each microcontroller has an online mode and an offline mode. The light control decision module and the solar control module are two separate nodeJS modules, guarded by pm2. In order to ensure uninterrupted services, they use redis (configured persistence) as real-time data storage.
------------------------
------------------------
2020.6 update
**2020.6 update**
## RNN realizes light control
## RNN realizes light control
Based on the previously accumulated human sensor data, the LSTM model is used to train the neural network using keras to realize the prediction of the light state.
Based on the previously accumulated human sensor data, the LSTM model is used to train the neural network using keras to realize the prediction of the light state.
--------------------------
**2020.8 update**
## Tmall Elf Access
Self-built OAuth server has realized the access of Tmall Wizard.
@ -511,12 +512,17 @@ gugu.print("This is from wIoT!!");
```
```
{% raw %}</span>{% endraw %}
{% raw %}</span>{% endraw %}
{% raw %}<spanclass=".en">{% endraw %}
{% raw %}<spanclass=".en">{% endraw %}
# Quick Start
# Quick Start
This project aims to help web developers who are not familiar with firmware programming to implement their own IoT applications. You only need a server inside the network (such as Raspberry Pi) and several MCUs (single-chip computers) that support networking (via serial port, WiFi, LoRa, Bluetooth, Zigbee, etc.), you can easily create and manage your own Internet of Things Cluster.
## Current Support devices
## Current Support devices
- D1 MINI
- D1 MINI
@ -532,7 +538,7 @@ For **windows** user, you can follow the instruction in [this website](https://w
After install Node.js and configure npm successfully, you should then use npm to download wIoT package by enter following command in your command window.
After install Node.js and configure npm successfully, you should then use npm to download wIoT package by enter following command in your command window.
```shell
```bash
npm install wiot
npm install wiot
```
```
@ -705,8 +711,7 @@ var MyMCU = new wiot.client({
- `disConnected` Disconnect from MCU
- `disConnected` Disconnect from MCU
- `reConnected` Connection with MCU restored
- `reConnected` Connection with MCU restored
```
```js
js
var MCU = new wiot.client({"MAC": "xx:xx:xx:xx:xx:xx"});
var MCU = new wiot.client({"MAC": "xx:xx:xx:xx:xx:xx"});
Wiot, a distributed IoT operating system based on NodeJS.
# Project Description
## The original intention of the project
This project aims to help web developers who are not familiar with firmware programming to implement their own IoT applications.
When developing traditional Internet of Things programs, we need to write, burn, and debug each development board again and again, and connect them in a certain way to provide a certain service. This method is very cumbersome, and the development cost and threshold are relatively high. In addition, the ancient C and C++ languages lack mature dependency management tools, so that it is difficult for us to write development boards as easy and convenient as developing python or nodeJS programs.
This project is trying to provide a method to automate the process of burning and debugging the development board, and move the steps of logic writing to the NodeJS interface of the remote computer. In this way, we are able to centrally manage the functions of distributed IoT nodes. In addition, with NodeJS's mature dependency manager npm, the development of IoT applications is more convenient and efficient.
So far, down to every IoT node, up to various types of databases and user terminals, all can be configured and operated on the same nodeJS interface. Developers will be able to focus on the development of IoT logic and realize more colorful IoT applications.
# First round of development
> The first round of development was completed in May 2019, please refer to [this blog](https://www.eee.dog/tech/wiot.html)
Realize the pin port mapping of D1 MINI development board to nodeJS, and support a series of functions such as ota.
By providing standardized microcontroller firmware and automated burning tools, wiot abstracts, organizes, and maps the pin port functions of each development board into a callable NodeJS interface.
As shown in the figure above, the wiot architecture mainly consists of three parts: Node node, wiot Cloud Module, and wiot cli command line program. Among them, the Node node is the NodeMCU microcontroller with the wiot firmware burned. They use IEEE 802.11 WiFi for distributed communication, and connect to a router at a node to connect to the wiot cloud module. Users use NodeJS to call Wiot on their own PCs and rely on writing IoT programs. After completion, the user uses wiot cli to check, test and deploy the developed program. The deployed IoT program will run on the wiot cloud module, and can use the nodeJS interface to interact with other cloud services or databases.
### Node node
Node node uses NodeMCU development board (expansion board based on ESP8266). After using wiot-cli to burn the wiot firmware, NodeMCU will become a wiot node.
#### **Mode**
Wiot nodes have four modes: master mode, slave mode, bridge mode and debug mode. This mode can only be configured when burning firmware. In master mode and bridge mode, nodeMCU will enable STA and AP mode at the same time. In slave mode, only STA mode is enabled. The master needs to have a stable and unlimited power supply, which has a large power and is not suitable for low power consumption scenarios. Bridge and slave can flexibly adjust power, which can be used in low power consumption scenarios.
In debug mode, the node works in STA and AP mode. Users can use mobile phones and other devices to connect to this node and open the root directory webpage. The web page will display various information about the current location of this node in real time, such as the signal strength received from other nodes, which is suitable for deployment scenarios.
#### **Low power**
Wiot nodes support Low Power state. But this state can only be opened in slave mode and bridge. This state can be turned on or off through wiot api or wiot-cli. The low power consumption state is realized by the sleep function of esp8266. In this state, it can be powered by dry batteries for several years [[1]](https://makecademy.com/esp8266-battery).
#### **Networking**
Wiot nodes use distributed networking. Where the router signal is strong, the master node will access the router WiFi network and bridge it. Where the router signal is not strong, each node will find another upstream master or bridge node with the strongest signal and bridge it (except slave).
As shown in the figure above, the two master nodes close to the router are automatically connected to the router wifi. The other downstream nodes are respectively connected to the upstream node with the strongest signal.
#### **Certification**
![Radio frequency fingerprint identification[2]](https://api.yimian.xyz/img/?path=imgbed/img_d184ff2_1442x502_8_null_normal.jpeg)
Wiot nodes support the use of **RF Fingerprint Recognition**[[2]](https://ieeexplore.ieee.org/document/8715341) to achieve downstream communication authentication. This method uses the RSSI function of esp8266 and scan return parameters. When the downstream device attempts to access the network, the upstream device will collect fingerprint information and report to the server. The server compares the fingerprint with the previous version stored in the database and makes a decision whether to allow access to the network.
### Cloud Module
The cloud module acts as the cloud part of Wiot and provides cloud functions. The cloud module can guard the wiot program running in the run-time state. In addition, the cloud module can also provide functions such as testing and deployment. The cloud module uses Docker for virtualization.
### Command Line Program
That is wiot-cli. It is a set of operation tools provided by Wiot on the developer terminal. Through wiot-cli, developers can implement functions such as testing, deploying, and restoring wiot programs. In addition, wiot-cli also supports a series of common functions such as debug. See the `wiot-cli command` below for details.
## User operation steps
1. The user downloads, installs and configures the NodeJS environment.
2. The user runs the command `npm i -g wiot-cli` through the command line to install the wiot command line tool
3. The user runs the command `wiot init my-wiot-proj` to create and configure a wiot project folder in the current directory, the project name is my-wiot-proj. At this point, the user will be prompted to fill in some information about this project, such as project description, author information, WiFi account password, wiot cloud module address, project main script, etc.
4. The user enters the project directory, connects the nodeMCU to the computer through the data cable, and runs `wiot node init my-first-node [--type=<master|slave|bridge|debug>]`. This will automatically configure and burn the Wiot firmware to the nodeMCU development board and name it my-first-node. type is an optional parameter, which can be set to `master` or `slave` or `bridge` or `debug`, and the default is `master`.
5. Follow this method to burn all the development boards and deploy them in the production environment.
6. Run the command `wiot status` in the project folder to see if all nodes are online. If not, use the command `wiot log` with the `grep` tool to find the log location problem.
7. Start writing your wiot program from the main project script (default is `index.js`).
8. Use the command `wiot check` to check the logic of your wiot program.
9. Use the command `wiot test` to suspend the running program in the cloud module and run the program in the current project folder. At this point, all console output will be displayed in your command line window. Use `Ctrl+C` to terminate the current test and restore the previous program of the cloud module.
10. Use the command `wiot push` to deploy the local wiot program to the cloud.
## Other operations
### Deploy your own wiot cloud module
Install docker and run the command `docker run -d --name=wiot-cloud -p 3594:3594 -v /var/wiot/data/:/var/wiot/data/ iotcat/wiot`.
### wiot-cli command
- `wiot help [command]` view help
- `wiot clone <host:user/project>` to clone the project from the cloud module to the local
- `wiot pull` uses remote code to overwrite local code
- `wiot push` deploys the current folder wiot program to the cloud module
- `wiot ls` shows all current nodes
- `wiot map [nodeID]` shows the connection path of a node
- `wiot log [nodeID] [--head=<number>|--tail=<number>]` view the log of a node
- `wiot stop` stop wiot service
- `wiot start` to start wiot service
- `wiot restart` restart wiot service
- `wiot reload` restarts the wiot service without resetting the flash variable
- `wiot init <name>` creates and initializes the wiot project folder
- `wiot node init <node-name> [--type=<master|slave|bridge|debug>]` configure and burn nodeMCU development board
- `wiot check` checks the current folder project logic problem.
- `wiot test` will suspend the running program in the cloud module and run the program in the current project folder. At this point, all console output will be displayed in your command line window. Use `Ctrl+C` to terminate the current test and restore the previous program of the cloud module.
- `wiot status [nodeID]` displays current project or node status information
- `wiot debug start` terminates the current cloud program and enters debug mode
- `wiot debug set <nodeID> <pinID> <0-255>`Set the PWM output value of a node pin in debug mode
- In `wiot debug reset <nodeID>`debug mode, reset the data storage of a node and reconnect
- `wiot debug get <nodeID> <pinID>` get the PWM value of a node pin in debug mode
- `wiot debug sleep <nodeID> <pinID> <HIGH|LOW>`debug mode to set a node to lightly sleep until it is awakened by a pin's high or low level
- `wiot debug dsleep <nodeID> <millisecond>` set how many milliseconds a node deeply sleeps in debug mode
- In `wiot debug reconnect [nodeID]`debug mode, reconnect to the network or disconnect and reconnect to a node
### Common API
> To be designed, please refer to [One-round development wiot document](https://wiot.yimian.xyz/#/home)