O2OA platform is an enterprise office system of low code development platform, more convenient development and deployment of collaborative office, process management and other applications, but it can do far more than these, today this case for you to introduce, O2OA can do more.
Recently, I have developed a keen interest in fish farming, so I made a VAT of goldfish in my office. Due to weekends, holidays, business trips, etc., it is not possible to take care of them every day, so there are problems with water change, lighting control, feeding, temperature control, etc.
Therefore, we consider using our O2OA platform as the control center, with Arduino and peripheral sensors and modules for remote control, to achieve cloud fish farming, along with the control of some office equipment, such as air conditioning, projector, etc.
Specific functions are considered as follows:
1. Take O2OA as the control center
2, remote control of gold fish lamp switch and dimming
3, remote control of infrared emission, air conditioning and projector control
4. Record and monitor fish tank temperature and ambient temperature and humidity
All the components used are as follows:
- An O2OA server
- A WeMos D1 mini, integrated with ESP8266, acts as a master MCU
- A DC-DC LM2596HVS buck module input 4.5-60V fixed to 5V
- A DS18B20 digital temperature sensor is waterproof
- A DHT22 single-bus digital t/H sensor
- Two MOS tubes for lighting control through PWM
- Infrared learning module, serial port control
- 48V3A power adapter
That’s basically it, plus a few wires, welds, DC sockets, hole plates, etc.
The implementation steps are as follows:
-
ESP8266 starts AP mode and responds to Web service. After connecting through browser, set wifi and password to access, O2OA central server domain name, port, login user name and password, and then store in EEPROM memory to complete initialization.
-
The ESP8266 connects to the wifi and O2OA server to obtain the token.
-
After receiving the user token, ESP8266 establishes WebSocket connection with O2OA server.
-
Configure custom WebSocket messages on the O2OA server.
-
Develop a portal page in O2OA platform, set up the relevant button, send WebSocket messages to the user of the specified device.
-
After receiving a WebSocket message, ESP8266 parses the message instruction and performs the corresponding control. Such as sending PWM or UART communication.
-
The ESP8266 periodically collects sensor temperature and humidity information and sends HTTP requests to the O2OA server.
-
After receiving the request, the O2OA server creates a temperature and humidity record document and configures related views and statistics.
-
Display temperature and humidity statistics on THE O2OA portal page.
-
Create a self-built table in O2OA server for recording the infrared coding address of the learning infrared module.
That’s roughly how it goes.
The next chapter describes setting up a development environment.