How to Enable Cloud Platform Services for a BMS Without a WiFi Module
What Problem Are We Solving?
Many Battery Management Systems (BMS) only have wired communication interfaces like RS485 or CAN, without built‑in WiFi. This means you can only view data by standing next to the battery and connecting a cable – no remote monitoring.
The goal of this tutorial is to use a low‑cost ESP32 module to move BMS data to a cloud platform, so you can check the battery status from anywhere with internet access, and even receive fault alarms.
After completing this tutorial, you will master:
-
Hardware selection and wiring
-
Direct local network access (simple but limited)
-
Building a cloud server for true remote monitoring
1. Basic Knowledge (Terminology)
-
BMS – Battery Management System; monitors voltage, current, and temperature, and protects the battery.
-
RS485 – A robust industrial wired communication interface, usually with A and B lines.
-
Modbus Protocol – The “language” many BMS use; for example, voltage can be obtained by reading a specific “register address”. We’ll provide the detailed read commands later.
-
ESP32 – A low‑cost microcontroller with WiFi and Bluetooth. It acts as a “translator”, converting the BMS’s RS485 data into WiFi signals.
-
MQTT – A lightweight messaging protocol, ideal for IoT devices to push data to a server.
2. Hardware Preparation: Everything You Need
2.1 Core Hardware List
| Hardware | Key Requirement | Reason |
|---|---|---|
| ESP32 module | Choose a model with an external antenna connector, such as ESP32‑S3 (N16R8) | The energy storage cabinet is a metal enclosure that blocks internal antenna signals. An external antenna is needed to get the WiFi signal out. |
| TTL‑to‑RS485 module | With automatic flow control; industrial‑grade with isolation is recommended | Auto flow control switches between transmit/receive automatically, avoiding communication conflicts. Isolation protects against common‑mode interference that can burn out chips. |
| Isolated power module | e.g. B0505S‑1W | There may be a voltage difference between the BMS ground and the ESP32 ground. Without isolation, data can be corrupted, or worse, the ESP32 may be burned, or BMS sampling may be disrupted. |
| DC‑DC step‑down module | Wide input voltage, such as LM2596 or MP1584EN | The battery’s auxiliary power is usually 12V–60V and must be stepped down to 5V to power the ESP32. |
If “automatic flow control” sounds confusing, simply tell the seller you need a “TTL to RS485 module with automatic transceiver control.”
TTL to RS485 Module:

Why especially recommend the ESP32‑S3 (N16R8)?
-
Up to 45 GPIOs, capable of handling two UART interfaces simultaneously (one for the BMS and one for an inverter).
-
LX7 core at 240 MHz, providing more computing power – handy if you later want to run battery life predictions or FFT harmonic analysis.
-
External antenna connector ensures a reliable WiFi signal even inside a metal cabinet.
ESP32‑S3 Module:

