Previously, I’ve asked Bluetti about an API, but the response I received seemed to suggest no plans or consideration was being given to opening up an API.
My primary desire is to be able to log solar input, grid input and output and take appropriate automated actions based on these to manage loads and alerts (I have the actions/alerts already in place). At the most basic level, I would even be content if the device home screen was available via a simple HTTP server.
I noticed when the EP500Pro is connected to wifi it has a listening socket on port 80. Has anyone been able to run any packet captures to determine if it’s possible to extract this information? I noticed that at least one competing product had an API available. I’m happy with my units, but I’d hate to have to have to setup external monitoring clamps on PV, Grid and Output just to get this, when I know it’s already available (but just not exposed).
I can recommend using an app named Wireshark to listen to the packets being transmitted. Port 80 is the common port for HTTP and maybe the Bluetti app uses it, to
I agree that Bluetti should allow other apps to access the power station status. I need to monitor all alarms and certain parameters, such as battery charge, DC and AC inputs and outputs so I can create my own alarms on my Samsung tablet to warn me when something happens.
I’ve been working on an API for a few months now in my spare time, and have made some progress, but also have a ways to go. There’s more detail over at the thread I created, but basically I figured out how to control and monitor the device over either wifi or bluetooth and I’m currently working on putting something together to release. My current rough plan is to release something that runs on Linux and exposes an MQTT interface to Home Assistant by using the bluetooth interface. If you have thoughts about what you’d like, feel free to share them over there.
If you’d like to help out, feel free to DM your email and I can send you a script to run that can log your device info. You’ll need a computer with bluetooth running Linux (I’m using a raspberry pi). I don’t have access to an EP500, and I’m assuming it works similarly to the AC300 (and AC200MAX), but more info is always useful.
Let me know how I can help… I’m would be interested in this ability as well.
One thing I’ve noticed since allowing the AC300’s on my network are warning from my security system about the AC300. It calls it a “Shanghai High-Flying Smart Plug” and says that it’s authentication procedure uses unencrypted (plain text) authentication… this is actually being flagged by my network monitoring as a high risk item.
It appears that you’re running this from inside the Python shell, when the command should be run from inside PowerShell or the Command Prompt on Windows. It should also be bluetti-mqtt --scan, without the underscore.
It looks like the variable “bluetti-mqtt” was not mapped in my windows system environment variables. I had to run sysdm.cpl and add the keyword “bluetti-mqtt” to map to the location of the bluetti-mqtt.exe file.
The Bluetti EP500 Pro does not have the possibility to log data such as the solar energy coming in via solar panels, the additional grid energy at low capacity level, the current consumption or the current capacity in a database.
However, the data logged in a database would allow for a variety of interesting analyses. For example, numerous statistics and interesting graphs can be generated from the data. If I integrate over the logged data in certain time periods, I can calculate the total energy harvested or consumption during that period. This data in turn can be used to calculate monthly statistics or how differently the plant performs in the 4 seasons.
Basically anything can be calculated that is possible with a little SQL and a few tables.
Also a fancy website would be possible, where you can see from anywhere in the world what the energy production and usage at home is doing.
For this reason I developed the Bluetti DB Bridge. An ESP32 based device that makes contact with the Bluetti via Bluetooth, gets the data I mentioned and then some, and transmits it directly via WiFi to a MySQL database located on a Raspberry Pi where it is stored in a table. This was only possible with some initial help about the codes from Chromedshark!
In addition, the Bluetti DB Bridge allows me to display the most important data directly at my workstation!
My setup these days basically involves one Raspberry Pi running the MQTT service I wrote in bluetooth range of my AC300+B300 and connected over wifi to my “server” Raspberry Pi running my MQTT broker, Prometheus for data storage, Grafana, and a script I wrote to publish data from the MQTT broker to Prometheus. This gives me pretty charts for monitoring my setup, as well as historical records, which is all I really need at the moment.
I have to give props to @Chromedshark I’m using his project. The default setup and integration with Home Assistant allows one to easily gather and chart the data without much manual setup. Pretty much the MQTT integration with HA provides everything needed for decent analysis.
This is from Home Assistant for two EP500Ps with minor customization (top charts are for DC in and bottom for AC out):
If you need to capture into another mysql database, this is also pretty easy to do just with the previously mentioned project. Using a little python script mqttdb.py, you can capture it all into a database. Once you have that you can use Grafana or other utilities to plot anything you like.
Some people may be wondering, how useful is it to plot the data?
For reference, I’m using a few solar panels to charge the batteries, then running the inverter for a few hours a day during sunlight as well as charge back up the batteries until the next day. I’ve learned from the data on the EP500Ps I’ve monitored. The resting voltage you leave the battery charged up at and the way you taper the charge matters at how quickly the battery discharges until the next day. Check out the red and green nightly drops:
You can already do this (trigger grid charging when battery level becomes predefined low) with the latest release in Home Assistant (no need for IFTTT). Since Home Assistant already supports IFTTT anyway, it’s entirely possible to tie that in if you choose to do something with that anyway.