{"id":16652114,"url":"https://github.com/mariolukas/bluetti_esp32_bridge","last_synced_at":"2025-10-12T22:42:18.550Z","repository":{"id":64918306,"uuid":"545631444","full_name":"mariolukas/Bluetti_ESP32_Bridge","owner":"mariolukas","description":"Bluetti Power Station ESP32 Bluetooth to MQTT Bridge","archived":false,"fork":false,"pushed_at":"2025-03-21T12:56:35.000Z","size":2490,"stargazers_count":95,"open_issues_count":26,"forks_count":30,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-06-01T13:53:42.857Z","etag":null,"topics":["ac200","ac300","arduino","bluetooth","bluetti","eb3a","ep500p","esp32","iobroker","mqtt","openhab","powerstation","wifi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mariolukas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-04T17:59:58.000Z","updated_at":"2025-05-28T14:36:55.000Z","dependencies_parsed_at":"2023-02-12T09:40:17.547Z","dependency_job_id":"2b3ecfbc-a70e-49f1-a3d1-9c83bd2a0a7e","html_url":"https://github.com/mariolukas/Bluetti_ESP32_Bridge","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mariolukas/Bluetti_ESP32_Bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariolukas%2FBluetti_ESP32_Bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariolukas%2FBluetti_ESP32_Bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariolukas%2FBluetti_ESP32_Bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariolukas%2FBluetti_ESP32_Bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariolukas","download_url":"https://codeload.github.com/mariolukas/Bluetti_ESP32_Bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariolukas%2FBluetti_ESP32_Bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013278,"owners_count":26085250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ac200","ac300","arduino","bluetooth","bluetti","eb3a","ep500p","esp32","iobroker","mqtt","openhab","powerstation","wifi"],"created_at":"2024-10-12T09:27:39.741Z","updated_at":"2025-10-12T22:42:18.541Z","avatar_url":"https://github.com/mariolukas.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About\nThis is an ESP32 based Bluetooth to MQTT Bride for BLUETTI power stations. The project is based on https://github.com/warhammerkid/bluetti_mqtt\nThe code is tested on a AC300. Other Powerstations should also work but are untested yet. The discussion on https://diysolarforum.com/threads/monitoring-bluetti-systems.37870/ was a great help for understanding the protocol. \n\n## Community\nJoin the Discord Server https://discord.gg/fWDSBTCVmB\n\n## Features\n\n* easy configuration with WiFi manager\n* display support OLED 128x64 \n  * tested ESP32 WROOM with display: https://github.com/LilyGO/TTGO-T2-ESP32\n* mqtt support\n* support for BLUETTI power stations\n  * AC300 (tested)\n  * AC200 (tested)\n  * EB3A (tested)\n  * EP500 (untested)\n  * EP500P (tested)\n  * EP600 (some values still missing)\n* supported BLUETTI functions\n  * commands\n    * ac output on/off\n    * dc output on/off\n  * states\n    * ac input power\n    * dc input power\n    * ac output power\n    * dc output power\n    * dsp firmware version\n    * arm firmware version\n    * serial number\n    * device type\n    * power generation\n    * total battery percent\n\n## Getting Started\n\n### Configuration\n\nCreate a copy of config.sample.h and name it config.h\nChange at least the device type to fit your Bluetti device.\n\n### Compiling and Flashing to ESP32\n\n#### Arduino IDE\n\nYou will need to install a board support package for your ESP32. Additionally the following libraries are needed: \n\n* https://github.com/tzapu/WiFiManager\n* https://github.com/knolleary/pubsubclient\n* https://github.com/ayushsharma82/ElegantOTA\n* https://github.com/me-no-dev/ESPAsyncWebServer\n* https://github.com/me-no-dev/AsyncTCP/archive\n\nChange the partition scheme with Tools -\u003e Partition Scheme to\n\n* Minimal SPIFFS (1.9 MB App with OTA/ 190KB SPIFFS)\n\n![Wifi Manager start menu](doc/images/partition.png)\n\nThis setting is required because the Bluetooth stack already uses a lot of the ESP32 memory.\n\nOptional: Do changes in config.h file. The device can be set by changing 'BLUETTI_TYPE'.\n\nFinally upload the Sketch to your ESP32.\n\n*INFO*: Until now only BLUETTI_AC300, BLUETTI_EP500P was tested. If you own one of the supported devices please let me know if it works.\n\n#### PlatformIO\n\nCompiling\n```\n$ pio run\n```\n\nFlashing Factory Image\n```\n$ esptool.py write_flash 0x0 build/Bluetti_ESP32_Bridge.factory.bin\n```\n\nUpdating only App (don't delete settings)\n```\n# Write Partition A\n$ esptool.py write_flash 0x10000 build/Bluetti_ESP32_Bridge.ota.bin\n...\n# Write Partition B\n$ esptool.py write_flash 0x1F0000 build/Bluetti_ESP32_Bridge.ota.bin\n```\n\nThe configuration interface also offers OTA updates. You can flash also `build/Bluetti_ESP32_Bridge.ota.bin` there. If you already configured your device you can use `http://\u003cip_address/update` to update your firmware (no-reconfiguration needed)\n\n### Usage\n\nJust connect the ESP32 to a power supply or the power station itself. Connect your mobile phone or computer\nto the Wifi mangaer of the ESP32 firmware, it should show up as \"ESP32_Bluetti\".\n\nAfter the connection to the hotspot is established a wifi manager popup will appear. Otherwise\nopen 192.168.4.1 in your local webbrowser.\n\nSelect \"Configure WiFi\"\n\n![Wifi Manager start menu](doc/images/wifi_manager.png)\n\nConfigure your WiFi and set the address of your MQTT server and enter the Bluetooth ID of your\nBluetti Device. Optionally you can specify username and password to protect the web OTA interface.\nYou can use a mobile phone and/or the Bluetti APP for finding the correct Bluetooth ID of your device.\n\n![Wifi Manager start menu](doc/images/wifi_setup.png)\n\nSave the settings. The ESP32 starts sending messages to your MQTT server.\n\nExample ( ioBroker ):\n![MQTT ioBroker](doc/images/iobroker.png)\n\n### MQTT Topics\n\n#### Commands\nCommands are subscribed from\n\n* /bluetti/\u003cyour_device_id\u003e/command\n  * ac_output_on\n  * dc_output_on\n\n#### State\nStates are published to\n* /bluetti/\u003cyour_device_id\u003e/state\n  * ac_output_on\n  * dc_output_on\n  * dc_input_power\n  * ac_input_power\n  * ac_output_power\n  * dc_output_power\n  * serial\n  * dsp_version\n  * arm_version\n  * power_generation\n  * total_battery_percent\n\n## Display\nConfig Display:\n* By default, display is disabled. \n* Configurations (customize of file Bluetti_ESP32/config.h): \n  * Enable display: uncomment #define DISPLAYSSD1306 1\n  * Enable reset of display on init: uncomment DISPLAY_RST_PORT\n    * Known needed for LoRa TTGO v1.0\n  * set SCL \u0026 SDA ports: default ports are set to SCL=4 \u0026 SDA5, to change update DISPLAY_SCL_PORT and DISPLAY_SDA_PORT \n\nDisplay functionality:\n* Show current assiged IP address (AP mode or normal)\n* Show different wifi connection logo, depending on the mode its in and wifi Strength in normal mode (4 bars)\n* Show the running time of the device in the format \"11d12h15m\" Currently max until 49 days as this is the time millis() is reset. \n* Show status message, currently shows the init and running status, also BLEscan when scanning \n* a progressbar is available but currently not used anywhere. (to see where it can be used)\n* Show bluetooth icon status. Connected is static, blinking is trying to connect, together with message in case of scanning.\n* Show MQTT icon status. Connected is static, blinking is trying to connect.\n\nExample display screen:\n![DisplayImage](doc/images/display.jpg)\n\n\n## TODO\n\n* add full feature set to device files\n* adding support for SD-Card reader, for writing csv data to an sd-card\n* adding logging poll commands\n\n## Disclaimer\n\nThe code within this repository comes with no guarantee, use it on your own risk.\n\nDon't touch these firmwares if you don't know how to put the device in the programming mode if something goes wrong.\nAs per the GPL v3 license, I assume no liability for any damage to you or any other person or equipment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariolukas%2Fbluetti_esp32_bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariolukas%2Fbluetti_esp32_bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariolukas%2Fbluetti_esp32_bridge/lists"}