Internet of Things Completion--Smart Homestay System (WIFI+APP+OneNet)

Table of contents

Preface

One line diagram

1. Schematic diagram

2. PCB effect

3. Physical effects

4. Function overview

(1) Hardware side

(2) Hardware side

(3) Cloud platform side

Demo video

2. How to use the underlying code

1. Instructions for use

2. Download the program

3. Check the cloud platform

Three APP usage methods

1. Download the APP

2. APP interface

Four program modification parts


Preface

The equipment side of this project uses a password keyboard to control the opening and closing of door locks and gates, and the steering gear is used to simulate the unlocking process. The main door will automatically close 10 seconds after it is successfully unlocked, and the small door will automatically close 5 seconds after it is successfully unlocked, ensuring the safety of the door. At the same time, an OLED display is added to the device to display the entered key in real time, and the acquired data is regularly transmitted to the cloud platform through ESP8266 automatic networking, ensuring timely sending and transmission of data. In response to the situation where the device is offline, this project also designed an automatic judgment reconnection mechanism, which can ensure that the device reconnects to the network after being offline, avoiding problems such as functional abnormalities and data transmission interruptions caused by device disconnection. The APP can issue tenant passwords, and the administrator account can also view them, and can modify the room status and tenant status to achieve synchronous control. Three small rooms are designed for management, which can better adapt to actual needs and facilitate user management. On the cloud platform side, we can obtain device-related data and display it to the cloud platform for display.

⚠️⚠️ (This article only provides ideas and implementation methods, and does not include code. Students who need code should contact the blogger themselves)

⚠️⚠️(If you have any questions or need customization or technical support, please contact the blogger yourself) ⚠️⚠️

Welcome to pay attention to the WeChat public account Star Aid Studio, the public account is open source design projects from time to time

Support single-chip microcomputer, Android system design finished product customization, project agency

Please contact WeChat: 13648103287

One line diagram

1. Schematic diagram

1. The development board comes with an LED light that can be used to check the network connection status and obtain data status information.

The specific operations are as follows:

- When the device is successfully connected to the cloud platform, the LED light and the opportunity will flash at the same time;

- The OLED display will display the networking status, indicating that the device is connected to the cloud platform;

- If the LED on the MUC is flashing, it means that our device is operating normally;

- If the LED light no longer flashes, press the reset button to manually reset the program once.

2. The hardware will transmit data to the cloud platform every 10 seconds. In addition to displaying the network status, the LED light will also flash repeatedly to remind the user that the device is working.

2. PCB effect

3. Physical effect


4. Function overview

(1 ) Hardware side

1. Use the password keyboard to control the door lock and door switch. The user can unlock the door by entering the correct password.

2. Use a servo to simulate the unlocking process. When the main door or small door is successfully unlocked, the main door will automatically close within 10 seconds, and the small door will automatically close within 5 seconds to ensure the safety of the door.

3. Use the OLED display to display the entered password information in real time. Users can easily observe the password input process to ensure that it is entered correctly.

4. Through ESP8266 automatic networking, the device automatically connects to the network, and the acquired data is regularly transmitted to the cloud platform to ensure the reliability and real-time nature of data transmission.

5. It has an automatic reconnection mechanism after the device is offline, which can automatically determine whether the device is offline and try to reconnect automatically, avoiding problems such as data transmission interruption caused by the device being offline.

(2) Hardware side

1. By issuing the tenant’s password through the APP, the administrator can easily issue the password to the tenant to facilitate opening the door.

2. The administrator account can modify the tenant status and room status, realize synchronous control of equipment status, and facilitate the administrator to manage and maintain the equipment.

3. This project has three small rooms for management, which can cope with different usage scenarios and meet different user needs. Administrators can easily manage and control these three small rooms.

(3 ) Cloud platform side

  1. Obtain device-related data and display it on the cloud platform

Demo video

Link: https://pan.baidu.com/s/12sA57gbxWCUDdp0XEmI_jg

Extraction code: xzy0

2. How to use the underlying code

1. Instructions for use

(1). The device will automatically connect to WIFI when used

Hotspot name: NET Password: 12345678, please use the 2.4GHZ frequency wireless network.

(2). When the device is in normal status, the LED on the development board will be in a flashing state.

2. Download the program

  1. First connect according to the schematic diagram, and then do the following operations after the connection is completed.
  2. Open the mobile hotspot Hotspot name: NET Password: 12345678
  3. Open the program (if the hardware is produced by the studio, you can ignore the downloading program part)

3. Check the cloud platform

Three APP usage methods

1. Download the APP

(1) Operation mode:

Use Android phone to install APK for control

Install Android studio and import the project using the emulator

Android studio download link

Download Android Studio_android studio download_psh714's blog-CSDN blog

(2) Instructions for use

When the user opens the APP, the device automatically subscribes to the MQTT topic and waits for 1-5 seconds. If the APP successfully obtains the data on the device within 5 seconds, the user can use the device normally and view and control the data. If device data is not obtained within 5 seconds, the user needs to check whether the device is online. If the device is online but the data cannot be obtained, you need to reopen the APP and obtain the data to ensure that the device is connected and working properly.

2. APP interface

 

Four program modification part

  1. hardware code
  1. If you need to modify WiFi

  1. Modify platform access equipment

  1. software code

Guess you like

Origin blog.csdn.net/herui_2/article/details/130757364