2.2 Wiring Logic (Follow Exactly)
-
Communication wiring:
BMS RS485 A & B lines → TTL‑to‑RS485 module A & B terminals → Module TX to ESP32 GPIO16 (RX2), Module RX to ESP32 GPIO17 (TX2).
All devices must share a common ground (GND). Module VCC to 5V or 3.3V (depending on its specification). -
Power wiring:
Battery P+ & P‑ → wide‑input step‑down module input → output 5V → isolated power module (B0505S) input → isolated 5V output → ESP32 5V and GND pins.
Note: Always disconnect power before wiring, double‑check polarity, and never omit the power isolation.
3. Solution One: Direct LAN Connection (Quick to Test, but Not a Long‑Term Solution)
This approach turns the ESP32 into a tiny web server. You can view the battery data by opening a browser on a phone connected to the same WiFi network.
Step 1: Hardware Connection
Complete the wiring as described in “Hardware Preparation”.
Step 2: Write the MicroPython Code (We will provide the BMS Modbus protocol document)
The code does three things:
-
Connects to your WiFi.
-
Periodically reads BMS registers (for example, voltage is stored at address 0x1300).
-
Embeds a simple HTML page to display the read values.
You will use Thonny IDE to flash the code onto the ESP32. (Thonny is explained in detail later.)
Step 3: View on Your Phone
In Thonny’s serial monitor, you will see the IP address assigned to the ESP32 after it connects to WiFi, e.g., 192.168.1.50.
Connect your phone to the same WiFi, open a browser, and enter that IP address to see the battery data page.
Serious Shortcomings of This Approach (Why We Need to Move to the Cloud)
-
Only viewable at home: No access once you leave, unless you set up port forwarding on your router (very insecure).
-
No historical data: The ESP32 has extremely limited storage; it cannot store years of data, monthly reports cannot be generated, and you cannot find out what caused a midnight trip since there is no fault log.
-
Crashes with multiple users: If two or three people open the page at the same time, the ESP32 may run out of memory and restart.
-
No proactive alerts: If the battery temperature is too high or cell voltage difference exceeds limits, it cannot send you a push notification. If you don’t actively check the page, you won’t know something is wrong.
Therefore, we need a real server solution.
4. Solution Two: Cloud Server Architecture (The Ultimate Solution)
The ESP32 only collects and uploads data; data storage and web display are handled by a professional server.
Step 1: Purchase a Cloud Server
-
Operating system: Ubuntu 20.04 or 22.04 LTS (best Python compatibility and most stable for BT Panel).
-
Important: Immediately after purchase, open the following ports in your cloud provider’s firewall (security group):
-
1883(MQTT default port) -
18083(EMQX dashboard) -
8888(BT Panel access) -
3306(MySQL, if remote management is needed) -
80and443(Web services)
Step 2: Local Development Environment – Thonny IDE
Thonny is an excellent tool for MicroPython development; it is used to flash firmware, upload code, and view real‑time logs from the ESP32.
-
Download and install Thonny.
-
Open Thonny, click the interpreter selector at the bottom right, and choose “MicroPython (ESP32)”.
-
If the ESP32‑S3 is not recognized, go to “Run → Select Interpreter”, click “Install or update MicroPython”, and select the corresponding S3 firmware to flash.
Step 3: Install Required Software on the Server
We use BT Panel (Baota Panel) to simplify server management.
3.1 Install BT Panel
According to your server system (Ubuntu), get the installation command from the official BT website and run it via SSH on your server.
3.2 Install Necessary Plugins in BT Panel
Log into the BT Panel backend, go to the “App Store” and install:
-
Docker Manager – to quickly deploy EMQX (MQTT message broker).
-
Python Project Manager – turns your Python data processing script into a system service that restarts automatically if it crashes.
-
MySQL 5.7+ – to store battery historical data.
-
Nginx – used as a reverse proxy for web pages and to host OTA firmware files.
Step 4: Deploy EMQX (MQTT Broker) with Docker
In BT Panel, open Docker Manager, search for emqx, use the official image to create a container, and map ports 1883 and 18083.
Access //your-server-ip:18083 to enter the EMQX dashboard and create a username and password for the ESP32 to use when connecting.
Step 5: Write the Cloud Data Processing Script
On your PC or directly on the server, write a Python script that:
-
Uses the
paho-mqttlibrary to listen for battery data received by EMQX. -
Parses the data and stores it in the MySQL database.
-
Can be extended with
FastAPIto provide API endpoints for web pages or future mobile apps.
Install the required Python libraries (in the server terminal or in Python Project Manager):
Step 6: ESP32 Code (MicroPython)
We will provide you the BMS Modbus protocol document. Based on it, write the ESP32 code to:
-
Connect to WiFi.
-
Connect to the MQTT server (using your server’s public IP, port, username, and password).
-
Periodically read RS485 data (voltage, current, temperature, etc.).
-
Package it into JSON and publish to a specified MQTT topic.
Save the code as main.py and upload it to the ESP32 using Thonny (this makes it run automatically on power‑up).
Step 7: Front‑end Display
You can use Nginx to host an HTML page that calls the FastAPI interface with JavaScript to achieve real‑time monitoring dashboards and historical charts. This part can be custom‑developed according to your needs or built with ready‑made dashboard tools.
5. System Effects and Summary of Benefits
After completing the above deployment, you will have:
-
Access from anywhere: Check your energy storage system status wherever you have internet.
-
Historical database: Every voltage, current, and fault record is stored in MySQL, enabling daily/monthly reports and fault tracing.
-
High concurrency and stability: Server‑grade MQTT and web services can handle multiple simultaneous users without pressure.
-
Proactive alerts: Write rules in the cloud script to actively notify you via email, SMS, or app push when data is abnormal.
-
Industrial‑grade stability: The ESP32‑S3’s anti‑interference design, external antenna, and power isolation ensure long‑term reliable operation inside a metal cabinet.
-
Easy maintenance: Thonny + BT Panel greatly reduces the difficulty of firmware upgrades and server management, making future feature iteration easy.
-
Full lifecycle archive: A cloud health record is created for each battery pack, providing tamper‑proof data for asset evaluation and warranty policies.
Starting from scratch, just follow this tutorial step by step, and you can upgrade a traditional BMS without WiFi into a modern IoT energy storage device. This is not just a technical practice, but a key step toward smart energy management. What are the benefits? Learn the Smart BMS with WiFi.
If you encounter any unfamiliar items or terms during the process, feel free to contact the Seplos engineer team.
Cold vs. Heat: Which Is Worse for Your Energy Storage Battery
From Hardware to Smart Asset: Why Your Energy Storage System Must Have a Seplos WiFi BMS
For more questions, please
contact us