(Manual dog head) Ignore the irregularities in relays and wiring. This board is just for debugging data transmission. The relay part is not intended to be used hhh.
bilibili demo link: [Demo link](https://www.bilibili.com/video/BV1p54y1i7pn)
You can’t blame me for the ugly interface of the app at the end. Li (ge) Zhi (zi) Qi (zhi) Zhuang (wang), no Wrong, that's it, he can use it anyway.
````
1. Function introduction
1.1 Hardware side:
This system provides multi-protocol communication interfaces for the Internet of Things to meet the communication needs of various network environments.
The design standard is aimed at the home Internet of Things environment, displaying data and controlling devices through multiple terminals such as web, app, and PC.
1.2 Server side:
The system is installed on the Alibaba Cloud server, and the system is centos7. Docker is used to separate each application to ensure stable operation, convenient reinstallation and backup.
The server supports multiple protocols such as mqtt, tcp, http, etc.;
emqtt, nodered, mysql and other software have been installed and actually applied, and thingsboard is planned to be added in the future.
1.3 Software terminal:
```
Due to time constraints, preliminary real-time information will only be displayed on the app, web, and PC terminals for the time being.
```
App:
Programmed using Android studio, mqtt protocol is connected to emqtt, and then forwarded to nodered for summary processing.
```
Can realize data display and equipment control.
```
PC:
Using c++ programming in vs2019, it currently only supports serial communication and displays the collected data.
```
Note: It is equipped with a wireless serial port receiver and can be directly connected to a computer.
```
Web:
Using the nodered system, it supports tcp, websocket, http, and mqtt multi-protocol external connections.
```
The web side can receive hardware data and forward it to various platforms and store it in the mysql database.
The web page has built-in real-time data display and device control.
```
1.4 Onboard resources:
Time is limited, all are plug-in modules for easy replacement.
The main control adopts the STM32F1 series, which is low-priced and works stably;
the local network adopts NRF24L01, which can achieve one receive and multiple sends;
the eps01 module is used to access the server with the tcp protocol (mqtt can also be supported);
one relay onboard is only for demonstration purposes and can be used freely Expansion;
onboard 2-way programmable buttons, single-color LED and RGB LED lights, can be used freely as needed;
in the later network mode, it can be connected to Xiaoai speaker control (through blink), and
it will support IAP remote update in the later stage.
2. Introduction to the work The
research and development purpose of this system is to integrate hardware to make the old electrical appliances in the home smart, unify the protocols of various new equipment purchased, achieve single platform management, and realize customized functions.
3. Selection introduction
3.1 Protocol introduction:
3.1.1 Serial port protocol:
2.4g intranet transmission and serial port adopt custom protocols.
3.1.2 Networking protocol:
Tcp: The tcp protocol is more commonly used. Due to time constraints, Essence official firmware
Mqtt is used: mqtt is specially designed for small data, with low power consumption, stability, and easy application.
Cjson: The networking part transplants the cjson library to transmit data. The content is neat, highly readable and compatible with multiple platforms.
Support external expansion: http, websocket, etc.
can send email reminders.
3.2 Hardware selection:
3.2.1 Wireless part:
esp01s:
```
Reason: Espressif's chip can be said to be of high quality and low price, supports multiple firmware flashing, and can freely choose official environment development or lua, mpython, etc.
Application method: Anxinke official firmware tcp connects to the nodered system deployed on the server.
```
NRF24L01:
```
Reason: Commonly used 2.4g communication chip, supports one send to multiple receive, one receive to multiple send, high flexibility and low cost, delay as low as ms level.
```
USB:
Onboard jdy-40 module serial port transparent transmission, with matching ttl to usb wireless receiver, can be used wirelessly, and the location is flexible.
Reason: jdy-40 supports AT commands, simple configuration and low cost.
RTC:
RTC uses stm32 built-in clock.
Reason: The WiFi network in the home environment is stable, and the chip can adjust the time independently.
````
)
![Screenshot_2020 -08-10-19-31-38-188_com.evan.demo..jpg]